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

Refactor modal #10095

Closed
9 of 15 tasks
JammingBen opened this issue Nov 30, 2023 · 0 comments · Fixed by #10212
Closed
9 of 15 tasks

Refactor modal #10095

JammingBen opened this issue Nov 30, 2023 · 0 comments · Fixed by #10212
Assignees
Labels
Category:Technical Technical ehancements

Comments

@JammingBen
Copy link
Contributor

JammingBen commented Nov 30, 2023

The current implementation of our modal has quite a few downsides, such as holding logic that it is not supposed to hold (e.g. password enforcement rules) and being limited to one active modal.

To-Dos

  • Decouple modal from store and use a wrapper component that handles the modals (e.g. via event bus)
  • Allow stacking multiple modals that will be processed in a queue
  • Remove custom logic such as password enforcement rules and use dedicated components instead
  • Clean up modal implementations where the logic is currently spread all over the place. These things should be file actions that create a modal using a custom component. Logic can then sit either in the file action, or in the component (see e.g. how it's done in feat: show modal when creating links in embed mode #10076).
    • Quota modal
    • Create user modal
    • Edit user login modal
    • Add/remove users to/from groups modal
    • Create group modal
    • Create shortcut modal
    • Readme content modal
  • Establish pattern for onConfirm/onCancel handling
    • Establish clean pattern to replace the buttons while still leveraging the onConfirm handling
    • Close modal automatically when onConfirm successfully returns/resolves
    • Show progress indication while promise has not returned (and disable button)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Technical Technical ehancements
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant