Skip to content
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

feat: add conditional for new parser beta testing #496

Conversation

KristinAoki
Copy link
Member

Description

This PR sets up future work for a new OLX parser. Since releasing the react based problem editor, there have been various bugs that come from the OLX parser not catching all the nuanced tags. Currently the default experience for the editor is the visual (TinyMCE) editor. The problem is navigated to the advanced editor if it uses an advanced problem tags, has multiple questions in a problem, and a non-default tag or attribute is found. This approach requires updates to the problem editor parser each time a new tag or attribute is brought to the developers attention so that the content that it is referencing is not lost by accidentally rendering the wrong editor. To simply the need for constant updates for new tags or attributes, the new OLX parser will have a specific list of tags and attributes that are allowed in the visual editor. The array of supported tags and attributes will generated from the Read The Docs site. If there is a tag or attribute that is not in the supported list the advanced problem editor will be displayed to ensure that no OLX was lost when between the last save and opening of the problem.

To confirm the new parser is an improvement, we need a conditional statement based on waffle flag that will control which users will have the problem editor with the new parser or the current parser. This change impacts "Authors" and "Developers".

Supporting information

JIRA Tickets: TNL-11667 🔒 and TNL-11694 🔒

Testing instructions

  1. Open a course
  2. Create a new problem block
  3. Confirm that the problem can be opened and edited
  4. Save the problem
  5. Reopen the problem
  6. Confirm that the problem can be opened and edited

Deadline

None

Other information

This PR is dependent of edx-platform PR #35184

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 88.90%. Comparing base (9bce0a3) to head (60433cb).
Report is 1 commits behind head on main.

Files Patch % Lines
...editors/containers/ProblemEditor/data/OLXParser.js 0.00% 3 Missing ⚠️
src/editors/data/redux/thunkActions/problem.js 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #496      +/-   ##
==========================================
- Coverage   88.97%   88.90%   -0.08%     
==========================================
  Files         248      248              
  Lines        4545     4552       +7     
  Branches      936      944       +8     
==========================================
+ Hits         4044     4047       +3     
- Misses        468      472       +4     
  Partials       33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@rayzhou-bit rayzhou-bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@KristinAoki KristinAoki merged commit 3dfc579 into main Jul 26, 2024
8 of 10 checks passed
@KristinAoki KristinAoki deleted the KristinAoki/add-condtional-for-defaultToAdvanced-beta-testing branch July 26, 2024 14:59
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