Skip to content

Conversation

NesterovYehor
Copy link

PR Description

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

This introduces a new configuration setting, gui.sidePanelAutoWidth, to solve the problem of long or deeply nested filenames being truncated in the files panel.

When enabled, the application now calculates the required width to display
the longest visible line in the file tree, accounting for the git status,
tree indentation, and the filename itself.

This calculated width is then used to set a fixed size for the side panel, ensuring that file content is fully visible. The width is capped at a half of the total screen width to maintain a balanced layout and prevent a single long file from dominating the UI.

This commit includes the necessary logic and updates to the configuration documentation.

This introduces a new configuration setting, `gui.sidePanelAutoWidth`,
to solve the problem of long or deeply nested filenames being truncated
in the files panel.

When enabled, the application now calculates the required width to
display
the longest visible line in the file tree, accounting for the git
status,
tree indentation, and the filename itself.

This calculated width is then used to set a fixed size for the side
panel, ensuring that file content is fully visible. The width is
capped at a percentage of the total screen width to maintain a balanced
layout and prevent a single long file from dominating the UI.

This commit includes the necessary logic, a new unit test, and updates
to the configuration documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant