Skip to content

feat(plugin-id/ui): convert user create/edit to a dialog#32

Merged
fdaugan merged 1 commit into
norman/feat-user-list-actions-menufrom
norman/feat-user-edit-dialog
May 22, 2026
Merged

feat(plugin-id/ui): convert user create/edit to a dialog#32
fdaugan merged 1 commit into
norman/feat-user-list-actions-menufrom
norman/feat-user-edit-dialog

Conversation

@Terracosmos
Copy link
Copy Markdown
Collaborator

second of two sub-PRs reworking the user management UX. Stacked on PR I.1 (norman/feat-user-list-actions-menu).

Change

The user create/edit screen is no longer a routed page — it is now a
popup (v-dialog), mirroring the Roles admin screen (SystemRoleView.vue).

Details

  • The former UserEditView form is extracted into UserEditDialog.vue, a
    v-dialog component (props: modelValue + userId, emits: saved). It is
    hosted by UserListView and opened from the "New user" button and the
    row gear menu's Edit action; clicking a row also opens it.
  • Per-entity routes /id/user/new and /id/user/:id are removed
    (Option A): user editing has no dedicated URL, consistent with the
    Roles screen.
  • Unsaved-changes guard adapted: useFormGuard's onBeforeRouteLeave is
    inert without a route change, so the dialog intercepts every close
    (Cancel / Esc / scrim) via requestClose, which raises the existing
    guard dialog when the form is dirty.
  • The lock / isolate / reset actions are rearranged inside the dialog
    as a compact bordered list.

Tested

Validated on a fresh Chrome (empty cache, via Playwright):

  • "New user" → creation popup
  • Row click / gear Edit → pre-filled edit popup
  • Clean close when the form is untouched
  • Field change + Esc → unsaved-changes guard appears
  • The 3 actions (lock / isolate / reset) work from the dialog
  • No plugin-id console errors

Stacked PR

Base branch is norman/feat-user-list-actions-menu (PR I.1). Once I.1 is
merged into feature/vuejs, GitHub will let this PR's base be retargeted
to feature/vuejs.

Note — host repo (out of scope)

app-ui/e2e/users.spec.js (host repo) tests the old routed flow
(#/id/user/new, #/id/user/:id). Those routes are removed here, so those
host-side e2e tests will need updating to the dialog flow.

@Terracosmos Terracosmos requested a review from fdaugan May 20, 2026 16:17
@Terracosmos Terracosmos force-pushed the norman/feat-user-edit-dialog branch from ea49113 to 1dc0c57 Compare May 20, 2026 16:22
Per Fabrice's review (chantier I.2): the user create/edit screen is no
longer a routed page but a popup, mirroring the Roles screen.

- Extract the former UserEditView form into UserEditDialog.vue, a
  v-dialog component (props modelValue + userId, emits saved). It is
  hosted by UserListView and opened from the "New user" button and the
  row gear menu's Edit action; clicking a row also opens it.
- Remove the per-entity routes /id/user/new and /id/user/:id (Option A,
  mirroring the Roles screen which has no per-entity route).
- Adapt the unsaved-changes guard: useFormGuard's onBeforeRouteLeave is
  inert without a route change, so the dialog binds model-value one-way
  and intercepts every close (Cancel / Esc / scrim) through requestClose,
  which raises the existing guard dialog when the form is dirty.
- Rearrange the lock/isolate/reset actions inside the dialog as a
  compact bordered list, consistent with the row gear menu.
- Preload the Groups dropdown's first page of options when it opens, in
  edit mode as well as create, so the user always sees a list to pick
  from without typing; already-assigned groups are merged in so their
  chips keep rendering.
@Terracosmos Terracosmos force-pushed the norman/feat-user-edit-dialog branch from 1dc0c57 to ed7aa81 Compare May 21, 2026 09:31
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@fdaugan fdaugan merged commit 9a7f91c into norman/feat-user-list-actions-menu May 22, 2026
4 of 5 checks passed
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