question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[MDCDrawer] Add build-in support for change drawer type at runtime

See original GitHub issue

Feature Request

Hello. I’am working on a app that should be adapted depending of the user’s screen size. It uses a Drawer to show the navigation menu. The problem is the following: if I use a Modal Drawer, the user needs to click on the menu button to open it when he’s in a large screen. Mobile users don’t have this problem. To solve the problem, I can use a Dismissible Drawer, but it’s not designed to mobile devices.

Is it possible to add a new element (like Responsive Drawer) that changes depending on the screen size? Or there’s a easy way to change the type of Drawer using css @media? The Material Design specification says that “[Modal Drawer] can be replaced by standard drawers on tablet and desktop”, but it is not easy to do in web (or I don’t know how).

Proposed solution

IMHO, adding a new type of Drawer is the easier solution. It’s a good idea to add a section in the Drawer Web Component to help developers, showing a way to use a “responsive” drawer that adapts itself depending of the screen.

The #590 issue is similar to this, but it doesn’t show a clear solution to the problem.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
abhiomkarcommented, Jun 13, 2019

Thanks for the suggestion Manuel!

Please see example on Glitch for responsive drawer: https://glitch.com/~material-responsive-drawer

We can link this example to our drawer README file, since this is requested frequently.

PR Welcome 😃

1reaction
youbet1980commented, Aug 2, 2020

Quite a few MDC components were never made for html such as the bottom icons. I’m not sure if something else has taken over instead of this like flutter and we should learn that instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Synchronizing two MDC drawers - Stack Overflow
Can I link the two drawers such that selection on one will change the state of the other (especially without triggering events on...
Read more >
Configuring a Cash Drawer - Oracle Help Center
Select the Enterprise, click Configuration and Roles. Select the role type, click Operations and Miscellaneous. Select the appropriate options for cash drawer ......
Read more >
Cash Drawer Management | Square Support Center - US
Add a drawer description to help identify your cash drawer during a session. From the navigation bar at the bottom of your screen,...
Read more >
How to Balance a Cash Register Drawer like a Pro - Lightspeed
Balancing your cash register is not like balancing a checkbook. Find out how to keep your business in check and manage your cash...
Read more >
Shift and cash drawer management - Commerce | Dynamics 365
Typical shift scenarios. Commerce provides several configuration options and POS operations to support a wide range of end-of-day business ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found