Improve dynamic form builder clarity and field creation feedback - #391
Conversation
- Add admin-only "edit this form" links to the Bulletin/Actor/Incident list footer, pointing directly to the relevant Form Builder (BYNT-1766) - Fix "Dynamic From Builder" typo and swap the drag handle icon for a clearer one (BYNT-1766) - Add DEFAULT/CUSTOM field guidance and a Help Text description so admins understand what each does (BYNT-1768) - Auto-scroll to and briefly highlight newly added fields so they're easy to spot in a long list (BYNT-1767)
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
level09
left a comment
There was a problem hiding this comment.
The clarity side is good. The locked vs editable caption, the admin hint and the help text description all land, and thanks for the From Builder typo.
One thing blocks it. The form builder templates render filteredMovableDynamicFields, not dynamicFields, and that computed filters on the search box. So if anything is in the search box when you save a new field, the field is filtered straight out of the DOM. querySelector finds nothing, the ?. swallows it, and nothing happens: no scroll, no flash.
To reproduce: open Actor Form Builder, search name, leave it there, click Add New, title the field zzz test, save. Nothing happens. Clear the search and it's sitting there, unhighlighted.
That's the exact flow the ticket is about, and the search box sits right next to the Add New button, so it will happen in normal use. Clearing the search as part of adding is enough, since a new field should always be shown:
this.ui.search = '';
event.justAdded = true;
this.formBuilder.dynamicFields[entityType].push(event);Two smaller things, neither needs to be in this PR:
The setTimeout that sets justAdded = false writes to the raw object rather than the reactive proxy, so it never triggers the re-render that removes the class. No visible effect, since the animation ends at opacity: 0 on its own. Easiest is to drop the timeout entirely and let the CSS finish.
Eight new strings and no .po touched, so Arabic falls back to English. Same situation as #303, so it's probably one flask translate extract && update pass covering both, with Khaleel doing the Arabic. The typo rename is free by the way, Dynamic From Builder was never translated, so nothing is lost.
One I checked and it's fine: the > in the admin hint mirrors itself in Arabic, since U+003E is bidi-mirrored, and the labels match the nav drawer exactly.
|
@level09 Right, now search clears when adding a new field. BTW i didn't know that command for translations existed, thanks for pointing it out. I'll run it after wrapping up translation changes going forward. |
This reverts commit 689b930.
Description
This PR improves the dynamic form builder UI and related admin hints for Actors, Bulletins, and Incidents.
Changes include:
How to Test
Jira ID (if applicable)
BYNT-1766
BYNT-1767
BYNT-1768