Add a feedback button to the user menu #31
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#31
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Give users an easy way to tell us what is broken or missing. Add "Send feedback" to the account menu. It opens a small form and saves the feedback to a new table that we review at retros.
What you'll learn
A controlled React form, a POST route in Flask, and an Alembic migration.
Resources
Where to start
web/src/app/components/UserMenu.tsx: add a "Send feedback" item next to "Sign out".web/src/app/components/Modal.tsx: reuse it for the form (textarea, Send, Cancel).api/app/models/models.py: add aFeedbackmodel (id,user_idFK tousers,messagetext,pagetext,created_at).api/migrations/versions/: add a migration withdown_revision = "c7a2e91d4b3f"(the current head). Followb41f7c2d9e10_add_users_oidc_sub.pyfor the docstring and the upgrade/downgrade style.api/app/api/users.py: addPOST /api/users/feedback. These routes require sign-in, andcurrent_user()gives the author.Done when
Notes
Everyone shares one dev database (see
docs/getting-started.md). Keep the migration purely additive, and check with the tech lead before runningalembic upgrade head.