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

Replace brace with react-ace #1366

Merged

Conversation

Antonio-Maranhao
Copy link
Contributor

Overview

Replaces the brace dependency, which hasn't received any updates for 5+ years, with react-ace which works with the most recent releases of the ACE Editor. The work was based on #1331 which had to be reverted due to issues with the release build. Both the dev server and release builds are fully functional.

Also takes advantage of the new useStrictCSP option in the ACE Editor so allow Fauxton to work without the style-src: 'unsafe-inline' Content-Security Policy.
 

Testing recommendations

When editing JSON documents:

  • Syntax highlighting is working
  • Editor shows syntax errors - e.g. remove a comma between fields and the red X icon should be displayed on the editor gutter
  • String editor:
    • position the cursor inside a string value then click the "String Editor" icon displayed on the editor gutter
    • In the String Editor, modify the string value then click "Modify text" button.
    • Verify the string value is updated

When editing a Mango Query:

  • Syntax highlighting is working
  • Editor shows syntax errors
  • Click the "Enter zen mode" icon on the top right of the editor to enter the full-screen editor
    • Click the "Switch zen theme" icon on the right to verify it switches between the light / dark themes

GitHub issue number

n/a

Related Pull Requests

n/a

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;
  • Update rebar.config.script with the correct tag once a new Fauxton release is made

@fryjordan
Copy link
Contributor

Have run through the testing recommendations, and looked over the code. LGTM!

@Antonio-Maranhao Antonio-Maranhao merged commit 25ad6d5 into apache:main Sep 20, 2022
@Antonio-Maranhao Antonio-Maranhao deleted the replace-brace-with-reach-ace branch September 20, 2022 12:19
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.

None yet

2 participants