-
Notifications
You must be signed in to change notification settings - Fork 95
standardize modal sizes #2126
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
standardize modal sizes #2126
Conversation
fd8d14b to
633c98b
Compare
633c98b to
f279135
Compare
| .modal-container { | ||
| display: block; | ||
| overflow: hidden; | ||
| overflow: auto; // avoids unecessary hacks if the content should be bigger than the modal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I know, hence I've added the breaking label to the PR. But it is necessary to make this work reliably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're following SemVer then this would consitute a new major :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jep. Would it be 4.1.0 or 5.0.0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5.0.0 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added milestone 5.0.0 :)
f279135 to
23a045e
Compare
|
Thanks for the review @skjnldsv! |
c984924 to
08da173
Compare
08da173 to
2fbfd3d
Compare
|
I would like to get some more feedback on this from developers that already use modals in their apps. |
|
Less decision sounds good. :) Can you add some screenshots of different examples of modals for reference? |
Signed-off-by: szaimen <[email protected]>
2fbfd3d to
b8a64f9
Compare
|
stable4 branch created https://github.com/nextcloud/nextcloud-vue/tree/stable4 |
|
@szaimen @skjnldsv @marcoambrosini what do you think about folding the "Medium" and "Normal" into one size? I mean, the name is basically the same, so quite confusing. And then we only have small, medium, large and full – more obvious. :) The size could be something inbetween Medium and Normal. |
|
@jancborchardt there was already a change in the modal sizes here: #2170 (comment) I think having both sizes could be useful in some situations. But apart from that, merging medium and normal into one size in between is fine by me. |
|
@szaimen there also doesn’t really seem to be a difference between "prompt" and "small" except the height (which could simply adjust based on content, with a max-height)? |
| height: calc(100% - $header-size); | ||
| position: absolute; | ||
| top: $header-size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could have gone for
| height: calc(100% - $header-size); | |
| position: absolute; | |
| top: $header-size; | |
| height: auto; | |
| position: absolute; | |
| top: $header-size; | |
| bottom: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which imho is better than calc with $header-size :)
@szaimen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the result have been the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, will have an automated height and span from top to bottom since this is absolute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me then :)





Currently, there are many open points regarding modal sizes that each developer needs to decide and implement. This leads to unecessary code duplication, maintenance effort and inconsistent UI because each developer implements the sizing differently. Hence here is my proposal to standardize the modal sizes completely.
It also includes always using full screen modal on mobile which is the superior experience on mobile, imho.
Signed-off-by: szaimen [email protected]