Modernize inline-editor, fix layout issues, and improve accessibility.
Review Request #13291 — Created Sept. 26, 2023 and submitted — Latest diff uploaded
The inline editor is now a
rb-c-inline-editorCSS component, with
specific wrappers for the actions (such as buttons) and the field
wrapper. This uses flexbox to handle layout, which enables us to
intelligently size and position the elements without the need for
When in the single-line mode, the inline editor now positions the
buttons at the end of the line unconditionally, rather than below the
field. To keep this from taking too much room, the buttons can
optionally collapse down to an icon (a checkmark for Save and an X for
In multi-line mode, the buttons contain the label, but also contain the
icons (for consistency and to help build a mental map on actions).
Buttons and the inline editor form have ARIA labels, which may include
the field label as part of the name (if provided when instantiating the
The logic for showing/hiding the edit icon received an update. Recently,
a fix was made to move from changing
in order to avoid some line height changes for multi-line text fields,
but this ended up occupying extra space for the single-line editors in a
way that created some visual problems. We now use
This change enables a lot of cleanup. A lot of scattered
rules have been consolidated and removed. The file attachment caption's
inline editor, which requires a number of overrides, are now a bit
cleaner in design and more future-proof, and maximize available space
for the caption.
Tested all the inline editors in the product, making sure nothing
regressed. This includes the multi-line and single-line fields in the
review request page, file attachment captions, replies, and fields in
the Review Dialog.
Tested that single-line editors had the buttons on the same row in all
cases, with short icons.
Checked the accessibility tree for the inline editors.
Unit tests pass.