Skip to content

[Project Manager] Fix Wrap Long Project Title and Compact Mode - #122061

Draft
CarrotOfPower wants to merge 2 commits into
godotengine:masterfrom
CarrotOfPower:fix/wrap-long-project-title/empty-tag-container
Draft

[Project Manager] Fix Wrap Long Project Title and Compact Mode#122061
CarrotOfPower wants to merge 2 commits into
godotengine:masterfrom
CarrotOfPower:fix/wrap-long-project-title/empty-tag-container

Conversation

@CarrotOfPower

@CarrotOfPower CarrotOfPower commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This is meant for 4.8. You can find the fix for 4.7.2 here: #122350.

What problem(s) does this PR solve?

  • This PR fixes all issues with wrapping project titles and compact mode. For more info, see the two suspended PRs.
  • Simplifies logic significantly while maintaining the same functionality, fixing issues with long project titles not wrapping correctly.
  • Replaces the magic number former used for title_size_cache through logic, so the value is calculated and save for future layout changes, while the magic number had to be adjusted for layout changes.
  • Should work on any scale now.
  • Implements compact mode setting like explained in Project Manager: Add Compact Mode Setting #122152.

#122075

wrap_long_project_title_empty_tag_container_bug.mp4

#122092

The bug in that issue was caused by #121387 as it introduced a compact mode which hid the sidebar when the project manager was shrunk beyond a threshold. This PR does two things:

  • Adds Compact Mode setting: project_manager/compact_mode.
  • Adds Compact Mode Threshold setting: project_manager/compact_mode_threshold, which sets the point to hide the project manager sidebar.

Reasoning

Since the mentioned PR was andriod focused, a compact mode setting builds upon the PR, it is set to on by default on the intended mobile devices and off on desktop devices.
Because desktop devices have more real-estate, the compact_mode_threshold gives users more fine grained control.

(This text is from #122152)

Difference to #122152 / #122095

This is #122152:

project-manager-add-compact-mode.mp4

As you may notice, the tags do not resize at first, title and tags share the space somewhere in the middle.
Also, you see the errors from #122257 in the terminal window.

This PR:

fix-wrap-long-project-title-result-scale-2.2-demo.mp4

It ensures that the tags do resize at first, so the title can take mor space, which can be used more efficiently.
You don't see any errors in the terminal window.

Also, #122152 currently broke the compact mode setting. For demo:

#122152:

project-manager-add-compact-mode-setting-applied-compact-mode-bug.mp4

This PR:

fix-wrap-long-project-title-result-scale-2.2-compact-mode-demo.mp4

Additional information

Validated by building the Windows editor with SCons and testing it, as well as testing the test artifact for Windows.

@unit-tick

Copy link
Copy Markdown
Contributor

The tags are already taken into account in set_project_title_autowrap. They are added to the tag_size_cache. This PR isn't needed, also, I'm unable to reproduce your error on my end.

@CarrotOfPower

CarrotOfPower commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

The tags are already taken into account in set_project_title_autowrap. They are added to the tag_size_cache. This PR isn't needed, also, I'm unable to reproduce your error on my end.

Strange...

My system info is: Godot v4.8.dev2 - Windows 11 (build 26200) - Multi-window, 1 monitor - Direct3D 12 (Forward+) - dedicated AMD Radeon 780M Graphics (Advanced Micro Devices, Inc.; 32.0.13018.6) - AMD Ryzen 7 8700G w/ Radeon 780M Graphics (16 threads) - 31.11 GiB memory - WASAPI (48000 Hz, Stereo/mono)

I've set interface/editor/appearance/
custom_display_scale to 2.2

Anyway, this fixes the bug for me.

@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch from 24db6a3 to 86e5b7a Compare August 3, 2026 15:14
Comment thread editor/project_manager/project_list.cpp Outdated
@unit-tick

unit-tick commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

I'm genuinely confused. I tested this at all standard editor scales before pushing the change and it worked perfectly. Now it barely works at 1.25 and breaks completely at any scale above 1.5. I tried implementing your change in my custom build and it's still broken and somehow your build broke and is staying broken. I'll have to look into it.

@unit-tick

unit-tick commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@Anyone4551, I managed to get a fix that works on my end and in my testing found another bug. If you don't mind I would like to create a PR that includes the fix for this bug, the fix for the other bug, and your last fix #122037. Would also make the changes easier to cherrypick for 4.7.2. You'll be added as a Co-Author, it's also fine if you prefer not to, it's up to you.

@unit-tick unit-tick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This works on my end, also doesn't break when opened with a single tag, which your previous changes did.

Comment thread editor/project_manager/project_list.cpp Outdated
@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch from 86e5b7a to f133b77 Compare August 4, 2026 09:45
@CarrotOfPower

CarrotOfPower commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@unit-tick Yes! It works. Of course, you can create a PR yourself. Finally, You fixed it. Nevertheless, I updated this one.
By the way: That's a great feature you've implemented.

@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch 2 times, most recently from 81bc7f4 to 18a6c10 Compare August 4, 2026 10:25
@CarrotOfPower CarrotOfPower changed the title [ProjectListItemControl] Fix Wrap Long Project Title [ProjectList] Fix Wrap Long Project Title Aug 4, 2026
@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch from 18a6c10 to 86e5b7a Compare August 4, 2026 19:51
@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch 6 times, most recently from ffb7e28 to 7ed0865 Compare August 5, 2026 14:38
@unit-tick

Copy link
Copy Markdown
Contributor

Tested this fix and it doesn't work at 0.75 editor scale, which means it does not fix #122092, so that needs to be removed so a proper fix can be made for it.

UI.clipping.0.75.scale.mp4

@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch from 7ed0865 to 2d80df4 Compare August 5, 2026 16:46
@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch 2 times, most recently from 266f464 to 520795f Compare August 8, 2026 19:29
@CarrotOfPower

Copy link
Copy Markdown
Contributor Author

@AThousandShips Since I cannot find a "Request for Review" button, I would like to ask you for a review.

@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch 5 times, most recently from 088e3e6 to 3afb07f Compare August 9, 2026 20:37
@AThousandShips

Copy link
Copy Markdown
Member

I don't really have anything to add

@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch 2 times, most recently from 3132555 to 62ceab2 Compare August 14, 2026 17:07
@CarrotOfPower
CarrotOfPower marked this pull request as draft August 14, 2026 20:29
@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch 7 times, most recently from f4877f8 to 0d3dd94 Compare August 15, 2026 20:58
@CarrotOfPower
CarrotOfPower marked this pull request as ready for review August 15, 2026 22:25
@CarrotOfPower
CarrotOfPower force-pushed the fix/wrap-long-project-title/empty-tag-container branch 6 times, most recently from 245a730 to 09b2088 Compare August 16, 2026 10:58
CarrotOfPower and others added 2 commits August 17, 2026 15:43
Fixes several issues where long project titles were
not wrapping correctly in the project list.

Co-authored-by: unit-tick <official.prince.john@gmail.com>
Adds a compact mode setting which hides the project list sidebar when the
project manager is shrunk.
Adds a compact mode threshold setting that sets the point beyond which the
project list sidebar is hidden.

Co-authored-by: CarrotOfPower <260066004+CarrotOfPower@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants