-
-
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
[feature] Add mobile navigation menu #908
Conversation
Font has to be at least 1rem so it doesn’t zoom in mobile safari. Also the clear button should focus back to the input when clicked
Resolves PR issue that was raised about duplicated code
@ndelangen @usulpro this should be back up and running now against the monorepo 🎉 . I've also deployed an example here: https://example-pzrtwcexit.now.sh Please let me know if you have any questions. |
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 you think the filter should stay visible at all times?
I think it might be better if it was inside the collapse / expand region, so you can filter only when it's expanded..
Is this something you can do? I think we can merge this either way!
Thank you so much for taking the time and effort @ajfuller ❤️ |
@ndelangen that makes sense, I'll make that change and fix the additional lint errors |
…navigation # Conflicts: # packages/storybook-ui/.scripts/mocha_runner.js # packages/storybook-ui/package.json # packages/storybook-ui/src/modules/ui/components/layout/index.test.js # packages/storybook-ui/src/modules/ui/components/left_panel/index.test.js
@ndelangen I tried pulling in the latest master branch but it looks like the Jest changes may be causing some test failures (https://travis-ci.org/storybooks/storybook/builds/222999766) Any suggestions? |
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.
@ajfuller first, thanks so much for the contribution. This is a great feature!
To fix the test issues, I think you need to update from master and resolve conflicts. Your branch is missing later changes regarding lerna bootstrap
in package.json
among other things. when I updated there were only a few test errors left, and I believe they are related to this change.
# update from master and manually resolve conflicts
npm install
npm run bootstrap
npm test
Hope that helps!
@@ -0,0 +1,122 @@ | |||
import React, { Component, PropTypes } from 'react'; |
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 React.PropTypes
is deprecated. Should be import PropTypes from 'prop-types'
across all changes AFAIK?
Thanks @shilman, I'll try to get this rebased against master tomorrow and let you know! |
…navigation # Conflicts: # package.json # packages/storybook-ui/package.json # packages/storybook-ui/src/modules/ui/components/layout/index.js
…navigation # Conflicts: # packages/storybook-ui/package.json # packages/storybook-ui/src/modules/ui/components/layout/index.js
Pulling in all of the project changes since I first started this branch seem to really have screwed everything up. I may just close this and cherry-pick the changes back on top of master. |
Codecov Report
@@ Coverage Diff @@
## master #908 +/- ##
===========================================
- Coverage 26.72% 12.35% -14.37%
===========================================
Files 192 196 +4
Lines 4427 4638 +211
Branches 707 735 +28
===========================================
- Hits 1183 573 -610
- Misses 3244 3413 +169
- Partials 0 652 +652
Continue to review full report at Codecov.
|
@ajfuller Thank you for your efforts to implement this truly necessary feature! I really like this and I would like to make a few suggestions:
You're adding the new layout for mobile devices here and switching to it when media query matches
What can we do:
I actually have no objection to media queries but I'd like to offer another approach to handle them. What can we do: How do you think, could we implement this? I'd happy to help in any case. And it' still my thoughts. Maybe someone in @storybooks/team have objections or better ideas for this? |
I need to rebase this |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. We do try to do some housekeeping every once in a while so inactive issues will get closed after 90 days. Thanks! |
What I did
MobileLayout
andDesktopLayout
to render the appropriate containers and styleshref
to the anchor tags, this allows them to be keyboard focusable, specifically when tabbing through the interface.UX note
I increased the font size of filter input from 14px to 1em (equivalent of 16px). Without this it would cause an unwanted page zoom when focused on the input. I've adjusted the appropriate height and close button styles to reflect appropriately.
Future improvements
For a future PR would there be any interest in moving to
styled-components
,glamorous
,jsxstyle
,fela
, etc? Working with purely inline styles is fairly limiting.How to test
Deployed the
example
application with now.sh to:https://example-pzrtwcexit.now.sh