Skip to content

ui_input: Only render number field border on focus#46165

Merged
dinocosta merged 1 commit intomainfrom
fix-number-field-border
Jan 7, 2026
Merged

ui_input: Only render number field border on focus#46165
dinocosta merged 1 commit intomainfrom
fix-number-field-border

Conversation

@dinocosta
Copy link
Member

The NumberField.render method was always rendering a border_1 for the number input, even when not focused. Even though it was using cx.theme().colors().border_transparent, some themes don't have this value set to a fully transparent color so it ends up looking a little bit weird.

As such, this commit updates the way the border is rendered, to ensure it's actually only rendered, i.e., the border_1 method is only called, when the field is actually focused.

Release Notes:

  • Improved rendering of border on number field's input to ensure it's only rendered when the field is focused

@dinocosta dinocosta requested a review from danilo-leal January 6, 2026 15:12
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 6, 2026
@dinocosta
Copy link
Member Author

Here's a before and after comparison using the Zedokai Light theme ▼

Before

before.mp4

After

after.mp4

@dinocosta dinocosta self-assigned this Jan 6, 2026
The `NumberField.render` method was always rendering a `border_1` for
the number input, even when not focused. Even though it was using
`cx.theme().colors().border_transparent`, some themes don't have this
value set to a fully transparent color so it ends up looking a little
bit weird.

As such, this commit updates the way the border is rendered, to ensure
it's actually only rendered, i.e., the `border_1` method is only called,
when the field is actually focused.
@dinocosta dinocosta force-pushed the fix-number-field-border branch from 285d77e to a684dee Compare January 6, 2026 15:27
Copy link
Member

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

:shipit:

@dinocosta dinocosta merged commit f845893 into main Jan 7, 2026
23 checks passed
@dinocosta dinocosta deleted the fix-number-field-border branch January 7, 2026 10:52
rtfeldman pushed a commit that referenced this pull request Jan 9, 2026
The `NumberField.render` method was always rendering a `border_1` for
the number input, even when not focused. Even though it was using
`cx.theme().colors().border_transparent`, some themes don't have this
value set to a fully transparent color so it ends up looking a little
bit weird.

As such, this commit updates the way the border is rendered, to ensure
it's actually only rendered, i.e., the `border_1` method is only called,
when the field is actually focused.

Release Notes:

- Improved rendering of border on number field's input to ensure it's
only rendered when the field is focused
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
)

The `NumberField.render` method was always rendering a `border_1` for
the number input, even when not focused. Even though it was using
`cx.theme().colors().border_transparent`, some themes don't have this
value set to a fully transparent color so it ends up looking a little
bit weird.

As such, this commit updates the way the border is rendered, to ensure
it's actually only rendered, i.e., the `border_1` method is only called,
when the field is actually focused.

Release Notes:

- Improved rendering of border on number field's input to ensure it's
only rendered when the field is focused
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
)

The `NumberField.render` method was always rendering a `border_1` for
the number input, even when not focused. Even though it was using
`cx.theme().colors().border_transparent`, some themes don't have this
value set to a fully transparent color so it ends up looking a little
bit weird.

As such, this commit updates the way the border is rendered, to ensure
it's actually only rendered, i.e., the `border_1` method is only called,
when the field is actually focused.

Release Notes:

- Improved rendering of border on number field's input to ensure it's
only rendered when the field is focused
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Feb 15, 2026
)

The `NumberField.render` method was always rendering a `border_1` for
the number input, even when not focused. Even though it was using
`cx.theme().colors().border_transparent`, some themes don't have this
value set to a fully transparent color so it ends up looking a little
bit weird.

As such, this commit updates the way the border is rendered, to ensure
it's actually only rendered, i.e., the `border_1` method is only called,
when the field is actually focused.

Release Notes:

- Improved rendering of border on number field's input to ensure it's
only rendered when the field is focused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants