Skip to content

Fixing bug dialog content does not grow fully to take up all the space provided by parent#4374

Merged
micahgodbolt merged 3 commits intomicrosoft:masterfrom
serkan-inci:master
Apr 3, 2018
Merged

Fixing bug dialog content does not grow fully to take up all the space provided by parent#4374
micahgodbolt merged 3 commits intomicrosoft:masterfrom
serkan-inci:master

Conversation

@serkan-inci
Copy link
Copy Markdown
Contributor

Pull request checklist

Description of changes

Added width:100% to the dialog content.

@dzearing
Copy link
Copy Markdown
Member

dzearing commented Mar 28, 2018

I am nervous without seeing the impact of this change. Screener likes this though, so that's good.

@joschect, @MLoughry, @Jahnp as an fyi. Is there someone in OneDrive or Outlook using dialog that can make sure they are ok with this?

@MLoughry
Copy link
Copy Markdown
Contributor

MLoughry commented Mar 28, 2018 via email

@serkan-inci
Copy link
Copy Markdown
Contributor Author

The issue is parent container specifies display: flex but content doesn't specify any flex value. I was initially thinking to have flex-grow: 1 but width: 100% seems a more generic solution in case someone overrides parent display to something other than flex.

And as @MLoughry mentioned, parent also specifies a constant width.

@dzearing

@dzearing
Copy link
Copy Markdown
Member

If we made it display: block rather than flex, it would also fix. I wonder what the reasoning for flex was.

@serkan-inci
Copy link
Copy Markdown
Contributor Author

@jordandrako Can you suggest what should be the right fix here since you initially added display: flex to Dialog?

@jordandrako
Copy link
Copy Markdown
Contributor

Dialog was already display: flex before I converted it to mergeStyles. It seems @micahgodbolt changed it to flex about a year ago. serkan-inci@26f605d

@micahgodbolt
Copy link
Copy Markdown
Member

flex has better support for vertical centering, which you can see above that flex change.

@serkan-inci
Copy link
Copy Markdown
Contributor Author

OK, thank you all for the responses. Can you suggest a better fix then or should we go with this one?
This bug is effecting multiple dialogs in our product.

@micahgodbolt
Copy link
Copy Markdown
Member

micahgodbolt commented Mar 29, 2018

Your fix is fine. I was just noting why we used flex in the first place. I feel the best solution is to use flex-grow. The intention is that the content takes up all of the extra space of the dialog. If someone changes the styles to block, the flex-grow will be meaningless (which is good).

i.e. I'd rather have a combination of connected css values with a specific intention.

TL:DR => lets go with flex-grow: 1 as that indicates proper intention.

@serkan-inci
Copy link
Copy Markdown
Contributor Author

Thanks Micah, done.

@micahgodbolt

@serkan-inci
Copy link
Copy Markdown
Contributor Author

Can we get this merged if you're OK with the fix? We are about to move to a newer version and want this issue fixed. Thanks.

@dzearing @micahgodbolt

@micahgodbolt micahgodbolt merged commit 7f031f3 into microsoft:master Apr 3, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dialog] Content does not grow fully to take up all the space provided by parent

5 participants