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

feat(files): support nested actions #41010

Merged
merged 4 commits into from
Nov 8, 2023
Merged

feat(files): support nested actions #41010

merged 4 commits into from
Nov 8, 2023

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Oct 20, 2023

apps/files/src/init.ts Outdated Show resolved Hide resolved
@skjnldsv skjnldsv marked this pull request as draft October 20, 2023 10:40
@szaimen

This comment was marked as resolved.

@skjnldsv

This comment was marked as resolved.

@szaimen

This comment was marked as resolved.

Pytal

This comment was marked as resolved.

@skjnldsv

This comment was marked as resolved.

marcoambrosini

This comment was marked as off-topic.

@skjnldsv

This comment was marked as resolved.

@nimishavijay

This comment was marked as resolved.

@skjnldsv

This comment was marked as resolved.

@Pytal

This comment was marked as resolved.

jancborchardt

This comment was marked as off-topic.

@jancborchardt

This comment was marked as resolved.

@skjnldsv skjnldsv marked this pull request as ready for review November 3, 2023 17:56
@skjnldsv
Copy link
Member Author

skjnldsv commented Nov 3, 2023

@Pytal please review the logic!

Especially the condition on where a reminder is shown or not, as I wasn't part of the original discussions! I used your services, so I think it should be good.
But here are a few questions to be safe

  1. Is it normal that depending on the time of day, only some options are visible?
  2. Is this feature enabled for all nodes, no matter what they are and what permissions they have? (folder/files, etc etc)

@Pytal
Copy link
Member

Pytal commented Nov 4, 2023

  1. Is it normal that depending on the time of day, only some options are visible?

Yes this is by design

  1. Is this feature enabled for all nodes, no matter what they are and what permissions they have? (folder/files, etc etc)

Yes, if you can see (read) the file then you should be able to set a reminder on it

Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

The focus handling does not work properly:
If you click (keyboard) on "set reminder" the submenu opens but the focus is not set on the submenu's first element.

Also if you click the back button the first submenu is reopend, but the focus is not on the "set reminder" entry.

In both cases the focus is on some random non visible element.

}

// Generate the default preset actions
export const actions = [laterToday, tomorrow, thisWeekend, nextWeek]
Copy link
Member

Choose a reason for hiding this comment

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

Since the presence of the action should be evaluated ideally on click instead of on script execution I think the FileAction enabled callback needs to be set to something like () => Boolean(getDateTime(option.dateTimePreset)) to be more reactive

Copy link
Member Author

Choose a reason for hiding this comment

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

Can be improved later

Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

🐘 a11y in follow up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add API for FileAction submenu actions
8 participants