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.

[Feature request] Dialog width/max-width enhancements

See original GitHub issue

I suggest the following tweaks to the dialog component:

  1. Make max-width default to ‘none’ (i.e. remove it) instead of 290px
  2. Set default width to ‘auto’

What will it allow you to do that you can’t do today?

Currently, if you don’t specify the max-width prop the dialog will span the entire screen (100% width). Imho it would be more appropriate to leave the default width at ‘auto’ so it fits the content and not set a max-width explicitly.

If the user wants a full width dialog, they should use the full-width prop which should append a class dialog--full-width to the dialog element. Currently, this prop is not working as intended I believe as it targets the wrong element (see). (this might justify a separate bug report)

How will it make current work-arounds straightforward?

It is cumbersome to create dialogs that stretches to its content with the current model. max-width has to be set to ‘none’ and you need to use a custom class to override the width on the dialog.

What potential bugs and edge cases does it help to avoid?

I believe most users expect the dialog to fit the content and not stretch 100% by default. This fix will make usage of the dialog component more straightforward.

What do you think?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
dwp4gecommented, Mar 25, 2019

.v-dialog { width: unset; }

2reactions
michitarocommented, Nov 21, 2018

Is it possible to make a dialog with size fitting its content? A VDialog spans 100% width even if width and max-width are omitted as this snippet.

https://codepen.io/michitaro/pen/yQpvOM

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building a dialog component - web.dev
My goal here is to constrain the max-inline-size to a readable size ( --size-content-3 = 60ch ) or 90% of the viewport width....
Read more >
Increase save dialog text width for long filenames (Mac OS)
Discussed this with Default Folder developers that Mac OS system dialog box's text width cannot be modified.
Read more >
Adjusting dialog container width - Pega
Create cases more conveniently and gain more working space by adjusting the width of the underlying modal dialog box. By default, the tertiary...
Read more >
Grid column min and max width
I would like to be able to set Min Width parameter to a Grid Column. The behavior I expect to see is: The...
Read more >
Dialog width material-ui next - Stack Overflow
Add two props fullWidth and maxWidth="md" in your Dialog component like this : <Dialog {...your_other_props} fullWidth maxWidth="sm" > ...
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