-
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] merge some files #2719
Conversation
* The title to be displayed above this panel. It is also used as the text | ||
* of the back button for any panel opened by this panel. | ||
*/ | ||
title?: React.ReactNode; |
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.
❗️ widened type here to support any JSX
example keyPreview: 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.
Two tiny style things, not critical by any means
/** | ||
* Callback invoked when the user presses the back button or a panel wants to close the visible panel. | ||
* Callback invoked when the user presses the back button or the | ||
* `closePanel()` injected prop method is invoked. |
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.
Small grammatical fix: "...back button or invokes the closePanel()
injected prop method."
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.
but the user doesn't invoke the method
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.
Yeah that's fair, I was trying to match the present simple tense from "user presses"
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.
Actually I think it's mostly fine. Can you add an "either" before "the user" to more clearly separate the clauses?
minimal={true} | ||
small={true} | ||
text={this.props.previousPanel.title} | ||
onClick={this.props.panelProps.closePanel} |
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.
Probably want to alphabetize the onClick
here
safeInvokePreview: documentation | landing | table |
* 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"
cc @kadhirvelm
PanelHeader
intoPanelView
panelProps.ts
ReactNode
instead of just string