-
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
[core] Add and use application name #3445
Conversation
61539c5
to
3ca249d
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, except for that email :)
it lworks and looks great @marechal-p, perhaps we can simply display
|
73f62f3
to
2b85538
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.
thanks @marechal-p works and looks great!
@kittaakos can you have a look I feel a bit unsure since it does additional remote calls at runtime to fetch information which actually is available at the build time. Maybe it should be mixed into frontend config to avoid fetching what is already known. |
@akosyakov it was my concern, part of why I waited to merge. Is there a cache of the props already, or should I make one? |
I am OK with both approaches. The build-time solution is faster, no questions at all. But fetching the application name once when setting the workspace also seems OK. |
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.
It works nicely. @akosyakov, if you prefer having the application name at build time instead of fetching it, please request the change.
TBH I would prefer having the applicationName set at build time too, but while I know how to write something inside the generated sources (modifying the generators), I fail to see a clean way of fetching the value afterward, from any Theia component... How would you go about it? @akosyakov @kittaakos |
Let's spare @akosyakov for the review ;) I can take a look but then, let's fuse this PR with #3459. What do you think, @marechal-p? |
I'll fuze them now |
I will create my patch on the |
2b85538
to
2f315f8
Compare
@marechal-p, I could not create a PR against your branch (due to the force push) but here is the commit: 9aa985d. It worked without a problem locally. Let me know if you have questions. |
I didn't know about that Do you allow me to simply fuze your changes inside this PR? |
Sure. Use as much as you need. |
1afd575
to
2f0042e
Compare
4a33ffd
to
c884bd9
Compare
@kittaakos updated everything accordingly.
|
2beefae
to
f8f0659
Compare
👍
I am a bit puzzled; your change was already approved twice: #3445 (review) and #3445 (review) and you are saying; it works now. I still do not understand what does this fix.
I do not understand this.
I would like to. What was the original issue? |
packages/core/src/electron-browser/menu/electron-menu-contribution.ts
Outdated
Show resolved
Hide resolved
Exactly what I said. Despite being approved already, it wasn't working on OSX when I tested after (I remembered we had a OSX machine to test on). So I covered that case. It now works on Ubuntu/Windows/OSX. Now correctly hides the default electron menus until the application sets it up.
Well, again, on Ubuntu/Windows, we can set the menus on a per-window basis. But not on OSX, where the menu bar is unique and global to all windows, and lives at the top of the screen. Problem is, when you have two electron windows opened, and only one menu bar (OSX), in what window should But I will move that menu change to an other PR, no issues :) |
Thank you for taking the time and explaining it to me again. It makes sense. |
77c11f4
to
bf5d47d
Compare
@kittaakos it should be better now :) |
packages/core/src/browser/frontend-application-config-provider.ts
Outdated
Show resolved
Hide resolved
bf5d47d
to
ab1f48a
Compare
Ok, I didn't see the failing tests, still addressing that :( |
Add customizable application name. Display application name when no workspace is opened, instead of showing the URL. It was particulary bad on Electron. Remove native menus when creating a new Electron BrowserWindow, which will be re-added by the application when ready. Signed-off-by: marechal-p <paul.marechal@ericsson.com>
ab1f48a
to
b10a6e5
Compare
@kittaakos I know this PR is taking longer than it should to get ready, but there is a last point where I want your opinion: Currently, the application configuration requires us to define the {
"theia": {
"frontend": {
"config": {
"applicationName": "Theia Browser Example"
}
}
}
} Wouldn't it be better to have the application name as a "global", along with the target? {
"theia": {
"applicationName": "Theia Browser Example"
}
} It sounds rather specific to have it in the frontend config member. On the other hand, only the frontend could care about that, because it is only in the frontend logic that we would try to display this name. The backend would hardly need such a string, or I'm just failing to find a use case for it. Other than that I'm happy with how the changes are right now, feel free check if everything is ready to merge :) |
I would leave as is.
It looks great! I'll try it out once more on Windows and merge the changes. |
Add customizable application name.
Display application name when no workspace is opened, instead of showing
the URL. It was particulary bad on Electron.
Remove native menus when creating a new Electron BrowserWindow, which will be
re-added by the application when ready.
Signed-off-by: marechal-p paul.marechal@ericsson.com