Skip to content
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

Merged
merged 9 commits into from
Jul 24, 2018

Conversation

giladgray
Copy link
Contributor

@giladgray giladgray commented Jul 23, 2018

  • fix the transitions! add the push/pop class to the TransitionGroup so it changes the entire active transtition.
  • refactor example: move stack list to options sidebar.
  • refactor styles: remove half the classes, leverage existing components (like a minimal button for "back")

cc @kadhirvelm

@blueprint-bot
Copy link

Classes.PANEL_STACK

Preview: documentation | landing | table

@blueprint-bot
Copy link

fix tests

Preview: documentation | landing | table

@blueprint-bot
Copy link

no stack limit

Preview: documentation | landing | table

@blueprint-bot
Copy link

back button nowrap

Preview: documentation | landing | table

Copy link
Contributor

@kadhirvelm kadhirvelm left a 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}>
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@giladgray giladgray merged commit 0d006ad into km/panel-stack Jul 24, 2018
@giladgray giladgray deleted the gg/panel-stack-touchup branch July 24, 2018 00:27
giladgray pushed a commit that referenced this pull request Jul 30, 2018
* 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants