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

Allow dialog contents to grow #183161

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/vs/base/browser/ui/dialog/dialog.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
/** Dialog: Message Container */
.monaco-dialog-box .dialog-message-row .dialog-message-container {
display: flex;
flex: 1; /* let the dialog message contents grow */
Copy link
Member

Choose a reason for hiding this comment

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

This lets the message area grow with the box, but the way it works right now is to grow with the conent. I'm not sure this change is necessary as I would expect the input to define that. E.g. all of the current text divs grow with long text until they cannot and then they wrap. Shouldn't this just be a a div with text stylized like an input? Side note, I noticed I can edit the text in the input when testing. Is that expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't this just be a a div with text stylized like an input

The input api is designed for requesting passwords and other kinds of text input, so generally it needs to be editable. For my scenario I don't need it to be editable, but I do want that the user can keyboard-nav through the text to see its contents in full, and I get that for free by using the input dialog. I don't think there is a way for the input element to specify that it should grow with its contents using CSS attributes alone though.

flex-direction: column;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
Loading