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

Add a Mobile Nav to the Network Explorer #895

Merged
merged 21 commits into from Nov 12, 2021
Merged

Add a Mobile Nav to the Network Explorer #895

merged 21 commits into from Nov 12, 2021

Conversation

Aid19801
Copy link
Contributor

This PR seeks to implement a responsive full-screen nav for the Network Explorer.

CLOSED:
As a user i expect:
✅ - to NOT see a minimised sidebar, like the one we see on Desktop.
✅ - to see a hamburger in the top right of the screen (AppBar) to prompt user to open menu

BEHAVIOUR:
As a user i expect:
✅ - to see the menu slide out when i tap the Hamburger
✅ - to see the menu slide back when i tap the in-menu collapse icon

OPEN:
As a user i expect:
✅ - to see the expected nav options (Overview, Network Components [mixnodes, gateways, validators] and Nodemap)
✅ - to be able to expand the Network Components to reveal the child options/routes.

explorer/src/components/MobileNav.tsx Outdated Show resolved Hide resolved
explorer/src/components/MobileNav.tsx Outdated Show resolved Hide resolved
@@ -29,5 +29,12 @@ div div.MuiDataGrid-root .MuiDataGrid-columnHeaderTitleContainer {
/* Unable to style nested MUI paper within the Drawer
so styling manually here */
div.MuiDrawer-root > .MuiDrawer-paperAnchorLeft {
background-color: #111826;
background-color: #242C3D;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try paper props on the Drawer - https://mui.com/api/drawer/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got some TS issues but actually managed to get around them by using nested sx styling. Happy to re-explore if you think its necessary...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorted.

explorer/src/components/MobileNav.tsx Outdated Show resolved Hide resolved
}
if (!nested && isMobile) {
fixDrawerClose();
fixDrawerClose?.();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

open={drawerIsOpen}
sx={{
background: theme.palette.nym.networkExplorer.nav.background,
// border: '1px solid skyblue',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code

@jstuczyn jstuczyn merged commit 50cd18a into develop Nov 12, 2021
@jstuczyn jstuczyn deleted the mobile-nav branch November 12, 2021 16:14
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.

None yet

3 participants