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

AceEditor - codemirror replacement #9281

Conversation

keithjgrant
Copy link
Member

@keithjgrant keithjgrant commented Feb 9, 2021

SUMMARY

Replaces CodeMirror component with AceEditor component

Addresses #8905, #8176, #8827

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • UI
NOTES

A note about accessibility/keyboard navigation, since I do some unusual manipulation of tabIndex: I based my approach on the way PF handles their CodeEditor component (https://patternfly-react.surge.sh/components/code-editor).

When navigating via keyboard, the editor is first highlighted in a non-editable mode. The user can continue to tab through the page to the next input, or they may press Enter to begin editing the code input. While editing, tabs are typed into the input area as normal input. Pressing escape (or Shift-Tab) will leave the editable mode, returning to the "selected" mode, where the user may continue to tab through the page normally.

Mouse navigation works as normal: click the editor to place a cursor and begin typing.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@keithjgrant keithjgrant marked this pull request as ready for review February 18, 2021 18:06
@keithjgrant keithjgrant requested review from jakemcdermott and marshmalien and removed request for jakemcdermott February 18, 2021 19:40
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

"ansi-to-html": "^0.6.11",
"axios": "^0.21.1",
"codemirror": "^5.47.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

😌

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Contributor

@jakemcdermott jakemcdermott left a comment

Choose a reason for hiding this comment

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

  • Code lgtm.
  • I lightly tested this, but focused mostly on the details component. There's a few things we're aiming to disable when in readOnly mode which I discussed w/ @keithjgrant offline.

That said, we'll want several sets of eyes to take a look.

cc @mabashian @jlmitch5 @marshmalien @nixocio @AlexSCorey

@unlikelyzero
Copy link

@keithjgrant do you mind syncing with @one-t before code review is done to get a feel for the impact to the tests? Hopefully it's widespread (coverage), but easy to fix

Copy link
Contributor

@nixocio nixocio left a comment

Choose a reason for hiding this comment

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

🚀 great job @keithjgrant .

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

* fix typing space character
* hide cursor when editor doesn't have user focus
* show help text any time editor is in focus
* fix content shifting when help text appears/disappears
* remove 80 character "print limit" line
@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build failed.

@unlikelyzero
Copy link

Regate

@one-t
Copy link
Contributor

one-t commented Mar 12, 2021

recheck

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@unlikelyzero
Copy link

Regate

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 8ba9eef into ansible:devel Mar 12, 2021
nixocio pushed a commit to nixocio/awx that referenced this pull request Mar 15, 2021
…acement

AceEditor - codemirror replacement

Reviewed-by: John Hill <johill@redhat.com>
             https://github.com/unlikelyzero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants