-
-
Notifications
You must be signed in to change notification settings - Fork 43
Conversation
Now sounds like a good time to migrate to the new |
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99998 9.53198H8.54198L12.447 5.62698L11.386 4.56698L8.74898 7.17698L8.74898 0.999985H7.99998H7.25098L7.25098 7.17698L4.61398 4.56698L3.55298 5.62698L7.45798 9.53198H7.99998ZM9.95598 13.013C9.95598 14.1175 9.06055 15.013 7.95598 15.013C6.85141 15.013 5.95598 14.1175 5.95598 13.013C5.95598 11.9084 6.85141 11.013 7.95598 11.013C9.06055 11.013 9.95598 11.9084 9.95598 13.013Z" fill="#616161"/> | ||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> | ||
<g class="jp-icon3" fill="#616161"> |
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 jp-icon3
is needed for the icons to be styled correctly based on the theme (using the correct fill color).
31d8bb0 should fix most of the icons. Still the debugger toolbar icon to fix. |
949b280 adds the debugger icon and the button as two separate items in the toolbar. As a side effect the hover style now applies only to the switch: cc @telamonian do you know if there is a more canonical way of achieving this with the new Until now the toolbar component was defined with: Lines 38 to 46 in 2ee7a2e
And styled with: Lines 90 to 122 in 2ee7a2e
Which made it possible to have both |
Let's make the bug icon clickable as well is we keep the two items separate. |
d7e58e4 implements this: It kind of feels "odd" that two items of the toolbar do the same thing though. |
Maybe @tgeorgeux has some input for a nice switch button UX that includes an icon? It looks like core JupyterLab doesn't have such component yet, so it might still be uncertain what we want to have really. Otherwise I suggest handling this as a separate issue. |
Short answer is no. I am currently thinking about ways to support multiple icons/text labels in a single LabButton (or something) component. Part of that is figuring out the actual use cases, so thanks for this. It's a bit hacky, but I think you can get what you really want (a single outer
So the bug icon would be inline svg, while the toggle switch would continue to be CSS. Getting the styling right might be a bit tricky, though |
Thanks @telamonian for the input! I was also thinking about building a custom React component directly to have full control on it. Maybe that would be the simpler solution for now.
Yes, this is basically how it is at the moment (except that is uses |
The difference would be that both bug icon and toggle icon would be children of the same large button, like before, instead of having
|
@afshin It looks like something like this works well actually: |
Awesome. This looks great to me.
…On Fri, 6 Mar 2020 at 18:40 Jeremy Tuloup ***@***.***> wrote:
@afshin <https://github.com/afshin> It looks like something like this
works well actually:
[image: bug-icon-switch-label]
<https://user-images.githubusercontent.com/591645/76112247-21a60f00-5fe2-11ea-9848-88dedf6c23e3.gif>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#376?email_source=notifications&email_token=AABG6KPKJCAIM224VWOGREDRGE7QTA5CNFSM4K7RSCZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOCMMWA#issuecomment-595904088>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABG6KI4W767E7OIDMVTQVTRGE7QTANCNFSM4K7RSCZA>
.
|
@jtpio I am working on switches here: jupyterlab/jupyterlab#8010 I think if the icon is being used as a toggle it makes more sense to color the icon to indicate it's on or off. The design pattern doesn't exist in Jupyterlab to have an 'icon and toggle' together. I Hope this helps, I'll be in touch. |
Thanks @tgeorgeux for opening this 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.
Thank you!
👍
Fixes #375.
TODO