Skip to content
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

fix: set document title #4377

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions app/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ app.createEditorWindow = function() {
const windowOptions = {
resizable: true,
show: false,
title: 'Camunda Modeler' + getTitleSuffix(app.metadata.version),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally found this useful, why not keep it?

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a duplicate of
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we keep the code above, we set the title in two places:

  1. main process
  2. HTML

But on MacOS the HTML part takes precedence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term, we could consider adding context to the title, e.g. the current tab. But it's outside of the scope of the linked issue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's decide here and now that we ditch dev tag, and if we ever add it (again), then we do it inside the app.

minWidth: MINIMUM_SIZE.width,
minHeight: MINIMUM_SIZE.height,
webPreferences: {
Expand Down Expand Up @@ -694,20 +693,6 @@ function bootstrap() {
};
}

/**
* Returns the app title suffix based on app version.
*
* @param {string} version
* @return {string}
*/
function getTitleSuffix(version) {
if (version.includes('dev')) {
return ' (dev)';
}

return '';
}

function generatePluginsTag(plugins) {

if (!plugins || !plugins.length) {
Expand Down
1 change: 1 addition & 0 deletions client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self'" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Camunda Modeler</title>

<style>
body, html {
Expand Down