-
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] refactors & fix transitions #2717
Conversation
Classes.PANEL_STACKPreview: documentation | landing | table |
fix testsPreview: documentation | landing | table |
no stack limitPreview: documentation | landing | table |
back button nowrapPreview: 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.
All the refactors look great! Just a tiny thing about a proper unique key
key={activePanel.title + "_" + stack.length} | ||
timeout={100} | ||
> | ||
<CSSTransition classNames={Classes.PANEL_STACK} key={stack.length} timeout={400}> |
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.
I think we said the stack length wasn't a good enough key? Is it worth adding the activePanel.title back in here, or finding a better unique key?
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 seems to work just fine. i am strongly against putting arbitrary user input (like props) in the key.
* 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"
TransitionGroup
so it changes the entire active transtition.cc @kadhirvelm