-
Notifications
You must be signed in to change notification settings - Fork 2
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 modals from Tobira #5
Conversation
Adds the "Modal" component from Tobira. The component is ported with the minimum amount of required changes. Translations string will have to be provided in their translated form.
Adds another button component from Tobira, with the goal of using it in the confirmation modal from Tobira. The button can be normal, happy or danger.
As how it is in Tobira.
Adds a nice little error box from Tobira to render errors in. Also adds the card component which is required for that. Used by confirmation modal.
Adds the confirmation modal from tobira
Added missing colors, changed unused colors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making these available in appkit!
I left some comments of things I think should be changed still. Regarding the translations: I think its fine just passing all strings to the component for now. Figuring out how to get i18next into appkit and make it work nicely when included in an app... is too much work now. The vast majority of duplicate code will already be eliminated by this.
As suggested by @LukasKalbertodt. Thanks.
It is not necessary.
Move code over to button.tsx
Optional, defaults to "currentcolor".
Based on the advice by @LukasKalbertodt
We should not rely on a hook in a function working, so better let the calling component pass it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more things with the colors. But then it's ready I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go now! Thanks again, for doing what turned out to be much more work than expected. Thanks colors!!
Fixes an issue with the upload subtitle button, where the automatic browser dialog used by the button would "time out", failing to open up the subsequent file dialog. This replaces it with a confirmation modal from appkit. WARNING: Requires opencast/appkit#5 to be merged and released!
Adds
Modal
andConfirmationModal
components and their types to appkit. Also adds a bunch of other stuff from Tobira thatConfirmationModal
in particular requires.Additionally:
Spinner
component.Points to consider: