feat(admin): build attach-to-entity picker UI on FormDetailPage
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in apps/admin/src/pages/forms/FormDetailPage.tsx, specifically the Identity tab, and review the new apps/admin/src/hooks/useArtifactPicker.ts helper. Trace the /admin/events, /admin/announcements, and /admin/groups endpoints, then implement selection and PATCH /admin/forms/:id with both entity fields. Done means admins can attach an entity, the database pairing constraint is respected, and group-scoped forms warn for non-group entities.
Written by the indexing model from the issue text.
Description
Summary
FormDetailPage currently displays the attached entity (event/announcement/group) and offers a Detach action, but there's no UI to attach a form to an entity if it's currently unattached. v1 ships with admins setting entityType/entityId via the API.
Requirements
- Build a typeahead/picker that lets admin browse events, announcements, or groups and select one to attach
- On selection, PATCH
/admin/forms/:idwith{ entityType, entityId } - Respect the DB CHECK constraint (both fields must end up set or both null)
- Validation: if form's scope is
group, surface a warning when attaching to a non-group entity
Context
Plan 4 noted this as deferred. Now that forms ship, the API path works but admins need the UI to use it.
Files
apps/admin/src/pages/forms/FormDetailPage.tsx(Identity tab)- New helper:
apps/admin/src/hooks/useArtifactPicker.ts(consumes /admin/events, /admin/announcements, /admin/groups for typeahead)
- Dominant language
- HTML
- Stars
- 33
- Forks
- 104
- Avg merge
- 12h 3m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from USRSE/usrse.github.io
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
USRSE/usrse.github.io#2001 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
USRSE/usrse.github.io#2000 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
USRSE/usrse.github.io#1991 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
USRSE/usrse.github.io#1948 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
USRSE/usrse.github.io#1947 · 1 comment ·
All issues in USRSE/usrse.github.io
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
zostera/django-bootstrap4#894 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
eknowledger/toolbench#101 · 1 comment ·
-
comp/dashboard P3 type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100