Repository navigation
refactor: Codebase improvements - #88
Merged
Merged
Conversation
- Replace raw HTML checkbox with .input component for consistency - Replace hardcoded gray colors with daisyUI semantic tokens: - bg-gray-50 → bg-base-200 - text-gray-600 → text-base-content/80 - text-gray-500 → text-base-content/70 - Preserve Privacy section header for visual grouping
- Remove .claude/commands/ slash commands for specify workflow - Remove .specify/ directory (templates, scripts, memory) - Remove specs/ directory with feature specifications
Replace hardcoded gray colors with daisyUI semantic tokens across all LiveView modules for better theme support: - text-gray-600 → text-base-content/80 - text-gray-500 → text-base-content/70 Files updated: - auth_live/register.ex, reset_password_confirm.ex - group_live/edit.ex, show.ex - huddl_live/new.ex, edit.ex, show.ex Also fix raw checkbox in group_live/edit.ex to use .input component
Replace hardcoded bg-red-500 with daisyUI btn-error class for consistent theming support in HuddlLive.Show delete button.
Add documentation to 14 LiveView modules: - auth_live: sign_in, register, reset_password, reset_password_confirm - group_live: index, show, new, edit - huddl_live: show, new, edit, main search page - admin_live, profile_live
Create docs/ARCHITECTURE.md with: - Entity relationship diagram (mermaid) - Group and Huddl permission matrices - Visibility rules flowchart - Group member role hierarchy - Huddl lifecycle state diagram
Create CommunityComponents module with: - .huddl_list - renders huddl list with empty state handling - .member_card - renders individual member with owner badge - .member_list - renders member grid with permission handling Update GroupLive.Show to use new components, reducing template code by ~30 lines while improving consistency.
- Remove manual check_group_access from GroupLive.Show (Ash read policies handle this) - Replace manual auth checks with Ash.can? in GroupLive.Edit, HuddlLive.New/Edit - Fix HuddlLive.Edit bug where only creator could edit (now owners/organizers can too) - Refactor all auth flows to use consistent `with` statement pattern - Extract authorize_* and assign_*_form helpers to reduce nesting This aligns LiveView authorization with the Ash resource policies defined in Group and Huddl resources, ensuring consistent permission enforcement.
- Create HuddlzWeb.Live.ErrorHelpers module with: - handle_error/3 for consistent flash + redirect patterns - authorize/2 wrapper for Ash.can? checks - normalize_result/1 for converting Ash errors to standard atoms - Import ErrorHelpers in live_view macro for automatic availability - Update LiveViews to use centralized helpers: - GroupLive.Show, GroupLive.Edit - HuddlLive.New, HuddlLive.Edit, HuddlLive.Show Reduces boilerplate and ensures consistent error messaging across LiveViews.
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.
No description provided.