-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Styles for status bar elements #1840
Conversation
|
||
#theia-statusBar .area.left .element.warning, | ||
#theia-statusBar .area.right .element.warning { |
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.
You could simplify this selector to
#theia-statusBar .element.warning
so you don't need to duplicate for left and right. Same for the other styles.
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, thanks!
e290c56
to
81887e5
Compare
@vitaliy-guliy is your Signed-Off correct (codenvy email ?) |
dad65ab
to
aa85f8f
Compare
|
||
#theia-statusBar .element.warning, | ||
#theia-statusBar .element.warning { |
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 selectors are still duplicated. You can remove lines 56, 61, 66, 71.
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.
Fixed. Thank you!
@benoitf squashed again and changed to RedHat email. Thanks. |
cdc36db
to
6003ed7
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.
Looks good to me.
VS code does not allow to change the background color of status bar entries only of text: https://code.visualstudio.com/docs/extensionAPI/vscode-api#StatusBarItem. Why do you need it? |
@akosyakov To have status bar element with custom background as on screenshots. |
@akosyakov press |
VS code changes the background color of the whole status bar, not entries. You can do it with If we allow it why should we limit us with such set of predefined styles? Why not for example |
I agree with @akosyakov that coloring status bar items individually doesn't look good. Why do you want to do that? |
In my case I need to add a status bar element with green background. Having it in green makes it more contrast. You can see my cases on attached screenshots. What about |
Adding Vitaliy's demo of the new hosted development instance feature which shows the case https://youtu.be/5P5o0bHQlCo |
For that use case, vs code would change the background color of the full bar. We don't always need to do it exactly like VS code, but if we don't we should have good reasons. I don't see it in this case. Regarding the use case, it seems like you are working on specific extensions to support developing plug-ins. Couldn't that be handled through the generic launch support you are working on as part of the debug adapter support? I would like to be able to launch a "development host" from command line, as well. That said, I am fine with adding the |
Once the debug adapter support is in place it will work with the development host. I do not think development host from command line will make much sense as it stands today it is a fork of the running nodejs instance with additional plugins. @mmorhun has the details
I am looking forward to the "clown" status bar myself, that should get me points from my 5 year old |
Another part of the issue is displaying the popup menu when clicking on the status bar element.
To test I temporary added |
The general UX pattern here would be to make use a command and make use of the quick open. |
The pattern can be improved. In my case I display the menu by left clicking, not right. |
Actually, the reason why we don't allow handlers is that we store the entries as JSON between reloads. |
I don't understand why do we need to store status bar state. I don't know a case which requires storing the status bar. I have already played a lot with it and I would say storing the state raises bugs and confuses the user/developer. For instance, your extension adds a status bar element and then after removing the extension your element will be present. It's only one example. |
Yes, I agree. At the time of that decision it wasn't clear but now it seems as if all the important events are happening on load, such that the status bar is initialized properly. So I'm ok with removing the status bar state persistence and allow hooking up listeners. |
Issue on disabling the status bar persistence #1859 |
What about reconsidering requirements and consider solutions preserving consistent look & feel of the status bar? For example to drop a req to color entries for now and use the quick open palette instead of the dialog to have behaviour matching other entries.
I don't think it is true. Look at other applications you will find rare cases. In the attached screenshot in the offline mode it does not make much sense to color entries: the offline mode is what is important. In the main Theia it would be better to color the whole status bar to show that something is running similar to VS code.
It is questionable that we should allow such flexibility, removing it later won't be possible. It would be nice at least wait for real issues with the current approach. |
I have a solution how to not add |
@akosyakov @svenefftinge @spoenemann |
There is still a DCO check failing, i.e. one of the commits doesn’t contain the sign-off information. |
And please don't merge master into branch, but rebase the changes onto master. |
Signed-off-by: Vitaliy Gulyy <vgulyy@redhat.com>
302cc09
to
68694c4
Compare
@svenefftinge Done with DCO and rebase. |
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!
Different theme dependent styles for status bar elements.
Issue #1839
Signed-off-by: Vitaliy Guliy vgulyy@redhat.com
This is my status bar element with style INFO
and with style ERROR for offline mode