Skip to content

fix(ui): group arrays and reveal newly added editor elements - #1745

Merged
smunini merged 2 commits into
mainfrom
bugfix/1720-repeating-element-labels
Oct 3, 2026
Merged

smunini merged 2 commits into
mainfrom
bugfix/1720-repeating-element-labels

Conversation

@Gordex2014

Copy link
Copy Markdown
Contributor

Repeated JSON elements were rendered as bare indices, and adding an element could leave its selector open while the new field stayed outside the visible tree. Arrays now have a named group with indexed entries and an appropriate action to add another item. Adding closes the initiating selector and focuses the exact new input, or the new complex row, scrolling within the tree only when needed.

The green success block is removed. A discreet row-local Undo removes the latest addition and restores focus to its originating action; a hidden status announces the change. Existing exit and unsaved-change confirmation paths remain available.

The shared behavior covers the standalone editor, Resources modal, View Definitions, SQL Queries Details and SQL Views Details, including entry from Search Parameters and Compartments. Collection rendering preserves schema-aware append offers, slices, repeating choices, unknown and empty arrays, validation diagnostics and indexed paths.

Dependent edits use the latest document, structural changes temporarily block controls with stale indices, and outdated JSON refreshes cannot replace a newly added row. Pointer activation preserves a dirty input until the click can queue its update and addition together. Failed updates retain the typed value and allow an explicit retry.

Validation:

  • UI crate: 811 tests passed; JavaScript unit tests: 126 passed.
  • Chromium regression tests: 125 passed across the affected editor and SQL surfaces.
  • JavaScript-disabled tests: 10 passed; accessibility checks: 12 passed, including light and dark themes.
  • Manual visual checks passed across all five surfaces; human review approved the candidate.
  • Rendering, interaction and coverage reviews completed with no remaining findings after remediation.

Undo remains transient rather than a general edit history. Full workspace/backend matrices and remote CI are outside the completed focused verification.

Evidence: Before/after gallery — 18 captures across all five editor surfaces. Includes array grouping, primitive and complex additions, keyboard Undo, and Search Parameters/Compartments entry points. Temporary evidence expires 2026-10-07T18:44:18.998Z.

Closes #1720
Closes #1721

@Gordex2014
Gordex2014 marked this pull request as draft October 2, 2026 21:45
@Gordex2014
Gordex2014 marked this pull request as ready for review October 2, 2026 22:27
@codecov

codecov Bot commented Oct 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.64912% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ui/src/editor.rs 99.64% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@smunini
smunini merged commit 69d24ad into main Oct 3, 2026
25 checks passed
@smunini
smunini deleted the bugfix/1720-repeating-element-labels branch October 3, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants