From 1c7c56130db7928e086bf38abc4d3b92024620b4 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 19 Jan 2026 11:53:14 +0100 Subject: [PATCH] docs: update group concept --- docs/groups-architecture.md | 52 ++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/docs/groups-architecture.md b/docs/groups-architecture.md index 88af7de..b075c4b 100644 --- a/docs/groups-architecture.md +++ b/docs/groups-architecture.md @@ -117,10 +117,10 @@ CREATE TABLE groups ( description TEXT, inserted_at TIMESTAMP NOT NULL, updated_at TIMESTAMP NOT NULL, - CONSTRAINT groups_name_unique UNIQUE (name) + CONSTRAINT groups_name_unique UNIQUE (LOWER(name)) ); -CREATE INDEX groups_name_index ON groups(name); +CREATE INDEX groups_name_index ON groups(LOWER(name)); ``` **Attributes:** @@ -130,7 +130,7 @@ CREATE INDEX groups_name_index ON groups(name); - `inserted_at` / `updated_at` - Timestamps **Constraints:** -- `name` must be unique +- `name` must be unique (case-insensitive, using LOWER(name)) - `name` cannot be null - `name` max length: 100 characters - `description` max length: 500 characters @@ -194,7 +194,7 @@ end - `destroy` - Delete group (with confirmation) **Validations:** -- `name` required, unique, max 100 chars +- `name` required, unique (case-insensitive), max 100 chars - `description` optional, max 500 chars #### `Mv.Membership.MemberGroup` @@ -319,7 +319,7 @@ end - Display group badges for each member - Badge shows group name - Multiple badges if member in multiple groups -- Click badge to filter by that group +- *(Optional)* Click badge to filter by that group (enhanced UX, can be added later) **Filtering:** - Dropdown/select to filter by group @@ -374,7 +374,11 @@ end ``` -**Clickable Group Badge (for filtering):** +**Clickable Group Badge (for filtering) - Optional:** + +**Note:** This is an optional enhancement. The dropdown filter provides the same functionality. The clickable badge improves UX by showing the active filter visually and allowing quick removal. + +**Estimated effort:** 1.5-2.5 hours ```heex