-
Notifications
You must be signed in to change notification settings - Fork 34
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
modal-ify config #108
modal-ify config #108
Conversation
sorry for the delay. i’m thinking it would be best to have ok and cancel buttons like the other modal dialog instead of just a close box - that of course means that changes to settings must be held until confirmation. ...otherwise this looks like a great (haven’t looked at the code yet) |
No problem! I can follow the other modals in terms of their closing and saving behavior. I can also maintain the configs internal state until save. I also need to check responsiveness I forgot to do that. Thanks for the feedback! |
If you guys want I could abstract the modal functionality into a single component that we could inject inner HTML into so that we always have consistent functionality by default with modals. |
@anthonybarsotti I believe there's a component that I can inject as the direct child of the modal and pass some props to to keep things consistent right now: https://github.com/monome/maiden/blob/master/app/src/modal-content.js In usage: Line 206 in 4a0562b
The config view itself can then be injected as a child of the ModalContent component, I think. I didn't see Do you think this plan makes sense? If you think there might be some benefits to taking a different approach, I'm happy to hold off on the plan above. Not picky about the implementation! |
@ngwese it now uses the standard save/cancel behavior of other modals, as well as does not persist the state until the save button is clicked. I used this pattern to be able to have the save function encapsulated within the config activity file, while calling it with the ModalContent standardized save button: kriasoft/react-starter-kit#909 |
@jlmitch5 thanks for taking a second pass at this. i took a quick pass to resolve the conflicts this has with the current state of |
@ngwese rebased on latest master (and apologies for the delay) |
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.
After a super long delay I've tested this and it looks okay. There are some unused imports that it leaves around but I'll fix those up myself.
link #87
config now in modal!