-
Notifications
You must be signed in to change notification settings - Fork 704
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
feat(UI): Improve split button styling #10027
feat(UI): Improve split button styling #10027
Conversation
bfb47c3
to
11a8e52
Compare
.jsdialog.unotoolbutton.selected:hover { | ||
background-color: var(--color-background-darker) !important; |
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 move the responsability of the background-color
to the children since a button could have 2 parts
} | ||
|
||
.unoarrow::after, | ||
.jsdialog .ui-content.unobutton::after { |
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.
I extended a little bit the click zone so that the border of the button could be clickable
@@ -37,6 +37,7 @@ describe(['tagdesktop', 'tagnextcloud', 'tagproxy'], 'Delete Objects', function( | |||
}); | |||
|
|||
it('Delete Chart' , function() { | |||
cy.cGet('#toolbar-up > .ui-scroll-right').click(); | |||
cy.cGet('#toolbar-up > .ui-scroll-right').click(); |
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.
The menu is a bit wider now, so we need to click twice for the icon to appear.
I see no problem with the JS code thanks! @pedropintosilva will you find a minute to review the new look of split button? |
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.
thanks @maks-w ! It looks much better, well done 👏
Before we can merge this it would be good to understand why we are forgoing the --btn-size
CSS var. That was a nice way to not only make sure all icon buttons share the same size but also to allow adjusting them in one single place. With the current changes we are never sure about the resulting size.
Also the pseudo elements in other buttons are being affected (not only arrows). Example the save icon in the tabbed bar (when it receives the .savemodified
class. Meaning when the user types and there are changes ready to be saved)
@@ -2760,8 +2760,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ | |||
|
|||
if (typeof menubutton === 'object') { | |||
L.DomUtil.addClass(menubutton.container, data.class ? data.class + ' has-colorpicker': 'has-colorpicker'); | |||
|
|||
var valueNode = L.DomUtil.create('div', 'selected-color', menubutton.container); | |||
|
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.
can we remove this white space?
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.
done
a94014d
to
bbc6136
Compare
I pushed a new commit to restore this behavior. Some changes however, because of the padding, the button and the image are not the same size now, so there is a button size and an image size variable (the image size is computed, so there is still only 1 variable to change to change the size of the button). I took the liberty to reduce a little bit the size of the buttons, who seem a little too big (but perhaps I took it a step too far). Tell me what you think.
For the pseudo element, it seems to me that it is a good practice to extend a little bit the click zone of buttons in general; not just for the arrow button. I just noticed that some icons are blurry with the added padding :( |
please rebase, I think tests are failing due to old base |
5c0764e
to
0e351a6
Compare
it was broken after PR: #10027 I'm afraid I was not as clear as I could have been, sorry #10027 (review) What I mean is that it's very important to: * When fixing/improving the style of a given widget to avoid pushing additional changes that have a high risk of changing many things and bring regressions * I welcome those changes but in an isolated PR which can better tested and worked on :) * Changing sizes of buttons or let them be dynamically set according to the DOM is a bit hard and prone to problems Nevertheless this is an attempt to fix those while retain the nice work from Maks. Co-authored-by: Szymon Kłos <[email protected]> Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I2d6aa5113405aa32e06d45cfbfd1a623647f3121
it was broken after PR: CollaboraOnline/online#10027 I'm afraid I was not as clear as I could have been, sorry CollaboraOnline/online#10027 (review) What I mean is that it's very important to: * When fixing/improving the style of a given widget to avoid pushing additional changes that have a high risk of changing many things and bring regressions * I welcome those changes but in an isolated PR which can better tested and worked on :) * Changing sizes of buttons or let them be dynamically set according to the DOM is a bit hard and prone to problems Nevertheless this is an attempt to fix those while retain the nice work from Maks. Co-authored-by: Szymon Kłos <[email protected]> Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I2d6aa5113405aa32e06d45cfbfd1a623647f3121
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a
it was broken after PR: #10027 I'm afraid I was not as clear as I could have been, sorry #10027 (review) What I mean is that it's very important to: * When fixing/improving the style of a given widget to avoid pushing additional changes that have a high risk of changing many things and bring regressions * I welcome those changes but in an isolated PR which can better tested and worked on :) * Changing sizes of buttons or let them be dynamically set according to the DOM is a bit hard and prone to problems Nevertheless this is an attempt to fix those while retain the nice work from Maks. Co-authored-by: Szymon Kłos <[email protected]> Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I2d6aa5113405aa32e06d45cfbfd1a623647f3121
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a
it was broken after PR: #10027 I'm afraid I was not as clear as I could have been, sorry #10027 (review) What I mean is that it's very important to: * When fixing/improving the style of a given widget to avoid pushing additional changes that have a high risk of changing many things and bring regressions * I welcome those changes but in an isolated PR which can better tested and worked on :) * Changing sizes of buttons or let them be dynamically set according to the DOM is a bit hard and prone to problems Nevertheless this is an attempt to fix those while retain the nice work from Maks. Co-authored-by: Szymon Kłos <[email protected]> Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I2d6aa5113405aa32e06d45cfbfd1a623647f3121 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Issue that came up with its follow ups db10c453e95f732d85c489fe8da8708cec0ad09c CollaboraOnline/online#10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21
Due to db10c453e95f732d85c489fe8da8708cec0ad09c CollaboraOnline/online#10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a
it was broken after PR: #10027 I'm afraid I was not as clear as I could have been, sorry #10027 (review) What I mean is that it's very important to: * When fixing/improving the style of a given widget to avoid pushing additional changes that have a high risk of changing many things and bring regressions * I welcome those changes but in an isolated PR which can better tested and worked on :) * Changing sizes of buttons or let them be dynamically set according to the DOM is a bit hard and prone to problems Nevertheless this is an attempt to fix those while retain the nice work from Maks. Co-authored-by: Szymon Kłos <[email protected]> Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I2d6aa5113405aa32e06d45cfbfd1a623647f3121 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a Signed-off-by: Darshan-upadhyay1110 <[email protected]>
it was broken after PR: #10027 I'm afraid I was not as clear as I could have been, sorry #10027 (review) What I mean is that it's very important to: * When fixing/improving the style of a given widget to avoid pushing additional changes that have a high risk of changing many things and bring regressions * I welcome those changes but in an isolated PR which can better tested and worked on :) * Changing sizes of buttons or let them be dynamically set according to the DOM is a bit hard and prone to problems Nevertheless this is an attempt to fix those while retain the nice work from Maks. Co-authored-by: Szymon Kłos <[email protected]> Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I2d6aa5113405aa32e06d45cfbfd1a623647f3121 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a Signed-off-by: Darshan-upadhyay1110 <[email protected]>
it was broken after PR: #10027 I'm afraid I was not as clear as I could have been, sorry #10027 (review) What I mean is that it's very important to: * When fixing/improving the style of a given widget to avoid pushing additional changes that have a high risk of changing many things and bring regressions * I welcome those changes but in an isolated PR which can better tested and worked on :) * Changing sizes of buttons or let them be dynamically set according to the DOM is a bit hard and prone to problems Nevertheless this is an attempt to fix those while retain the nice work from Maks. Co-authored-by: Szymon Kłos <[email protected]> Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I2d6aa5113405aa32e06d45cfbfd1a623647f3121 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Issue that came up with its follow ups db10c45 #10027 Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: I6c9401e9f3a37fd604a2598388be64f026efce21 Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Due to db10c45 #10027 we now need to make sure the img element is completely out of the way via padding otherwise the background-image is not visible Signed-off-by: Pedro Pinto Silva <[email protected]> Change-Id: Idf909b4cffbedf71b75797a6611fb8067f2a314a Signed-off-by: Darshan-upadhyay1110 <[email protected]>
Change-Id: I4f0474e02411ada5547c8c2f23dda22cb4433557
Summary
This is my proposal for UI splitting the buttons in 2 parts.
I hope I didn't take too much liberty with the design ^^
Checklist
make prettier-write
and formatted the code.make check
make run
and manually verified that everything looks okay