-
Notifications
You must be signed in to change notification settings - Fork 5.9k
fix: version in about dialog #5057
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
Conversation
It needs to be separate from the localize call since the language version of that string is used and it will not include a spot for the code-server version. I also moved the "v" so we do not get "vUnknown".
Before 1.64 the entire product configuration was sent to the client but that was removed so we have to add anything we want to use on the client, like the code-server version (used in the about dialog). Fixes coder#5027.
This will catch if we are not sending the actual version to the client.
e89625d
to
c8d8d08
Compare
Codecov Report
@@ Coverage Diff @@
## main #5057 +/- ##
=======================================
Coverage 71.30% 71.30%
=======================================
Files 30 30
Lines 1683 1683
Branches 373 373
=======================================
Hits 1200 1200
Misses 413 413
Partials 70 70 Continue to review full report at Codecov.
|
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}", | ||
+ "code-server: v{4}\nCode: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}", | ||
+ return localize('aboutCodeServerDetail', |
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 haven't looked into how localize
works but I assume if it doesn't find something for aboutCodeServerDetail
then it returns the string unlocalized aka this should just work?
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.
Yup. Really we could just leave out the localize
call here since no one will be localizing it and it does not have anything that needs localizing anyway but...just in case I guess.
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.
Sounds good. I like that you opted for it since it matches the patterns used by the surrounding code.
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.
My thinking exactly!
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.
const isDevMode = process.env.VSCODE_DEV === "1" | ||
|
||
// Look for code-server info div. | ||
const element = await codeServerPage.page.waitForSelector('div[role="dialog"] >> text=code-server') | ||
const element = await codeServerPage.page.waitForSelector( | ||
`div[role="dialog"] >> text=code-server: ${isDevMode ? "Unknown" : "v" + version}`, |
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.
Nice improvement!
* Fix code-server version not appearing in other languages It needs to be separate from the localize call since the language version of that string is used and it will not include a spot for the code-server version. I also moved the "v" so we do not get "vUnknown". * Add code-server version to product configuration Before 1.64 the entire product configuration was sent to the client but that was removed so we have to add anything we want to use on the client, like the code-server version (used in the about dialog). Fixes coder#5027. * Refresh patches * Change version test to look for specific version This will catch if we are not sending the actual version to the client.
Before 1.64 the entire product configuration was sent to the client but
that was removed so we have to add anything we want to use on the
client, like the code-server version (used in the about dialog).