UI: Window Title With Version #111998

Merged
Harley Acheson merged 14 commits from Harley/blender:WindowTitle into main 2023-09-16 02:37:12 +02:00
Member

Include blender version information in title (including cycle and
patch), and also indicate unsaved and dirty status better.


Initial state of unsaved and unchanged:

image

Unsaved and also changed

image

Saved file but unchanged since last save:

image

Saved file that needs resaving:

image

Recovered File:

image

Include blender version information in title (including cycle and patch), and also indicate unsaved and dirty status better. --- Initial state of unsaved and unchanged: ![image](/attachments/418e79d6-3c22-4b32-b97b-f0677849c49a) Unsaved and also changed ![image](/attachments/21726ce4-7ce6-44d0-95a8-6e98d89ba6a0) Saved file but unchanged since last save: ![image](/attachments/0d0d94ce-7f46-4165-b0ad-c45ed9e19181) Saved file that needs resaving: ![image](/attachments/6bd9e3ae-ebe0-4ef5-a11c-4ecce178e53d) Recovered File: ![image](/attachments/3a549b5a-a8cc-4042-9808-585add5ffa4d)
Harley Acheson added 1 commit 2023-09-05 22:17:38 +02:00
25f1b16106 UI: Window Title Changes
Include blender version information in title (including cycle and
patch), and also indicate unsaved and dirty status better.
Harley Acheson added this to the User Interface project 2023-09-05 22:18:05 +02:00
Harley Acheson requested review from Pablo Vazquez 2023-09-05 22:18:14 +02:00
Contributor

For people who display window titles on the task bar, it's important to see the unsaved indicator even when the title is cut short due to little space remaining:

image

What most apps on Windows do (explorer, firefox, vscode to name a few) is swapping the order of the segments a bit, so it'd be something like this:

*C:/my/file.blend - Blender 4.0 Alpha
*(Unsaved) - Blender 4.0 Alpha

Similarly, when having multiple Blender executables open on different project files, it's more important to see which ones belong to which .blend file, than seeing the app name and the version number repeated for each window. VSCode for example only shows the file name in the title by default.

But not sure if such a change would be welcome, just throwing the idea out there since this PR is already changing things around a bit.

For people who display window titles on the task bar, it's important to see the unsaved indicator even when the title is cut short due to little space remaining: ![image](/attachments/11ee3a43-76f2-4eb1-8d51-2980f7bf99ea) What most apps on Windows do (explorer, firefox, vscode to name a few) is swapping the order of the segments a bit, so it'd be something like this: ``` *C:/my/file.blend - Blender 4.0 Alpha *(Unsaved) - Blender 4.0 Alpha ``` --- Similarly, when having multiple Blender executables open on different project files, it's more important to see which ones belong to which .blend file, than seeing the app name and the version number repeated for each window. VSCode for example only shows the file name in the title by default. But not sure if such a change would be welcome, just throwing the idea out there since this PR is already changing things around a bit.
3.6 KiB
Author
Member

something like this:

*C:/my/file.blend - Blender 4.0 Alpha
*(Unsaved) - Blender 4.0 Alpha

Oh that is a very interesting idea!

Similarly, when having multiple Blender executables open on different project files, it's more important to see which ones belong to which .blend file, than seeing the app name and the version number repeated for each window. VSCode for example only shows the file name in the title by default.

Your example, showing text, can't really include much. It doesn't look like it could include any portion of the name. My desire for the version number is more for this:

image

But not sure if such a change would be welcome, just throwing the idea out there since this PR is already changing things around a bit.

Removing the path is interesting. There is going to be more push to have a custom titlebar area (so we use the entire space and draw our own caption). In that case we get that extra room but we can't show the path, the just name. But then setting the OS title this way we could still see the path on the taskbar.

