-
Notifications
You must be signed in to change notification settings - Fork 842
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
fixed readonly property of code-editor #2967
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
This doesn't seem to fix the problem described in the ticket (Notice, there's still no react-ace isn't the most accessible thing so there isn't an API to do this, we have to mutate the dom after render to do this. (Kibana example, though I did mess up a little, the value of |
Fixed it, by updating ace to 8.0.0. |
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.
Great, I can see that readonly
is now applied!
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_2967/ |
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.
I think it's a combination of the react-ace
version update and the removal of brace
from its deps, but syntax validation no longer occurs (compare https://eui.elastic.co/#/forms/code-editor to https://eui.elastic.co/pr_2967/#/forms/code-editor)
It's possible swapping the brace
import statements for ace-build
imports will solve it, but that may constitute a breaking change for consumers. Was a readOnly
feature the reason for the version update, or can we continue to use [email protected]
and reinstate the brace
imports?
Without updating |
@myasonik I am trying to restore highlighting |
@thompsongl I have fixed syntax validation ,highlight |
we should go with newer version as it major part was |
We'll need to label this as a breaking change because of the |
It's been too long since I've looked into the differences in the various ace packages, so I don't know what I may be mis-attributing to another package, and we'd need a full exploration of these changes to know. Another option, given:
is related to #2961 where we're already exploring dynamic attribution setting after mount |
Maybe we just do this as a post-render update and table the package update until we can do a full test that it doesn't break anything |
Right, I think I'd prefer avoiding the package update if we're planning on supplementing attributes anyway. |
Closing this in favor of post-render, dynamic attribute supplementation (see #2961) |
Summary
Fixes : #2960
fixed readonly property of code-editor
reference : https://github.com/securingsincity/react-ace/blob/master/docs/Ace.md
readOnly should be passed directly to the ace-editor instead of an option as suggested by the documentation
Checklist