-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix: Scrollable dialog #411
Conversation
47cfafc
to
e7d0eb1
Compare
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.
Reviewed 1 of 1 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jonasnobile)
packages/ui/src/styles/components/dialog.sass
line 38 at r2 (raw file):
animation: #{$cui-conf-globalPrefix}dialogIntroIn .2s .1s forwards max-height: 100% overflow-y: auto
This change seems to have no unnecessary side effects. However,... it way more safer not to have Dialog
s direct responsibility solving overflow caused by unknown children. Moreover, the margin: 1em
would cause children to look weirdly cropped, scrolling would hide the action buttons under the fold.
Solution would be to wrap dialog children with DialogModal
, add overflow: auto
rule to div with .cui-dialog-modal-body-wrapper
class. This solution solves overflow needs but also protects important header/footer to be hidden when scrolled away.
Are you sure this change is necessary and you cannot use the DialogModal
ui component?
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @attitude)
packages/ui/src/styles/components/dialog.sass
line 38 at r2 (raw file):
Previously, attitude (Martin Adamko) wrote…
This change seems to have no unnecessary side effects. However,... it way more safer not to have
Dialog
s direct responsibility solving overflow caused by unknown children. Moreover, themargin: 1em
would cause children to look weirdly cropped, scrolling would hide the action buttons under the fold.Solution would be to wrap dialog children with
DialogModal
, addoverflow: auto
rule to div with.cui-dialog-modal-body-wrapper
class. This solution solves overflow needs but also protects important header/footer to be hidden when scrolled away.Are you sure this change is necessary and you cannot use the
DialogModal
ui component?
I'm not using any UI component alone. I've discovered this bug thanks to SelectField
createNewForm feature. Is it possible to use DialogModal
instead of Dialog
in SelectField
component?
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jonasnobile)
packages/ui/src/styles/components/dialog.sass
line 38 at r2 (raw file):
Previously, jonasNobile (Jonáš Nobile) wrote…
I'm not using any UI component alone. I've discovered this bug thanks to
SelectField
createNewForm feature. Is it possible to useDialogModal
instead ofDialog
inSelectField
component?
By SelectField
you mean the [+]
button of select-or-create feature? Anyways I see no reason why the DialogModal
could not be used to wrap children inside the Dialog
(not instead).
Could you try wrapping the create children of the dialog with DialogModal
instead to fix your issue?
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @attitude)
packages/ui/src/styles/components/dialog.sass
line 38 at r2 (raw file):
Previously, attitude (Martin Adamko) wrote…
By
SelectField
you mean the[+]
button of select-or-create feature? Anyways I see no reason why theDialogModal
could not be used to wrap children inside theDialog
(not instead).Could you try wrapping the create children of the dialog with
DialogModal
instead to fix your issue?
Dialog with DialogModal
looks visually better, but didn't solve overflow problem.
Scroll inside dialog when content is longer than viewport.
120d546
to
9dffa8e
Compare
407c53f
to
decbe4d
Compare
Scroll inside dialog when content is longer than viewport.
This change is