Content-Length: 312318 | pFad | http://github.com/Sefaria/Sefaria-Project/pull/2344

40 feat: [sc-29136] Add Version language-related attributes as frontend options in the version menu by stevekaplan123 · Pull Request #2344 · Sefaria/Sefaria-Project · GitHub
Skip to content

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

stevekaplan123
Copy link
Contributor

@stevekaplan123 stevekaplan123 commented Feb 20, 2025

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.

@stevekaplan123 stevekaplan123 requested review from yitzhakc and Copilot May 7, 2025 10:43
@stevekaplan123 stevekaplan123 marked this pull request as ready for review May 7, 2025 10:44
Copy link

@Copilot Copilot AI left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/Sefaria/Sefaria-Project/pull/2344

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy