-
Notifications
You must be signed in to change notification settings - Fork 2
Rubric editor UI #696
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
Rubric editor UI #696
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
96125aa
Add rubric template utilities, collapsible FieldConfigCard, and store…
nourmalaeb 2e930c8
Add rubric editor UI with collapsible criterion cards and auto-save
nourmalaeb 7750e29
Add translation keys for rubric editor UI to all language files
nourmalaeb 8ba1a9c
Update rubric empty state to match ProposalCategories pattern
nourmalaeb 6dd96fe
Fix rubric editor saving on initial page load
nourmalaeb f565771
Revert "Fix rubric editor saving on initial page load"
nourmalaeb 532e439
Remove coming soon tag for users with rubric access
nourmalaeb 559f636
Rewrite criterion card with Accordion primitives and remove dropdown …
nourmalaeb 77844a7
Add confirmation modal when deleting a rubric criterion
nourmalaeb 4bb3ae4
Make entire criterion header row trigger accordion expand/collapse
nourmalaeb 2b18038
Show criterion name, type badge, and score in collapsed header
nourmalaeb cfd1ea7
Always show criterion name in header, fallback to 'New criterion'
nourmalaeb d365809
Update translations for revised score labels section
nourmalaeb 146bc73
Remove default score labels for scored criteria
nourmalaeb 057ba73
Fix score labels jumping between textareas on edit
nourmalaeb 5bb2ea8
Fix score labels jumping: use score value instead of array index
nourmalaeb 45aa385
Preserve scored config when switching criterion type and back
nourmalaeb 99826ee
Move scored config caching from rubricTemplate into RubricEditorContent
nourmalaeb d8776a3
Hide coming soon on mobile
nourmalaeb 95adf71
Adapt rubric editor to typed translations
nourmalaeb c130127
Fix label sorting
nourmalaeb ae0305d
Update styling
nourmalaeb ad97b3a
Error boundary and types
nourmalaeb 3817060
Simplify
nourmalaeb ca411f4
reuse delete modal
nourmalaeb 703f007
Revert feild config card changes
nourmalaeb d027689
format
nourmalaeb 46c69b4
simplify
nourmalaeb 760649d
Improve rubricTemplate, less casting, more functional
nourmalaeb 183600b
Show rubric preview at smaller breakpoints
nourmalaeb b50a2cb
Extract shared JSON Schema template utilities
nourmalaeb 66e5075
Add typed rubricTemplateEncoder for better type safety
nourmalaeb 176e53d
Move ConfirmDeleteModal to shared location
nourmalaeb 6658990
Add Suspense and ErrorBoundary fallbacks to CriteriaSection
nourmalaeb 19cc460
Use ProcessStatus enum instead of string literals
nourmalaeb 259a3d8
Improve RubricCriterionCard styling and validation
nourmalaeb 0d9585e
Improve RubricEditorContent typing and patterns
nourmalaeb 663cdb5
Fix max points data loss with description caching
nourmalaeb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import { Button } from '@op/ui/Button'; | ||
| import { Modal, ModalBody, ModalFooter, ModalHeader } from '@op/ui/Modal'; | ||
|
|
||
| import { useTranslations } from '@/lib/i18n'; | ||
|
|
||
| export function ConfirmDeleteModal({ | ||
| isOpen, | ||
| title, | ||
| message, | ||
| onConfirm, | ||
| onCancel, | ||
| }: { | ||
| isOpen: boolean; | ||
| title: string; | ||
| message: string; | ||
| onConfirm: () => void; | ||
| onCancel: () => void; | ||
| }) { | ||
| const t = useTranslations(); | ||
| return ( | ||
| <Modal | ||
| isDismissable | ||
| isOpen={isOpen} | ||
| onOpenChange={(open) => { | ||
| if (!open) { | ||
| onCancel(); | ||
| } | ||
| }} | ||
| > | ||
| <ModalHeader>{title}</ModalHeader> | ||
| <ModalBody> | ||
| <p>{message}</p> | ||
| </ModalBody> | ||
| <ModalFooter> | ||
| <Button | ||
| color="secondary" | ||
| className="w-full sm:w-fit" | ||
| onPress={onCancel} | ||
| > | ||
| {t('Cancel')} | ||
| </Button> | ||
| <Button | ||
| color="destructive" | ||
| className="w-full sm:w-fit" | ||
| onPress={onConfirm} | ||
| > | ||
| {t('Delete')} | ||
| </Button> | ||
| </ModalFooter> | ||
| </Modal> | ||
| ); | ||
| } | ||
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.