trackslash
VAULT-10 P2

Custom text field rendering that keeps the field's label visible

0
All issues

Description

Text fields are currently standard SwiftUI text fields. The placeholder shows while the field is empty, but once you've typed something it disappears, so it's no longer clear what the field was for.

Wanted

  • A custom text field style that makes it clear what each field is and what was entered, even after text is entered.

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Fixed in https://github.com/badbundle/vault-app/pull/599 (merged as 2b4aa877).

  • New LabeledTextField: while a field is empty, its label sits inside it like a placeholder. Once the field is focused or has a value, the label floats above the value, tinted while you're editing. The field's height stays fixed as the label moves.
  • States: errors turn the label red and show an icon, with a message under the value when there is one. Checked values get a green tick, and VoiceOver reads it descriptively, e.g. "Passwords match".
  • Variants: plain, secure (with an optional show/hide button) and multi-line (it grows with the text, and Return adds a new line).
  • Adoption: used for every text input in the app except feed search and the numbered recovery phrase word fields. That covers code, note and recovery phrase fields, the passphrase, killphrase and encryption fields, the tag name, and the backup password, decryptor and PDF hint fields.