-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
React Native collapsible OnDeviceUI navigation #1544
Merged
shilman
merged 8 commits into
storybookjs:release/3.2
from
rmevans9:on-device-ui-tweaks
Jul 30, 2017
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9cb655a
Tweak the UI to make the menu not so intrusive
rmevans9 feb86f3
Add animations to the open/close of the menu
rmevans9 2c095c2
Add a overlay over the preview window when the menu is open that is t…
rmevans9 80b9015
Add images instead of text for buttons.
rmevans9 79deb67
Style the buttons a little better
rmevans9 f425d2f
Updates
rmevans9 d6c2128
Android fixes + design change
rmevans9 bcb4db8
Hide the statusbar for now to avoid an ackward situation in landscape
rmevans9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
151 changes: 137 additions & 14 deletions
151
app/react-native/src/preview/components/OnDeviceUI/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need to subscribe for stories being added? Or will added stories become updated in
props.stories
and lead to a re-render?Update: Deferred to #1547
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.
Honestly not sure. The subscription setup was actually setup by someone else. This PR is just changing the UI to be more giving on space available to the preview section. I can work on cleaning this up in a follow up PR
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.
The original component received added stories through event emissions -- I think we may want to subscribe to those here too, or otherwise the sidebar may not update as stories become added. cc @shilman or @ndelangen -- do Preview components receive additional stories on
props.stories
over time? Or are subscriptions neededThere 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.
@ajwhite right now in
examples/react-native-vanilla
it appears the stories don't update in the browser OR in the OnDeviceUI when I modify the story code. I'm not sure if this is a bug in my setup or whether something is broken in@storybook/react-native
or just the example...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.
Okay - sounds like something we can come back to and keep the scope of this PR narrow 👍
Opened #1547, can probably tackle once I'm back in Boston on Tuesday.