Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upprevent Dialog from being uncloseable with long text #8475
Conversation
|
@cezaraugusto @bradleyrichter Can we consider making only the body text scrollable (when it hits a max-height), so the dialog button is always visible? Making the user scroll down to dismiss the dialog seems unnecessary. |
|
Personally I wouldn't go with a full width (90%), but limit it to I don't know maybe max 300, 400px (completely random number from the top of my head |
|
@jonathansampson that's a great idea. I'll wait for design feedback from Brad and do all together, thanks for reviewing |
|
@NejcZdovc thanks, yep I did a random guess as well |
|
Agree with @NejcZdovc that we need a max-width, or a fixed-width. |
|
+1 unless the title could be so long that it would overflow the dialog. |
| '::-webkit-scrollbar-thumb': { | ||
| background: globalStyles.color.braveOrange, | ||
| // same as primary button | ||
| boxShadow: '0px 1px 5px -1px rgba(0, 0, 0, 0.5)', |
This comment has been minimized.
This comment has been minimized.
luixxiul
Apr 25, 2017
Contributor
let's replace the box-shadow with a variable on global.js for future use :-)
| borderRadius: '4px' | ||
| }, | ||
| '::-webkit-scrollbar-track': { | ||
| boxShadow: 'inset 0 0 4px rgba(0,0,0, 0.3)', |
This comment has been minimized.
This comment has been minimized.
|
+++
… On Apr 25, 2017, at 3:51 AM, Suguru Hirahara ***@***.***> wrote:
@luixxiul commented on this pull request.
In app/renderer/components/styles/commonStyles.js:
> + top: globalStyles.spacing.dialogTopOffset,
+ // Issue #7930
+ overflowY: 'auto',
+ overflowX: 'hidden',
+ maxWidth: '90%',
+ maxHeight: '90%',
+ boxSizing: 'border-box',
+
+ // Add a custom scrollbar for the element
+ '::-webkit-scrollbar': {
+ width: '10px'
+ },
+ '::-webkit-scrollbar-thumb': {
+ background: globalStyles.color.braveOrange,
+ // same as primary button
+ boxShadow: '0px 1px 5px -1px rgba(0, 0, 0, 0.5)',
let's replace the box-shadow with a variable on global.js for future use :-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
771c65c
to
633987e
|
Updated, set a smaller size and migrated scroll to body |
|
Isn't the scroll bar too low contrasted? |
|
contrast looks good for me but I don't mind changing it |
|
@cezaraugusto Looks really great! Can we do anything about making sure it isn't taller than the window? |
|
Everything looks good, and works well. I had one suggestion to further improve, but I still think this is ship-ready. |
| @@ -154,7 +158,10 @@ const styles = StyleSheet.create({ | |||
| marginTop: globalStyles.spacing.dialogInsideMargin, | |||
| minWidth: '425px', | |||
| marginBottom: globalStyles.spacing.dialogInsideMargin, | |||
| userSelect: 'text' | |||
| userSelect: 'text', | |||
| maxHeight: '300px', | |||
This comment has been minimized.
This comment has been minimized.
luixxiul
Apr 27, 2017
•
Contributor
what if we would apply vh instead of px? 300px might be small for full HD monitors. Please see about:error page for examples.
This comment has been minimized.
This comment has been minimized.
jonathansampson
Apr 27, 2017
Collaborator
Oh, good idea @luixxiul with vh. Since dialogs are pretty much always sized and positioned relatively to the viewport, it makes sense to use vh and vw. What do you think, @cezaraugusto?
This comment has been minimized.
This comment has been minimized.
cezaraugusto
Apr 27, 2017
Author
Contributor
that's great, I took a look at other browsers and they take that approach as well. Maybe 80vh is good enough?
| // Issue #7930 | ||
| boxSizing: 'border-box', | ||
| maxWidth: '600px', | ||
| maxHeight: '500px' |
This comment has been minimized.
This comment has been minimized.
|
After some thought, I think it would be desirable to use the native scrollbar on each platform so that users recognize it as being a standard control used by the OS. |
|
PR updated with custom scrollbar removal. New STR and preview here: #8475 (comment) |
| @@ -110,7 +110,7 @@ const globalStyles = { | |||
| buttonHeight: '25px', | |||
| buttonWidth: '25px', | |||
| navbarHeight: '36px', | |||
| downloadsBarHeight: '50px', | |||
This comment has been minimized.
This comment has been minimized.
cezaraugusto
Apr 28, 2017
Author
Contributor
looking at the component and at variables.less it actually never was 50px
|
Just pulled down the changes; beautiful work, @cezaraugusto! |
|
Awesome work, @cezaraugusto! This looks and feels great |


cezaraugusto commentedApr 24, 2017
•
edited by luixxiul
git rebase -ito squash commits (if needed).Screenshot:


/cc @bradleyrichter for design review
Test Plan: