-
Notifications
You must be signed in to change notification settings - Fork 293
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
context menu on ebios rm valid step/unvalid step #1211
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request introduces localization updates for English and French languages, adding new translation keys for marking items as valid or not valid. Additionally, the frontend package now includes the Changes
Sequence DiagramsequenceDiagram
participant User
participant Tile
participant ContextMenu
participant Backend
User->>Tile: Interact with step
Tile->>ContextMenu: Open context menu
User->>ContextMenu: Select status change
ContextMenu->>Backend: Submit status update
Backend-->>Tile: Update confirmation
Tile->>Tile: Update local step status
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (1)
frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte (1)
165-187
: Consider enhancing the status update UXWhile the implementation is functional, consider these improvements for better user experience:
- Add loading state during submission
- Show error feedback to users when the update fails
on:click={async () => { + let isLoading = true; const newStatus = step.status === 'done' ? 'in_progress' : 'done'; const formData = new FormData(); formData.append('workshop', workshop.toString()); formData.append('step', (i + 1).toString()); formData.append('status', newStatus); // Submit the data to the backend const response = await fetch( `/ebios-rm/${$page.params.id}?/changeStepState`, { method: 'POST', body: formData } ); // Handle success or error if (response.ok) { step.status = newStatus; // Update the local state } else { + // Show error toast/notification + const error = await response.text(); + console.error('Failed to update step state:', error); } + isLoading = false; }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
frontend/pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
frontend/messages/en.json
(1 hunks)frontend/messages/fr.json
(1 hunks)frontend/package.json
(1 hunks)frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: startup-functional-test (3.12)
- GitHub Check: startup-docker-compose-test
- GitHub Check: enterprise-startup-functional-test (3.12)
- GitHub Check: enterprise-functional-tests (3.12, chromium)
- GitHub Check: enterprise-startup-docker-compose-test
- GitHub Check: functional-tests (3.12, chromium)
🔇 Additional comments (6)
frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte (3)
5-5
: Clean implementation of context menu state management!The ContextMenu import and openMenuIndex state variable are well-structured and properly typed.
Also applies to: 18-18
62-65
: Well-structured context menu implementation!The ContextMenu.Root setup with controlled state management via openMenuIndex follows best practices.
161-162
: Clean and accessible context menu styling!The styling implementation:
- Uses semantic color classes
- Has proper transitions
- Maintains good contrast ratios
frontend/package.json (1)
85-85
: Good choice of UI library!The bits-ui library is a solid choice for context menus, and the version is appropriately pinned with ^ to allow minor updates while avoiding breaking changes.
frontend/messages/en.json (1)
999-1000
: Clear and consistent translations!The new translation keys follow the existing patterns and clearly describe their purpose.
frontend/messages/fr.json (1)
990-991
: Well-localized French translations!The French translations are natural and maintain semantic consistency with their English counterparts.
Created a context menu (click right) on ebios rm valid step/unvalid step to validate it on UI with a green check or Unvalid it to have a checklist icon.
Summary by CodeRabbit
New Features
Dependencies
bits-ui
package to project dependenciesLocalization