-
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
feat: Update sidebar, fix mobile responsiveness #5209
Conversation
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
…unctions Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
…AppBars Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
@rymorgan @cassytaylor Sort order for items:
|
import Typography from "@material-ui/core/Typography"; | ||
import withStyles from "@material-ui/core/styles/withStyles"; | ||
import MenuIcon from "mdi-material-ui/Menu"; | ||
import { UIContext } from "../../context/UIContext"; |
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 like this is something that will be used all over the app, should we do some sort of alias for UIContext
?
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.
Maybe, but all of these dashboard components needs to be pulled out of this app a component library. Also, this context is not to be used as a MobX store to store random data. It's only meant for basic UI state to ensure the components for the operator-ui function where ever they may live.
For now, my logic is, only use this context for components of the operator experience (sidebar, main AppBars, core layouts, etc). Don't make use of this context in your components in other packages. Make a component in the in /imports/client/components
that makes use of the context. At least until this is in a better home.
{({ isMobile, isPrimarySidebarOpen, onTogglePrimarySidebar }) => { | ||
const toolbarClassName = classNames({ | ||
// Add padding to the right when the primary sidebar is open, | ||
// only if we're on desktop. On Mobile the sidebar floats over |
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.
lowercase mobile
"container": { | ||
display: "flex" | ||
}, | ||
"leftSidebarOpen": { | ||
paddingLeft: 280 + (theme.spacing.unit * 2) |
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.
Same as other comment, we should make 280
a variable
import Typography from "@material-ui/core/Typography"; | ||
import withStyles from "@material-ui/core/styles/withStyles"; | ||
import { i18next } from "/client/api"; | ||
import PrimaryAppBar from "../../../../../client/ui/components/PrimaryAppBar/PrimaryAppBar"; |
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.
Can we make this "/imports/client/ui/components/PrimaryAppBar
instead of all the ..
's?
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.
@reactioncommerce/design @mikemurray Should there be some sort of down arrow here? It took me a few seconds to realize this was a drop down menu, I initially thought that the other settings hadn't loaded correctly.
This could be because I'm so used to the old version though.
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.
A few very minor comments, overall this looks / works great!
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
Signed-off-by: Mike Murray <hellomikemurray@gmail.com>
@kieckhafer I don't think it needs it. There are only a few links on the top level, and you'll know when it's open once you see all of the nested items. Also, this is an evolution of the menu, but the revolution may end up moving those options to their own menu altogether. I defer to what @reactioncommerce/design ultimately wants though. |
@kieckhafer ready for a re-review |
Impact: minor
Type: feature
Issue
Solution
Breaking changes
uiState.isLeftSidebarOpen
renamed touiState.isPrimarySidebarOpen
.Testing