> something like this: > ``` > *C:/my/file.blend - Blender 4.0 Alpha > *(Unsaved) - Blender 4.0 Alpha Oh that is a very interesting idea! > Similarly, when having multiple Blender executables open on different project files, it's more important to see which ones belong to which .blend file, than seeing the app name and the version number repeated for each window. VSCode for example only shows the file name in the title by default. Your example, showing text, can't really include much. It doesn't look like it could include any portion of the name. My desire for the version number is more for this: ![image](/attachments/66789ac2-48d3-47ac-92b7-6f78e88f1bf9) > But not sure if such a change would be welcome, just throwing the idea out there since this PR is already changing things around a bit. Removing the path is interesting. There is going to be more push to have a custom titlebar area (so we use the entire space and draw our own caption). In that case we get that extra room but we can't show the path, the just name. But then setting the OS title this way we could still see the path on the taskbar.
Member

something like this:

*C:/my/file.blend - Blender 4.0 Alpha
*(Unsaved) - Blender 4.0 Alpha

Oh that is a very interesting idea!

Nice! I think that could work better.

It'll also work well on macOS since they show both the start and end of the title, shortening the middle bits. This is how it looks at the moment:
Patch on macOS

> > something like this: > > ``` > > *C:/my/file.blend - Blender 4.0 Alpha > > *(Unsaved) - Blender 4.0 Alpha > > Oh that is a very interesting idea! Nice! I think that could work better. It'll also work well on macOS since they show both the start and end of the title, shortening the middle bits. This is how it looks at the moment: ![Patch on macOS](/attachments/4421dbab-74c7-4414-ab5b-5d38c6ddbc55)
159 KiB
Harley Acheson added 2 commits 2023-09-06 23:32:54 +02:00
Author
Member

@pablovazquez - Nice! I think that could work better.

I updated the PR and the captures in the first comment.

> @pablovazquez - Nice! I think that could work better. I updated the PR and the captures in the first comment.
Member

Only tested on macOS so far but it looks great!

Works as expected.

Just opened:
macOS open, no file

With a file open, modified, on a long-ish path.

macOS with a file open and modified

Only tested on macOS so far but it looks great! Works as expected. Just opened: ![macOS open, no file](/attachments/5b26cc6f-7d49-4557-826d-f78effa15ced) With a file open, modified, on a long-ish path. ![macOS with a file open and modified](/attachments/4b68739f-7f7a-4294-85c0-76eaedda2c4b)
154 KiB
299 KiB
Pablo Vazquez approved these changes 2023-09-07 01:38:02 +02:00
Author
Member

@brecht @ideasman42

What do you guys think?

@brecht @ideasman42 What do you guys think?
Brecht Van Lommel requested changes 2023-09-08 16:09:33 +02:00
Brecht Van Lommel left a comment
Owner

Design is fine with me.

Design is fine with me.
@ -498,0 +501,4 @@
version_cycle = "";
}
const char *patch = BLENDER_VERSION_PATCH != 0 ? "." STRINGIFY(BLENDER_VERSION_CYCLE) : "";

Deduplicate this code with blender_version_init in blender.cc. If the formatting needs to be different you can construct a second string in that function.

Deduplicate this code with `blender_version_init` in `blender.cc`. If the formatting needs to be different you can construct a second string in that function.
Harley marked this conversation as resolved
Harley Acheson added 2 commits 2023-09-09 02:25:33 +02:00
Harley Acheson changed title from UI: Window Title Changes to UI: Window Title With Version 2023-09-09 02:54:15 +02:00

Including the full path first has the down-side that people who work on network drives with long paths (students at universities for e.g.) might have not get useful titles. If the OS is usefully abbreviating the titles it's not so bad, but it wouldn't surprise me if some systems don't handle this so well, although long paths which are clipped in the middle are unlikely to clip out the filename.
Checking other applications, most use the filename only (not the full path).
If others prefer the full path first, I'm not that fussed but suspect there are reasons this is not such a common convention.

Including the full path first has the down-side that people who work on network drives with long paths (students at universities for e.g.) might have not get useful titles. If the OS is usefully abbreviating the titles it's not so bad, but it wouldn't surprise me if some systems don't handle this so well, although long paths which are clipped in the middle are unlikely to clip out the filename. Checking other applications, most use the filename only (not the full path). If others prefer the full path first, I'm not that fussed but suspect there are reasons this is not such a common convention.
Campbell Barton requested changes 2023-09-09 03:44:20 +02:00
@ -496,2 +485,2 @@
GHOST_SetTitle(static_cast<GHOST_WindowHandle>(win->ghostwin), "Blender");
}
char str[sizeof(Main::filepath) + 24];
const char *filename = (BKE_main_blendfile_path_from_global()[0]) ?

Use filepath for full path names.

