-
Notifications
You must be signed in to change notification settings - Fork 355
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
Component - Modal #59
Comments
@kahowell please feel free to start this. I agree with your assessment of the Cockpit implementation - it looks a bit dated now with the direct dom access / adding document event listeners. There are APIs for adding event listeners now in React (see the Notification List in this repo for example). Also the use of My guess is this can be simplified a lot using something like React Bootstrap's implementation here: Also, we will have to look into the accessibility of this component (ensuring we support escape key to close, tab selection, etc.) Let me know if you have any questions or if i can help in any way! |
FWIW, i am not tied to React Bootstrap implementations directly, but see them as good examples. We can choose to extend them (using inheritance), or reimplement them. Reimplementation may prove easier in the long term when we upgrade to Bootstrap4 though. |
@priley86, no, we ended up just using the cockpit dialog widget for now, but we'll happily swap it out when possible; once a PR is up, I'm happy to try it out and give feedback. |
@kahowell awesome! I will report back soon... |
In our efforts to port the subscriptions cockpit UI from the cockpit repo, we have need of a modal dialog. It was relatively easy to simply copy the cockpit implementation into our repo and tweak (for now), but it'd be awesome if we could consume from patternfly-react instead.
See https://github.com/cockpit-project/cockpit/blob/c04c148225c59d2f053300d80b6b4731e421b8e6/pkg/lib/cockpit-components-dialog.jsx the cockpit implementation
See candlepin/subscription-manager#1716 for how we're integrating the cockpit-derived widget at the moment.
I'm not sure that the widget as currently written fits well with patternfly-react standards... there's some awkward DOM manipulation. I think a new, clean implementation might be a better fit; otherwise I'm happy to start a PR loosely based on the cockpit dialog implementation (after making sure cockpit devs are okay w/ that, etc). Thoughts?
The text was updated successfully, but these errors were encountered: