-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[PanelStack] use IPanel in openPanel() public API #2738
Conversation
PanelView onClose/Open props skips getPanelProps() stepPreview: documentation | landing | table |
fix testsPreview: documentation | landing | table |
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.
One tiny thing, not major though
safeInvoke(this.props.onClose, panel); | ||
this.setState(state => ({ | ||
direction: "pop", | ||
stack: state.stack.filter(p => p !== panel), |
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.
Can we not slice(1)
here again? If the panel is not at the top of the stack, it won't get here either way?
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.
it's not necessarily at the top inside this callback as it's async. the filter is ultimately the most robust check.
* Added panel stack * First test integrated * Tests added * Transitions adjusted * Updated readme * Made lower case * Dark theme added * Linting fixed * Review items fixed, transitions reverted * Removed extra panelClassName * _panel-stack.scss * minor docs * updated tests * Tests adjusted and fixed * [PanelStack] refactors & fix transitions (#2717) * fix the transitions! * example refactor: move stack to options bar * lint example * refactor header styles to use fewer classes * Classes.PANEL_STACK * fix tests * style fixes, simpler transition * no stack limit * back button nowrap * Adjusted transition to include opacity and -50% left movement * Removed useless type checking * Fixed opacity * Opacity * Opacity flipped * Removed 0 * Reversed opacities * One more attempt * [PanelStack] merge some files (#2719) * merge PanelHeader into PanelView * panelProps file with more docs * panelProps.ts * export panelProps, more docs * example key * docs * safeInvoke * changed easing settings * fix copyrights * onClose/Open param names * [PanelStack] use IPanel in openPanel() public API (#2738) * openPanel accepts IPanel instead of three args * PanelView onClose/Open props skips getPanelProps() step * fix tests * remove IPanelPptions * [PanelStack] documentation (#2737) * PanelStack docs * more docs refactors * adjust docs-modifiers margins * remove "pop the stack"
openPanel
accepts IPanel instead of three args.-this is more future-proof as we can update the one interface in non-breaking ways and see benefits everywhere, whereas changing the signature of the function would be breaking.
PanelView
onClose/Open
props cleans up thePanelStack
logiccc @kadhirvelm