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

Move reminder conditional rendering into action enabled #41336

Closed
skjnldsv opened this issue Nov 8, 2023 · 2 comments · Fixed by #41670
Closed

Move reminder conditional rendering into action enabled #41336

skjnldsv opened this issue Nov 8, 2023 · 2 comments · Fixed by #41670
Assignees
Labels
3. to review Waiting for reviews enhancement feature: files good first issue Small tasks with clear documentation about how and in which place you need to fix things in. papercut Annoying recurring issue with possibly simple fix.

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Nov 8, 2023

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

Originally posted by @Pytal in #41010 (comment)

@skjnldsv skjnldsv added enhancement good first issue Small tasks with clear documentation about how and in which place you need to fix things in. 1. to develop Accepted and waiting to be taken care of feature: files papercut Annoying recurring issue with possibly simple fix. labels Nov 8, 2023
@Pytal
Copy link
Member

Pytal commented Nov 9, 2023

From the code it looks like the enabled function is run on render of FileEntryActions or whenever computed enabledActions() dependencies change but not on click

As these actions are time-dependent is there a simple way we can make these run on click @skjnldsv? Or would we need some API changes and would it be worth it?

@skjnldsv
Copy link
Member Author

skjnldsv commented Nov 9, 2023

Or would we need some API changes and would it be worth it?

Let's not complicate things. API have received enough change and tuning, they are officially released and stable now.

The render side can be adjusted though. But if we start doing this on click, it means we risk slowing the render or worse, have entries suddenly disappear on user interaction, leading to confusion. I am not fond of this.

@emoral435 emoral435 self-assigned this Nov 16, 2023
@emoral435 emoral435 added 2. developing Work in progress 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of 2. developing Work in progress labels Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement feature: files good first issue Small tasks with clear documentation about how and in which place you need to fix things in. papercut Annoying recurring issue with possibly simple fix.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants