-
Notifications
You must be signed in to change notification settings - Fork 349
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
New extension - Code Viewer #2553
Conversation
As an initial POC I've created the TextViewer as a widget within the pipeline editor widget package. In a final version it would be a separate package. The POC also includes a button the pipeline toolbar that opens the viewer with the pipeline file contents as an example of how it works. Frontend POC for elyra-ai#2549
Thanks for making a pull request to Elyra! To try out this branch on binder, follow this link: |
I actually checked and I need to work on the context menu in general. If you open a md file then switch to a viewer the open preview option shows up and opens the preview for the md tab that was just open |
Since there isn't anything code specific about the viewer's functionality, should we perhaps change the extension name to something more generic? For example, one might use the viewer to display plain text. |
I've created a new label |
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.
Code LGTM - haven't tested locally
I "solved" the context menu issues by simply disabling the jupyterlab context menu and letting the normal system context menu open when inside the viewer. (This lets users copy text). I've also removed the test code so this is ready to merge. If further testing is desired you will want to check out the code then revert one commit to re-add the test code. |
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.
LGTM
Code Viewer adds a command that will display a given chunk of code (string) in a transient read-only "editor" without needing to create a file.
Adds a new Elyra extension: Code Viewer
Code Viewer adds a command that will display a given chunk of
code (string) in a transient read-only "editor" without needing to
create a file.
The new command takes in a string of the code chunk or text to
display as well as an option mime type or extension to enable code
highlighting. It then opens a read-only "editor" containing the given
content. This allows for transient display of text without the need to
persist it to a file to display it to a user.
Frontend for #2549
Remaining To Do's:
Developer's Certificate of Origin 1.1