Use `filepath` for full path names.
Harley marked this conversation as resolved
@ -498,0 +487,4 @@
BKE_main_blendfile_path_from_global() :
IFACE_("(Unsaved)");
BLI_snprintf(str,

SNPRINTF should still be used here.

`SNPRINTF` should still be used here.
Harley marked this conversation as resolved
Author
Member

Including the full path first has the down-side that people who work on network drives with long paths (students at universities for e.g.) might have not get useful titles. If the OS is usefully concatenating the titles it's not so bad, but it wouldn't surprise me if some systems don't handle this well.
Checking other applications, most use the filename only (not the full path).
If others prefer the full path first, I'm not that fussed but suspect there are reasons this is not such a common convention.

Actually I assumed that keeping the full path was a requirement. I would strongly prefer to show only the filename, although I do remember some users complaining of the thought.

Dropping the full path would allow us to move toward the idea of having our content in the space currently used by the OS caption bar.

> Including the full path first has the down-side that people who work on network drives with long paths (students at universities for e.g.) might have not get useful titles. If the OS is usefully concatenating the titles it's not so bad, but it wouldn't surprise me if some systems don't handle this well. > Checking other applications, most use the filename only (not the full path). > If others prefer the full path first, I'm not that fussed but suspect there are reasons this is not such a common convention. Actually I assumed that keeping the full path was a requirement. I would strongly prefer to show only the filename, although I do remember some users complaining of the thought. Dropping the full path would allow us to move toward the idea of having our content in the space currently used by the OS caption bar.
Harley Acheson added 2 commits 2023-09-09 19:46:43 +02:00
Campbell Barton reviewed 2023-09-10 08:06:51 +02:00
@ -496,2 +485,2 @@
GHOST_SetTitle(static_cast<GHOST_WindowHandle>(win->ghostwin), "Blender");
}
char str[sizeof(Main::filepath) + 24];
const char *filepath = (BKE_main_blendfile_path_from_global()[0]) ?

Calling twice (while not a problem) is a bit odd, would just do:

const char *filepath = BKE_main_blendfile_path_from_global(); then have the ternary operator within the SNPRINTF statement.

Calling twice (while not a problem) is a bit odd, would just do: `const char *filepath = BKE_main_blendfile_path_from_global();` then have the ternary operator within the SNPRINTF statement.
Harley marked this conversation as resolved
Campbell Barton approved these changes 2023-09-10 08:06:58 +02:00
Harley Acheson added 1 commit 2023-09-10 17:57:34 +02:00
Member

Checking other applications, most use the filename only (not the full path).
If others prefer the full path first, I'm not that fussed but suspect there are reasons this is not such a common convention.

Actually I assumed that keeping the full path was a requirement. I would strongly prefer to show only the filename, although I do remember some users complaining of the thought.

Having the filename only would likely be helpful for most people. Only when having two files open with the same name it would get confusing, since Blender can't handle multiple files open in the same instance it's impossible to know.

An alternative would be a mix of both, start with the filename, then folder in brackets, then version:
*01_03A.blend [/home/user/Desktop/folder/] - Blender 4.0.0 Alpha

But this would affect future development on:

Dropping the full path would allow us to move toward the idea of having our content in the space currently used by the OS caption bar.

But that's so far off that perhaps not something to worry at the moment.

> > Checking other applications, most use the filename only (not the full path). > > If others prefer the full path first, I'm not that fussed but suspect there are reasons this is not such a common convention. > > Actually I assumed that keeping the full path was a requirement. I would strongly prefer to show only the filename, although I do remember some users complaining of the thought. Having the filename only would likely be helpful for most people. Only when having two files open with the same name it would get confusing, since Blender can't handle multiple files open in the same instance it's impossible to know. An alternative would be a mix of both, start with the filename, then folder in brackets, then version: `*01_03A.blend [/home/user/Desktop/folder/] - Blender 4.0.0 Alpha` But this would affect future development on: > Dropping the full path would allow us to move toward the idea of having our content in the space currently used by the OS caption bar. But that's so far off that perhaps not something to worry at the moment.
Pablo Vazquez added the
Module
User Interface
label 2023-09-11 17:24:25 +02:00
Brecht Van Lommel approved these changes 2023-09-11 18:37:25 +02:00
Brecht Van Lommel left a comment
Owner

Looks fine by itself.

Showing the folder second is unusual but maybe works well practice?

