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

Hiding implicit focus indicators #296

Open
Tracked by #423
meowgorithm opened this issue Jun 26, 2024 · 2 comments
Open
Tracked by #423

Hiding implicit focus indicators #296

meowgorithm opened this issue Jun 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@meowgorithm
Copy link
Member

Having seen Huh in action for a bit, I think a good improvement would be to eliminate the focus indicators when they're implicit, with the goal of making the experience more visually focused and concise.

In other words, I don't think we always need to draw the little bar that indicates the active section in all cases.

Off the top of my head, the logic would work like this:

  1. If the entire form is one single field, hide the indicator.
  2. If the entire form has multiple groups with one single field in each group, hide all indicators.
  3. In all other cases show the indicator.
@dez11de
Copy link

dez11de commented Jul 5, 2024

Creators of such forms that don't want the little bar can simply set theme.Focused.Base.BorderStyle to HiddenBorder.

@meowgorithm
Copy link
Member Author

meowgorithm commented Jul 6, 2024

From a design perspective I'd prefer to default to hiding implicit indicators to reduce visual noise.

There's also a catch: focus indicators may not necessarily be borders: a theme could instead employ something different, such as a background color on the group, so manually adjusting borders won't necessarily do the trick.

If we find the former behavior is desired we could also add an option to enable it.

@caarlos0 caarlos0 mentioned this issue Sep 30, 2024
5 tasks
@caarlos0 caarlos0 added the enhancement New feature or request label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants