feat(plugin-id/ui): lazy server-backed autosuggest for group parent field#33
Merged
Merged
Conversation
…ield
Per Fabrice's review (chantier H): the group "Parent" field used to
preload every group with a parameterless GET rest/service/id/group at
mount — unworkable at DGFIP scale (100k+ groups in LDAP).
- Remove the mount-time bulk group preload.
- Turn the Parent field into a server-backed v-autocomplete: no-filter,
single-select, item-title/value="name" (the v-model and the save
payload stay a plain string name).
- Lazy loading: nothing is fetched until the dropdown opens, which then
loads the first page (20 groups); typing runs a 300 ms debounced
search delegated to the API.
- Edit mode: pre-seed only the current parent as a single {name} stub so
the field renders its label without loading the whole list.
- Dev-only demo fallback gated behind import.meta.env.DEV.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



make the group Parent field a lazy server-backed autosuggest.
Problem
GroupEditView preloaded ALL groups via a bulk GET rest/service/id/group
at mount to populate the Parent field. Unacceptable at DGFIP scale
(100k+ groups in LDAP).
Change
The Parent field is now a server-backed v-autocomplete with lazy
loading:
it displays without loading the full list
v-model stays a string (group name) — the save payload is unchanged.
Demo fallback gated behind import.meta.env.DEV.
Verified (headless Chrome, network capture)
bulk load
bulk load
Files
1 file, +80/-12 — GroupEditView.vue.