-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Put close icons at the start of the tab label by default on macOS #15103
base: master
Are you sure you want to change the base?
Conversation
32cc3de
to
69af7eb
Compare
packages/core/i18n/nls.json
Outdated
"window": { | ||
"tabCloseIconPlacement": { | ||
"description": "Place the close icons on tab titles at the start or end of the tab. The default is the host OS convention.", | ||
"end": "Place the close icon at the end of the label. In left-to-right languages, this is the right side of the tab.", | ||
"start": "Place the close icon at the start of the label. In left-to-right languages, this is the left side of the tab." | ||
} | ||
} |
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.
Please don't add the translations manually to the nls.json
file. We have a workflow for that that automatically performs this task before the release. See also here.
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, Mark! I'll revert that.
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.
Reverted with commit f61560f. Perhaps that linked documentation can add a note that these files are not meant to be edited by hand when adding new translatable strings.
Add a new window.tabCloseIconPlacement preference for whether to present the Close (X) icon in tab titles on the left or the right of the tab. Default to the left on macOS platform in conformity with the OS's native tab controls. Show the new preference in the Settings UI on macOS platform only. Render the tab title with the icon on the left or right accordingly. Fixes eclipse-theia/theia-ide#460 Signed-off-by: Christian W. Damus <[email protected]>
Per review, don't attempt to manually add strings to the nls bundle. Signed-off-by: Christian W. Damus <[email protected]>
69af7eb
to
f61560f
Compare
I'm trying to figure out what the test failure is in the
|
What it does
Adds a new
window.tabCloseIconPlacement
preference for whether to present the Close (X) icon in tab titles on the left or the right of the tab.Defaults to the left on macOS platform in conformity with the OS's native tab controls.
The tab bar rendering is updated to take the preference into account.
The preference is suppressed in the Settings view on non-Mac platforms as being largely irrelevant on those systems.
Fixes eclipse-theia/theia-ide#460
How to test
On a macOS system, build and launch the Theia example app. See that tabs in the main editor area are on the left side where they belong.
Open Settings and change the "Tab close icon placement" preference to "end". See the close icons move back to where they are presented on Linux and Windows platforms. Restore the default setting. See the close icons restored to the left side.
On Linux and Windows systems, verify that the "Tab close icon placement" preference does not appear in the Settings UI and that tab titles look as they ever did.
Follow-ups
None.
Breaking changes
Attribution
None.
Review checklist
Note
My testing is only on macOS platform as that is the platform that my system runs and the feature is meant to be disabled on other platforms. I'm depending on buddy tests from the Theia community to check for regressions on other platforms.
Reminder for reviewers