Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add download button #814

Merged
merged 2 commits into from
Apr 9, 2021
Merged

Conversation

beardhatcode
Copy link
Contributor

@beardhatcode beardhatcode commented Mar 13, 2021

Continuation of #702.

image

I addressed @skjnldsv comments and moved the download button to above the delete button (it felt better to me like that).

Works on my server and in the docker image.

Mentioning relevant people:
@fflorent @skjnldsv

@beardhatcode
Copy link
Contributor Author

I do not immediately see why Cypress is failing. Does anyone have some pointers for me?

@szaimen
Copy link
Contributor

szaimen commented Mar 14, 2021

Thanks for continuing this!
Maybe there could be a ActionSeparator between download and delete like e.g. shown here?
nextcloud/spreed#5285 (comment)

@beardhatcode
Copy link
Contributor Author

The material design guidelines specify that separator should be used to "to create groupings rather than separate items" . I personally don't feel like "open sidebar" and "download" would form a group as they are very different actions. What do you think @szaimen ?

@szaimen
Copy link
Contributor

szaimen commented Mar 14, 2021

That's a good guideline 👍 I just wanted to bring this up as an enhancement point but the better way (instead of a separator) would probably be to ask if you want to delete a file and not instantly deleting it. So I guess it is up to the @nextcloud/designers team to decide if a separator makes sense here...

@beardhatcode
Copy link
Contributor Author

beardhatcode commented Mar 14, 2021

Oh, It should not instantly delete the file in the viewer without confirmation. That would be very bad, is there an issue open for that already?

edit: I read some more about this and there is a an open issue for this: #746

@szaimen szaimen added the 3. to review Waiting for reviews label Mar 15, 2021
@szaimen szaimen requested a review from skjnldsv March 15, 2021 19:53
@marcoambrosini
Copy link
Member

Hey, nice addition! What about having the download button always visible instead of within the actions menu? I think it would be very handy.

@skjnldsv
Copy link
Member

@ma12-co not available in the current Modal component, but that would be nice indeed :)

@szaimen
Copy link
Contributor

szaimen commented Mar 16, 2021

@ma12-co not available in the current Modal component, but that would be nice indeed :)

So then how to move this PR forward?
Just add it in the drop-down menu for now and change it later back into the Modal when it is available?

l10n/fr.js Outdated Show resolved Hide resolved
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments :)
Sorry it took me time, very nice work! 🚀

@skjnldsv skjnldsv added the enhancement New feature or request label Mar 25, 2021
@skjnldsv skjnldsv added this to the Nextcloud 22 milestone Mar 25, 2021
@skjnldsv
Copy link
Member

/backport to stable21

@backportbot-nextcloud backportbot-nextcloud bot added the backport-request Pending backport by the backport-bot label Mar 25, 2021
@skjnldsv
Copy link
Member

/backport to stable20

@skjnldsv
Copy link
Member

/backport to stable19

@beardhatcode beardhatcode force-pushed the add-download-button branch 2 times, most recently from cb9728a to 28e231b Compare March 25, 2021 20:47
@beardhatcode
Copy link
Contributor Author

beardhatcode commented Mar 27, 2021

Got it working locally. I needed to add a download attribute the link to make cypress happy (but it is also just better like this).

  Running:  download.spec.js

  Download image.png in viewer
    ✓ See "image.png" in the list (8274ms)
    ✓ Open the viewer on file click (583ms)
    ✓ Does not see a loading animation
    ✓ Download the image (186ms)
    ✓ Compare downloaded file with asset by size (305ms)

(also works in the check run: https://github.com/nextcloud/viewer/pull/814/checks?check_run_id=2207888337#step:8:456 )

@beardhatcode beardhatcode force-pushed the add-download-button branch 2 times, most recently from d64dc07 to cb259a5 Compare March 27, 2021 09:56
@beardhatcode beardhatcode force-pushed the add-download-button branch 2 times, most recently from d2ce935 to b44b163 Compare March 31, 2021 08:12
@beardhatcode
Copy link
Contributor Author

@skjnldsv, some cypress tests are failing, but I don't know why. Could you take a look at it?

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Mar 31, 2021
@skjnldsv skjnldsv added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Mar 31, 2021
@skjnldsv
Copy link
Member

Relevant bug
nextcloud-libraries/nextcloud-vue#1809

@skjnldsv
Copy link
Member

skjnldsv commented Mar 31, 2021

Pfiouu, lots of fixes!

  • There is a bug in our button library, so will be fixed later.
  • I added a test, because we were not compliant to the hideDownload option on link shares
  • Fixed Eslint
  • And instead of hardcoding the file size, I directly read it from the fixtures 😉

Again, big thank you for all the work @beardhatcode and @fflorent. Couldn't have found the time if you had not done 99% of the work! 🎉

@skjnldsv

This comment has been minimized.

fflorent and others added 2 commits April 8, 2021 17:54
Signed-off-by: Florent Fayolle <florent.github-contributions@zeteo.me>
Signed-off-by: Robbert Gurdeep Singh <git@beardhatcode.be>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Apr 8, 2021
@skjnldsv
Copy link
Member

skjnldsv commented Apr 9, 2021

Everything passes locally 🤔

@skjnldsv skjnldsv merged commit 810d6f5 into nextcloud:master Apr 9, 2021
@backportbot-nextcloud

This comment has been minimized.

@backportbot-nextcloud

This comment has been minimized.

@backportbot-nextcloud

This comment has been minimized.

@skjnldsv

This comment has been minimized.

@skjnldsv
Copy link
Member

skjnldsv commented Apr 9, 2021

@skjnldsv skjnldsv removed the backport-request Pending backport by the backport-bot label Apr 9, 2021
@skjnldsv
Copy link
Member

skjnldsv commented Apr 9, 2021

I will stop at 21 unfortunately, 20 might be too different, let's see on #849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants