Skip to content

InputField improvement suggestions  #14

Open
@vaIerika

Description

@vaIerika

1. Next field logic isn't adjustable

  • Right now, the logic skips valid fields and jumps to the next invalid one. I am not sure if this behavior matches the design and works for every project.
  • You cannot change this behavior, even with a native modifier .focused(_:equals:), because Coordinator callbacks in InputField make it trick to override.

2. Validation change doesn't affect UI without changes in input values

  • Calling validityGroup.validateAll() doesn't trigger UI updates.
  • Things like the red border or hint message won't show unless updateValidationState() is called, but it is private and only runs on updateUIView().
  • This creates an issue: if user doesn't touch the fields (e.g. leaves them empty or with wrong default value) and presses Submit, no error will show.

3. Global appearance for text field

  • Why not let us pass appearance as a parameter?
  • Correct me if I'm wrong, but it feel like even something simple as change border colors on one screen becomes a challenge. It's pretty common to have fields with different looks in the same app, from design point of view they look fitting, but for us it is different UI settings. It feels unnecessary to have a conversation with designers over minor stuff like border color.
image image

4. Hint is always there

  • Hint takes up space in UI even if it's empty or nil.
Screenshot 2025-01-09 at 15 16 36

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions