Skip to content

UI4: inputs#4234

Open
Mihai-Munteanu wants to merge 29 commits into4-devfrom
avo-976-adjust-text-input-design
Open

UI4: inputs#4234
Mihai-Munteanu wants to merge 29 commits into4-devfrom
avo-976-adjust-text-input-design

Conversation

@Mihai-Munteanu
Copy link

@Mihai-Munteanu Mihai-Munteanu commented Jan 30, 2026

Description

polish design specifications for text inputs based on figma https://www.figma.com/design/Enmp0p0u8wFG0SuysUDszX/Avo-Design-System?node-id=2934-86442&m=dev

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Screenshot 2026-02-10 at 12 40 33 Screenshot 2026-02-10 at 12 39 54 Screenshot 2026-02-10 at 12 39 42

@linear
Copy link

linear bot commented Jan 30, 2026

Copy link
Collaborator

@adrianthedev adrianthedev left a comment

Choose a reason for hiding this comment

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

  1. the text input size doesn't match figma. can you pease cehck the others too? (don't set the height. see what's wrong with the sizes (padding, line height, font-size))
  2. let's try to add the spinner element as an after element.
CleanShot 2026-01-30 at 11 19 04@2x CleanShot 2026-01-30 at 11 19 13@2x

attr_reader :loading

def loading?
!!Avo::ExecutionContext.new(target: loading, record: record, view: view, resource: resource).handle
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the !!?

Suggested change
!!Avo::ExecutionContext.new(target: loading, record: record, view: view, resource: resource).handle
!!Avo::ExecutionContext.new(target: loading, record: record, view: view, resource: resource).handle

module IsLoading
extend ActiveSupport::Concern

attr_reader :loading
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we ever add this loading attribute? I don't recall having that.

Ideally, we should be triggering loading with just a class or HTML attribute, not by reloading the field from the server.

<%= content %>
<div class="field-wrapper__input">
<%= content %>
<%= tag.span class: "input__spinner", "aria-hidden": "true" if @field.loading? %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we add the spinner as an after element and not have to depend on adding an extra element on the page?

@Mihai-Munteanu Mihai-Munteanu marked this pull request as draft February 11, 2026 13:18
@Mihai-Munteanu Mihai-Munteanu marked this pull request as ready for review February 11, 2026 13:18
@adrianthedev adrianthedev changed the title Adjust text input design UI4: inputs Feb 12, 2026
Copy link
Collaborator

@adrianthedev adrianthedev left a comment

Choose a reason for hiding this comment

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

Let's have one input.css if we can. It's easier to co-locate these and figure out patterns now and in the future.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the reason for this?

Comment on lines +1 to +4
/* Input Component - Base */
/* BEM: .input-field (block), .input-field__* (element), .input--* (modifier) */

/* Replaced input heights (range, color): content + padding + border */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/* Input Component - Base */
/* BEM: .input-field (block), .input-field__* (element), .input--* (modifier) */
/* Replaced input heights (range, color): content + padding + border */

It doesn't seem that these help in any way.

Comment on lines +6 to +8
--input-height-sm: calc(1rem + 0.5rem + 2px);
--input-height-md: calc(1.25rem + 0.75rem + 2px);
--input-height-lg: calc(1.25rem + 1.25rem + 2px);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we figure these out from actual variables?
I will always wonder where does the 1rem come from. or the 0.5rem or the 2px.
Are these spacings? do they have variables in Tailwind? Can we leave comments on what they are?

Color Input
========================================================================== */

input[type="color"] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is still an input. let's move it into input.css

Comment on lines +20 to +34
.input--size-sm ~ .input-field__password-toggle svg {
@apply size-3.5;
}

/* Medium size */
.input-field ~ .input-field__password-toggle svg,
input ~ .input-field__password-toggle svg,
.input--size-md ~ .input-field__password-toggle svg {
@apply size-4;
}

/* Large size */
.input--size-lg ~ .input-field__password-toggle svg {
@apply size-4.5;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we have one CSS rule to dictate the size of the after element? I mean for password icon, calendar icon, loadign icon, etc.?

Also maybe make it a variable and let CSS apply it?

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.

2 participants