Skip to content

helium/ui/layout: add an option to center the address bar#871

Merged
wukko merged 15 commits intoimputnet:mainfrom
jamdaniels:wide-address-bar-toggle
Mar 31, 2026
Merged

helium/ui/layout: add an option to center the address bar#871
wukko merged 15 commits intoimputnet:mainfrom
jamdaniels:wide-address-bar-toggle

Conversation

@jamdaniels
Copy link
Copy Markdown
Contributor

@jamdaniels jamdaniels commented Feb 8, 2026

For your pull request to not get closed without review, please confirm that:

  • An issue exists where the maintainers agreed that this should be implemented
    (an approved feature request, or confirmed bug).
  • I tested that my contribution works locally, and does not break anything,
    otherwise I have marked my PR as draft.
  • If my contribution is non-trivial, I did not use AI to write most of it.
  • I understand that I will be permanently banned from interacting with this
    organization if I lied by checking any of these checkboxes.

Tested on (check one or more):

  • Windows
  • macOS
  • Linux

This PR adds a setting to toggle between the current used, full width address bar and a more narrow, centered, responsive address bar with a fixed max width of 900px. Currently, the full-width address bar is disabled by default. These additions are skipped if the CAT feature is active. I've researched how the centered, responsive address bar is implemented in Brave, which already does this and this solution is inspired by it.

Closes #104

Related #1059 #1121

Pictures:

helium-wide-address-bar-toggle-1 helium-wide-address-bar-toggle-2

Video showcase:

helium-wide-address-bar.mp4

I do want to say that I used AI to implement this, but I didn't "vibe code" it. I did a lot of back and forth with multiple frontier models, discussed how to implement this feature properly while following best practices and look out for possible concerns and thoroughly tested all scenarios locally. I just want to help out and I would love if this feature gets added. If the full-width address bar should stay the default, let me know and I'm happy to change that and anything else necessary.

Copy link
Copy Markdown
Member

@wukko wukko left a comment

Choose a reason for hiding this comment

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

the full width address bar should indeed stay default & please use dev.sh, it sets the correct env variables for quilt that make the patches look better

@jamdaniels jamdaniels force-pushed the wide-address-bar-toggle branch from 9cd6ab7 to dd85fb2 Compare February 10, 2026 01:21
@jamdaniels jamdaniels changed the title helium/ui: add wide address bar toggle helium/ui/centered-address-bar: add centered address bar Feb 10, 2026
@jamdaniels
Copy link
Copy Markdown
Contributor Author

  • changed approach to 'enable centered address bar'
  • added hunk offset fixes

I hope this fits better, I also tried to match the naming patterns.

Screenshot 2026-02-10 at 01 40 39
helium-pr-1.mp4

@ayushk-1801
Copy link
Copy Markdown

When will this be merged?

@jamdaniels
Copy link
Copy Markdown
Contributor Author

@wukko do you want me to resolve the conflicts now or should I wait for further changes until this is 'in line' to be merged or do you guys have other plans? Will you let me know or should I just keep resolving the conflicts?

@nsk-47
Copy link
Copy Markdown

nsk-47 commented Mar 1, 2026

Is it possible to move the URL also to the center of address bar like in Duckduckgo?

@Vexcited
Copy link
Copy Markdown

Vexcited commented Mar 9, 2026

I think this would be great for vertical tabs since the address bar takes the whole width and it gets very hard to grab the window and move it around on Windows or macOS...

More free space around the address bar would be nice!

Copy link
Copy Markdown

@fanckush fanckush left a comment

Choose a reason for hiding this comment

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

can't wait for this to get merged! moving the window now is very difficult, there is virtually no place to drag from

Image

Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
@fanckush
Copy link
Copy Markdown

@jamdaniels maybe if you request re-review at the top right, you might get another review from the maintainers

@jamdaniels
Copy link
Copy Markdown
Contributor Author

@fanckush fixing the remaining conflicts right now and will commit and request a re-review asap.

@jamdaniels jamdaniels force-pushed the wide-address-bar-toggle branch from dd85fb2 to 50bf430 Compare March 21, 2026 14:08
@jamdaniels
Copy link
Copy Markdown
Contributor Author

  • Solved merge conflicts
  • Moved setting into appearance section under browser layout
  • Setting still doesn't interfere when compact layout is enabled
  • Tested address bar behavior in all layout settings and scenarios
he-pr-1-3.mp4

Please let me know if any adjustments are necessary. Also fanckush suggested to dynamically adjust the width instead of a fixed width. Should it be changed?

@jamdaniels jamdaniels requested a review from wukko March 21, 2026 14:18
@dumbmoron
Copy link
Copy Markdown
Member

dumbmoron commented Mar 21, 2026

Please let me know if any adjustments are necessary.

The patch formatting is wrong, could you please reformat it with correct quilt vars? (see: https://github.com/imputnet/helium-macos/blob/main/docs/building.md#development-build-and-environment or devutils/set_quilt_vars.sh)

Comment thread patches/helium/ui/centered-address-bar.patch Outdated
@jamdaniels jamdaniels requested a review from dumbmoron March 21, 2026 15:00
@dumbmoron
Copy link
Copy Markdown
Member

@greptileai

Comment thread patches/helium/ui/centered-address-bar.patch Outdated
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 21, 2026

Last reviewed commit: "helium/ui/centered-a..."

Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
@jamdaniels
Copy link
Copy Markdown
Contributor Author

Video showing the state after the most recent commit

65d9c8e.mp4

@jamdaniels jamdaniels requested a review from dumbmoron March 22, 2026 12:14
Comment thread patches/series Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
Comment thread patches/helium/ui/centered-address-bar.patch Outdated
@wukko
Copy link
Copy Markdown
Member

wukko commented Mar 23, 2026

really good PR btw, thank you for your work!

@wukko
Copy link
Copy Markdown
Member

wukko commented Mar 25, 2026

@jamdaniels do you mind if i finish this PR for you?

@jamdaniels jamdaniels force-pushed the wide-address-bar-toggle branch from da44c90 to bba216c Compare March 26, 2026 09:19
@jamdaniels
Copy link
Copy Markdown
Contributor Author

bba216c.mp4
  • no regressions, checked all possible settings
  • performed tests before every single commit

@wukko

@jamdaniels jamdaniels requested a review from wukko March 26, 2026 09:24
@jamdaniels
Copy link
Copy Markdown
Contributor Author

your patch works well as is btw, and i made a new UI layout prototype with this PR as a crucial part of it:

screenshot
image
centered location bar may get promoted to default (now? or at some point?), gotta think about it more though

Looks amazing! I really like the centered, short/main-URL and that the tabs moved down. I think a default centered address bar would be a good UX improvement (esp. for users that touch the mouse a lot but that's up to you guys ^^)

wukko added 2 commits March 31, 2026 12:05
- renamed the pref to be clearer and consistent
- moved pref registry to browser_ui_prefs
- cleaned up centering code and constants
- got rid of unclear math workarounds
- optimized for overfilled toolbars
- adjusted width steps and margin percentages
- renamed settings prefs and strings to be consistent
@wukko
Copy link
Copy Markdown
Member

wukko commented Mar 31, 2026

@greptileai

@wukko wukko changed the title helium/ui/centered-address-bar: add centered address bar helium/ui/layout: add an option to center the address bar Mar 31, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 31, 2026

Important Files Changed

Filename Overview
patches/helium/ui/layout/centered-address-bar.patch Adds centered address bar feature: new pref, post-layout centering in MaybeCenterLocationBar(), settings toggle guarded against compact/CAT layout. One discrepancy: kCenteredLocationBarMaxWidth is 800 but PR description says 900px.
patches/helium/ui/layout/compact.patch Line-number offset updates to account for lines added by the new centered-address-bar.patch earlier in the sequence. No logic changes.
patches/helium/ui/layout/vertical.patch Line-number offset update for the same reason as compact.patch. No logic changes.
patches/series Inserts helium/ui/layout/centered-address-bar.patch at the correct position — after the shared layout patches and before compact/vertical, which is required because those two patches' line offsets depend on it.

Reviews (2): Last reviewed commit: "helium/ui: finish centered address bar" | Re-trigger Greptile

@wukko
Copy link
Copy Markdown
Member

wukko commented Mar 31, 2026

refactored the remaining parts, should be good to merge now:

centered.mp4

@dumbmoron

@wukko wukko merged commit 1d57545 into imputnet:main Mar 31, 2026
3 checks passed
@wukko
Copy link
Copy Markdown
Member

wukko commented Mar 31, 2026

@jamdaniels thank you!

@jamdaniels
Copy link
Copy Markdown
Contributor Author

@jamdaniels thank you!

thanks for letting me work on this and the patience, can't wait to use it! I'll also have a close look at the remaining changes/refactor and hope to improve :)

@jabuxas
Copy link
Copy Markdown

jabuxas commented Apr 10, 2026

im having ghost text on where the bar should originally be when having this center search bar toggled on. linux wayland helium 0.10.9.1-1

10mb_output.mp4

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.

[FR]: Add a Title Bar hide/show option when vertical tabs are enabled [FR]: Add option to make search bar smaller [FR]: Address bar customization

8 participants