There are some ways to make the folder path shorter, showing just the parent folder, replacing the home directory with ~, or with future project support showing a path relative to the project root. But that still doesn't guarantee the name is short enough to show in the task bar. So not sure I actually like any of these ideas.

Looks fine by itself. Showing the folder second is unusual but maybe works well practice? There are some ways to make the folder path shorter, showing just the parent folder, replacing the home directory with ~, or with future project support showing a path relative to the project root. But that still doesn't guarantee the name is short enough to show in the task bar. So not sure I actually like any of these ideas.
Author
Member

No consensus yet on the formatting. Some wanting full path, some just file name, others wanting a format that includes file name first and path later.

Pablo's suggestion does look nice and might work well with Projects:

*01_03A.blend [/home/user/Desktop/folder/] - Blender 4.0 Alpha

There is consensus for hiding the trailing ".0" when there isn't a patch. This is contrary to Semantic Versioning 2.0.0, but the feeling was unanimous to not show this when not strictly needed.

No consensus yet on the formatting. Some wanting full path, some just file name, others wanting a format that includes file name first and path later. Pablo's suggestion does look nice and might work well with Projects: ``` *01_03A.blend [/home/user/Desktop/folder/] - Blender 4.0 Alpha ``` There is consensus for hiding the trailing ".0" when there isn't a patch. This is contrary to Semantic Versioning 2.0.0, but the feeling was unanimous to not show this when not strictly needed.
Harley Acheson added 2 commits 2023-09-14 02:50:06 +02:00
Member

No consensus yet on the formatting. Some wanting full path, some just file name, others wanting a format that includes file name first and path later.

They all have pros and cons.

  • Full Path (currently in main)

    • Pro: Shows all info.
    • Cons: In some OS users might not be able to see the most important bit (filename) at a glance.
  • Only Filename

    • Pro: Clean. Probably covers most use cases.
    • Cons: Users won't see the filepath. Two files with the same name would look identical.
  • Mixed

    • Pro: Shows all info, the most important first.
    • Cons: Non-standard. Path can get so long that's no longer useful (arguably also happens with Full Path)

I would go with Mixed. Easy to see the filename at a glance, users can check the whole path if needed or discard the rest. Can get noisy but it just takes a moment to understand the structure of the important bits.

> No consensus yet on the formatting. Some wanting full path, some just file name, others wanting a format that includes file name first and path later. They all have pros and cons. * **Full Path** (currently in `main`) * Pro: Shows all info. * Cons: In some OS users might not be able to see the most important bit (filename) at a glance. * **Only Filename** * Pro: Clean. Probably covers most use cases. * Cons: Users won't see the filepath. Two files with the same name would look identical. * **Mixed** * Pro: Shows all info, the most important first. * Cons: Non-standard. Path can get so long that's no longer useful (arguably also happens with **Full Path**) ---- I would go with **Mixed**. Easy to see the filename at a glance, users can check the whole path if needed or discard the rest. Can get noisy but it just takes a moment to understand the structure of the important bits.

I'm fine with trying Mixed.

I'm fine with trying Mixed.
Harley Acheson added 2 commits 2023-09-14 17:31:39 +02:00
Author
Member

Updated to show the mixed format. Updated the captures in the first comment.

Updated to show the mixed format. Updated the captures in the first comment.
Brecht Van Lommel reviewed 2023-09-14 19:52:21 +02:00
@ -121,0 +126,4 @@
"%d.%01d%s%s",
BLENDER_VERSION / 100,
BLENDER_VERSION % 100,
BLENDER_VERSION_PATCH > 0 ? "." STRINGIFY(BLENDER_VERSION_PATCH) : "",

I think the patch version should left out entirely from the title.

It's not important to distinguish Blender windows based on that. And showing it only when it is non-zero seems strange to me.

I think the patch version should left out entirely from the title. It's not important to distinguish Blender windows based on that. And showing it only when it is non-zero seems strange to me.
Harley marked this conversation as resolved
Harley Acheson added 2 commits 2023-09-14 22:20:55 +02:00

LGTM, if there are cases this doesn't work well it could always be a preference.

LGTM, if there are cases this doesn't work well it could always be a preference.
Author
Member

@blender-bot build

@blender-bot build
Harley Acheson merged commit 636f3697ee into main 2023-09-16 02:37:12 +02:00
Harley Acheson deleted branch WindowTitle 2023-09-16 02:37:14 +02:00
Member

Hey guys. I'm glad to read in this discussion that it seems the Mixed format option was somewhat of an experiment and nobody seems hell-bent on it. I know that myself and at least 2 other people here at the studio aren't happy with this new format, possibly partially due to just being used to the old one, but I think it's also because it's simply harder to read and more confusing. When I glance at the top bar, it's almost like if the filepath was like this: MyAsset_temp.blend/D:/Work/SVN/Gold/Assets/MyAsset.

In some cases, it makes me briefly think that I have the wrong file open; Cases where there is a file named similarly to my folder, but that is not the file I intend to be in.
Sounds very specific, but take this file tree and consider how common it is:

Project
    Assets
        MyAsset
            MyAsset.blend
            MyAsset_temp.blend

Now if I'm in MyAsset_temp.blend (and it is very important to me that I am in that file and not the other), and I glance at the top-bar, the thing that reads most prominently is the end of the directory path, which will just be MyAsset. So I easily get fooled into thinking that I'm in MyAsset.blend, when that is not the case. This has been happening to me constantly since this change.

So for mainly this reason, I would request either adding customizability to this, or going with the old Full Path format option described by Pablo above, and see if anybody complains about long filepaths not being handled nicely by their OS. (Couldn't we just add our own handling for long filepaths to cover this case, btw?)

Hey guys. I'm glad to read in this discussion that it seems the `Mixed` format option was somewhat of an experiment and nobody seems hell-bent on it. I know that myself and at least 2 other people here at the studio aren't happy with this new format, possibly partially due to just being used to the old one, but I think it's also because it's simply harder to read and more confusing. When I glance at the top bar, it's almost like if the filepath was like this: `MyAsset_temp.blend/D:/Work/SVN/Gold/Assets/MyAsset`. In some cases, it makes me briefly think that I have the wrong file open; Cases where there is a file named similarly to my folder, but that is not the file I intend to be in. Sounds very specific, but take this file tree and consider how common it is: ``` Project Assets MyAsset MyAsset.blend MyAsset_temp.blend ``` Now if I'm in `MyAsset_temp.blend` (and it is very important to me that I am in that file and not the other), and I glance at the top-bar, the thing that reads most prominently is the end of the directory path, which will just be `MyAsset`. So I easily get fooled into thinking that I'm in `MyAsset.blend`, when that is not the case. This has been happening to me constantly since this change. So for mainly this reason, I would request either adding customizability to this, or going with the old `Full Path` format option described by Pablo above, and see if anybody complains about long filepaths not being handled nicely by their OS. (Couldn't we just add our own handling for long filepaths to cover this case, btw?)

Personally the previous behavior seemed OK to me, we could revert it if there aren't any users who strongly prefer the new behavior. If some users prefer both new/old behavior +1 for making this customizable with the previous behavior as an option.

Personally the previous behavior seemed OK to me, we could revert it if there aren't any users who strongly prefer the new behavior. If some users prefer both new/old behavior +1 for making this customizable with the previous behavior as an option.
Author
Member

@Mets

I am also not a fan of the "mixed" format of having the filename followed by the path. This PR started with this as my suggestion:

image

It morphed into what we have now because some felt that the most important part, the file name, could be lost if the path is long and the screen is narrow.

I personally don't like what became the consensus because of the backwards order (name before path) and the brackets. Of course I am happy to implement the consensus, but I find it a bit awkward right now.

I'm actually not certain how best to raise this as an issue. Since you are in the Studio are you able to talk to Pablo?

@Mets I am also not a fan of the "mixed" format of having the filename followed by the path. This PR started with this as my suggestion: ![image](/attachments/3a5a564e-5757-4d1e-aac9-c56c5bd79346) It morphed into what we have now because some felt that the most important part, the file name, could be lost if the path is long and the screen is narrow. I personally don't like what became the consensus because of the backwards order (name before path) and the brackets. Of course I am happy to _implement_ the consensus, but I find it a bit awkward right now. I'm actually not certain how best to raise this as an issue. Since you are in the Studio are you able to talk to Pablo?
Member

Sure thing, thanks! I'll poke him on Monday to see if he favors the current format strongly, but I don't think that will be the case. 🤞

Sure thing, thanks! I'll poke him on Monday to see if he favors the current format strongly, but I don't think that will be the case. 🤞
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#111998
No description provided.