-
Notifications
You must be signed in to change notification settings - Fork 0
Fix event management metadata UI #388
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughChanged metadata handling in ManageEvent.page: introduced an initialization guard and switched from key-based to id-based metadata entries (stable ids like Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Component as ManageEvent Component
participant Form as Form State
participant Metadata as metadataEntries (state)
Note over Component: Initial load
Component->>Form: read form.values.metadata
Form-->>Component: metadata object
Component->>Component: generate stable ids (meta-<ts>-<rand>)
Component->>Metadata: set metadataEntries (id -> {key, value})
Component->>Component: set initializedRef = true
Note over Component: Edit key
User->>Component: change key input (entryId)
Component->>Metadata: updateMetadataKey(entryId, newKey)
Metadata->>Form: remove oldKey, add newKey with value
Note over Component: Edit value
User->>Component: change value input (entryId)
Component->>Metadata: updateMetadataValue(entryId, newValue)
Metadata->>Form: set form.values.metadata[key] = newValue
Note over Component: Remove field
User->>Component: click delete (entryId)
Component->>Metadata: removeMetadataField(entryId)
Metadata->>Form: delete key from form.values.metadata
Note over Component: Subsequent changes
Component->>Component: useEffect runs on form.values.metadata changes
Component-->>Component: skip re-initialization if initializedRef == true
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
💰 Infracost reportMonthly estimate generatedThis comment will be updated when code changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
src/ui/pages/events/ManageEvent.page.tsx(5 hunks)
🧰 Additional context used
🪛 GitHub Actions: Required Reviews
src/ui/pages/events/ManageEvent.page.tsx
[error] 1-1: Requirement "Base Requirement" is not satisfied by the existing reviews.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run Unit Tests
- GitHub Check: Build Application
Fixes #387
Summary by CodeRabbit