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

Implement file actions menu #15

Closed
wants to merge 1 commit into from
Closed

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Mar 1, 2019

Fix #7

capture d ecran_2019-03-01_11-44-33


Issues, please give your insight

  • Actions are not really reactive, clicking favourite does not change the menu item
  • What would be the behaviour of clicking rename? Closing the slideshow?
  • Lots of the actions require that the file is in the list, but the slideshow doe snot care about this and does not pursue loading the main files list. I'm not sure how to handle this case. Shall we scroll down while pressing next on the slideshow?
  • How to properly detect the file deletion? If I click delete from the menu, it gets deleted in the backgroud, but how can I make the main app to know? I want to avoid creating dedicated edge-cases on the viewer (like if action === 'delete') because it would be a nightmare to manage. Thoughts?
  • The popovermenu get hidden by the sidebar when opened. I can't get my head around this, since the modal is fixed, any children zindexes is ignored, therefore the sidebar can be under or above the whole modal, but cannot be between two element of the modal content! 🤷‍♀️

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv added enhancement New feature or request 2. developing Work in progress labels Mar 1, 2019
@skjnldsv skjnldsv self-assigned this Mar 1, 2019
@ChristophWurst
Copy link
Member

Have the issue been addressed?

@skjnldsv
Copy link
Member Author

skjnldsv commented Mar 1, 2019

@ChristophWurst No, I'm asking for input 😁

@juliushaertl
Copy link
Member

juliushaertl commented Mar 1, 2019

Actions are not really reactive, clicking favourite does not change the menu item

This needs some deeper digging into apps/files/js/tagsplugin.js. But I fear that we won't be able to easily reuse the existing tagsplugin and get reactivity. A quick test with forcing the rerendering of the actions computed property after executing the action didn't have any effect, since the tagsplugin seems to manually change the element of the rendered popoer in the file list.

What would be the behaviour of clicking rename? Closing the slideshow?

👍 Otherwise we could also introduce some editing view in the modal header (where the filename is), but not sure if we should have this logic added to the viewer.

Lots of the actions require that the file is in the list, but the slideshow doe snot care about this and does not pursue loading the main files list. I'm not sure how to handle this case. Shall we scroll down while pressing next on the slideshow?

I'd say so, although we will need to extend FileList.scrollTo to disable the details view.

How to properly detect the file deletion? If I click delete from the menu, it gets deleted in the backgroud, but how can I make the main app to know? I want to avoid creating dedicated edge-cases on the viewer (like if action === 'delete') because it would be a nightmare to manage. Thoughts?

The only way I see here, would be to use backbone events on the files list collection to trigger update of the viewer if the file list data changes.

The popovermenu get hidden by the sidebar when opened. I can't get my head around this, since the modal is fixed, any children zindexes is ignored, therefore the sidebar can be under or above the whole modal, but cannot be between two element of the modal content! woman_shrugging

The sidebar has a z-index of 10001 so it still has precendence as the modal has 9998. Anyway we should close the modal if we show the sidebars or take some other action that is happening in the main files view.

@skjnldsv
Copy link
Member Author

skjnldsv commented Mar 1, 2019

Otherwise we could also introduce some editing view in the modal header (where the filename is), but not sure if we should have this logic added to the viewer.

Yes, this is out of scope for the viewer I'd say.

I'd say so, although we will need to extend FileList.scrollTo to disable the details view.

Let's see if I can select the file like that.

The only way I see here, would be to use backbone events on the files list collection to trigger update of the viewer if the file list data changes.

Doable externally with pure js events?

The sidebar has a z-index of 10001 so it still has precendence as the modal has 9998. Anyway we should close the modal if we show the sidebars or take some other action that is happening in the main files view.

Or disable the menu when the sidebar is opened?

@juliushaertl
Copy link
Member

Doable externally with pure js events?

Not with our current file app implementation.

Or disable the menu when the sidebar is opened?

I think the modal should still overlay the sidebar as well and be closed once the sidebar is accessed. Otherwise we run into overlaying issues on bigger images/smaller screen size:

image

@Spartachetto Spartachetto mentioned this pull request Mar 3, 2019
@jancborchardt
Copy link
Member

jancborchardt commented Mar 12, 2019

Very nice!! :)

  • The 3-dot menu should be directly on the right of the file name, not next to the close X. It belongs to the file (name). → scratch that, this will get janky because of file name length variations. Let’s just keep these actions on the right.
  • The share action should be outside of the menu, just like it is in the list view. Or if it’s in the list view, it needs to be further up, directly after favorites.
  • Why is "Comment" another action there? Let’s not add more stuff in this already long menu. ;) As soon as finally the Activity+Comments+Versions timeline is done, it will be reachable via "Details" anyway. 📑 Sidebar: combine file Activity and Comments into »Activity« timeline tab (possibly also "Versions") server#658

@jancborchardt
Copy link
Member

@skjnldsv guessing this is on hold cause of other commitments? Is this still on for 17, or likely not?

@skjnldsv
Copy link
Member Author

skjnldsv commented Jun 18, 2019

@jancborchardt Yes this is still pending :'(
Though I could use a bit of insights from @NastuzziSamy 🤗
How do you get the full action list on a file and how do you properly trigger the action?

Looks like a great idea to tackle during the hackweek ;)

@skjnldsv
Copy link
Member Author

skjnldsv commented Jul 2, 2019

@juliushaertl Samy still uses a copy of the current menu html dom.
Do you have proper pointers for me to get the menu from the Filelist js '''api'''? 🙏

@juliushaertl
Copy link
Member

juliushaertl commented Jul 2, 2019

FileList.fileActions.getActions('image/jpg', 'file', OC.PERMISSION_ALL) should work for that. The main issue is that the actions always require the file list entry as context attribute, as already mentioned last week. 😞

I'm not sure right now how we could fetch the file list in the background properly apart from a hacky call to FileList.scrollTo(filename). After that you could use FileList.findFileEl(filename) to get the actual row.

@szaimen
Copy link
Contributor

szaimen commented Nov 5, 2019

Sry but any update here?
Would be really nice to get this feature!

@skjnldsv
Copy link
Member Author

skjnldsv commented Nov 5, 2019

@szaimen would be nice :)
But it actually requires some server fixes so that actions are properly implemented ;)

@blizzz blizzz added this to the Nextcloud 25 milestone Apr 21, 2022
@skjnldsv skjnldsv modified the milestones: Nextcloud 25, Nextcloud 26 Aug 12, 2022
@juliushaertl juliushaertl removed their request for review December 22, 2022 11:50
@skjnldsv skjnldsv removed this from the Nextcloud 26 milestone Feb 25, 2023
@skjnldsv skjnldsv marked this pull request as draft February 25, 2023 11:23
@skjnldsv skjnldsv closed this Aug 16, 2023
@szaimen szaimen deleted the enhancement/fileactions-menu branch August 16, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files actions
6 participants