Skip to content

MMI 3200 UI #2437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 10, 2025
Merged

MMI 3200 UI #2437

merged 6 commits into from
Apr 10, 2025

Conversation

JacobWang-bc
Copy link
Collaborator

@JacobWang-bc JacobWang-bc commented Apr 10, 2025

  1. Refactored Tags component using Context API for state management,
  2. let editor add/remove Text Tag list in the editor UI.
  3. Add custom hooks
  4. Added type definitions.
graph LR
    subgraph Old Structure
        A[Tags component] --> B[state management]
        A --> C[logic]
        A --> D[UI render]
    end

    subgraph New structure
        E[Tags component] --> F[TagsContext]
        F --> G[state management]
        F --> H[useTagManagement]
        H --> I[Parse Tag]
        H --> J[Tag update]
        E --> K[UI render]
    end
Loading

work flow

sequenceDiagram
    participant UI as  UI
    participant Context as TagsContext
    participant Hook as useTagManagement
    
    UI->>Context: User selecet (addTags)
    Context->>Hook:  call processTagSelectionChanges
    alt new tags
        Hook->>Hook: handleTagAddition
    else remove tags
        Hook->>Hook: handleTagRemoval
    end
    Hook->>Context: get response and update UI
    Context->>UI: render UI

Loading

@JacobWang-bc JacobWang-bc added the enhancement New feature or request label Apr 10, 2025
@JacobWang-bc JacobWang-bc self-assigned this Apr 10, 2025
Copy link
Collaborator

@nehalaggarwal-bcgov nehalaggarwal-bcgov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Jacob!

@JacobWang-bc JacobWang-bc merged commit 3a37ee8 into dev Apr 10, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants