-
-
Notifications
You must be signed in to change notification settings - Fork 286
feat: [sc-29136] Add Version language-related attributes as frontend options in the version menu #2344
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
base: master
Are you sure you want to change the base?
feat: [sc-29136] Add Version language-related attributes as frontend options in the version menu #2344
Conversation
…ted-attributes-as
…ted-attributes-as
…ted-attributes-as
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.
Pull Request Overview
This pull request adds new version attributes ("direction", "isSource", "isPrimary") to the admin version editor, extends backend validation in text model code, and updates the view to persist these new fields.
- Updates the frontend VersionBlock component to include dropdowns for text direction and checkboxes for isSource/isPrimary.
- Adds validations in the text model to enforce correct values and ensures at least one version remains primary.
- Updates the update_version view to include the new attributes when saving version records.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
static/js/sefaria/sefaria.js | Added Romanian language mapping; no issues found. |
static/js/VersionBlock/VersionBlock.jsx | Added new version fields and UI updates in the version editor. |
sefaria/model/text.py | Extended validation to check new version attributes. |
reader/views.py | Updated version update to persist the new attributes. |
Files not reviewed (1)
- static/css/s2.css: Language not supported
Description
Add fields to admin version editor: direction, isSource, isPrimary
Code Changes
In addition to front end changes, I also added some backend validation and minor css changes.