-
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
tabbar: support icon-less items #12804
Conversation
@@ -32,7 +32,7 @@ before(() => { | |||
statusBarEntryUtility = testContainer.get(LabelParser); | |||
}); | |||
|
|||
describe('StatusBarEntryUtility', () => { | |||
describe.only('StatusBarEntryUtility', () => { |
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.
@cdamus please remove the .only
or only this test in @theia/core
will effectively run.
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.
Oh gosh, that was silly.
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.
Commit d17284f fixes that and I've verified that the entire core suite (495 tests run and 2 skipped) is restored.
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 changes work well and look good to me 👍
I'll ask others to review if they have any feedback, if not we can still merge for this month's release.
This fix does not interact well with other changes merged in the mean-time to |
The merge of eclipse-theia#12799 introduced a regression in the rendering of MenuToolbarItems that aren't pop-up menus but instead just commands that happen to have a menu path: they were rendered as pop-up menus instead of simple buttons. This fix refines the condition for the new pop-up menu rendering to check that the menu to be rendered is not a command to be executed directly on click. Fixes eclipse-theia#12687 Signed-off-by: Christian W. Damus <[email protected]>
VS Code renders action buttons in the tab bar for commands that do not have icons using their title text, instead. This commit does the same in Theia. Additionally, two related minor issues are fixed: - the $(icon) specifiers for icons show in the tooltip of an action, which is confusing - the roll-over highlight shows only on action buttons for commands that use the "icon" property, not those that embed icon specifiers in their titles Fixes eclipse-theia#12686 Signed-off-by: Christian W. Damus <[email protected]>
So it wasn't as much a bad interaction of this fix with intervening changes as it was a regression introduced on |
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 for re-working this based on the current master! As far as I can tell everything works now as expected, regular items, run items, etc. Great work!
@vince-fugnitto Do you want to have another look at this?
@vince-fugnitto I'm merging this for now. If you encounter any problems with it, please let me know. |
What it does
VS Code renders action buttons in the tab bar for commands that do not have icons using their
"title"
text, instead. This commit does the same in Theia.Additionally, two related minor issues are fixed:
$(icon)
specifiers for icons show in the tooltip of an action, which is confusing"icon"
property, not those that embed icon specifiers in their titlesI am happy to extract these fixes into separate PRs if you do not feel it appropriate to join them to the primary issue at hand.
Fixes #12686
How to test
menu_bug_1
branch of the OP's sample repository as indicated in the issue description.myext
extension in that sample repository and link it into theplugins/
directory of your Theia build.Other tests that I would recommend, especially covering the ancillary issues fixed herein, include:
$(cube)
:"title"
property of themyext.goodbyeWorld
command from themyext
extension'spackage.json
and see that at least the ID is shown for the command, which will indicate to the developer of this extension that something is amiss (otherwise there would just be a blank spot in the toolbar which could possibly be unobserved)Review checklist
Reminder for reviewers