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

Enable JSON viewer for .pipeline files #1943

Closed
ptitzler opened this issue Jul 22, 2021 · 5 comments · Fixed by #2511
Closed

Enable JSON viewer for .pipeline files #1943

ptitzler opened this issue Jul 22, 2021 · 5 comments · Fixed by #2511
Assignees
Labels
kind:enhancement New feature or request
Milestone

Comments

@ptitzler
Copy link
Member

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently .pipeline files can only be opened in the VPE or the plain text editor from the File Browser context menu:

image

Describe the solution you'd like

Enable the JSON viewer (like it is for Jupyter notebooks) to make it easier to browse the file:
image

@ptitzler ptitzler added the kind:enhancement New feature or request label Jul 22, 2021
@akchinSTC
Copy link
Member

@ajbozarth - thoughts?

@ajbozarth
Copy link
Member

As I mentioned in the dev meeting I took a swing at addressing this sometime last year and actually spent some time on it.

The options that are show in the context menu are determined by the widget factories. When a widget factory is created it lists the file types that it supports, which would then list that widget as an option in the context menu for that file type. In this case the JSON extension in core creates the factory and sets the file types (json and notebook). File types are separately defined in the doc registry. In pipeline-editor-extension we add the pipeline file type for .pipeline files and the PipelineEditorFactory is created with the pipeline file type listed.

To add pipeline files to the JSON factory we would need to add it in core JL. If .pipeline was a standard format we might be able to do that (geojson file type is also supported), but it is not a standard format so I would expect such a PR would be rejected.

Another option would be to "override" the JSON factory by removing it and then adding an extension that "extends" it ourselves with the pipeline file type support, but the JSON editor does not seem easily extendable to do so.

As my extensive work on this is well over a year old things might have changed on the JL core side that would more easily allow this feature add though if someone else wants to take the time to look into it again.

@marthacryan marthacryan self-assigned this Jul 30, 2021
@ajbozarth
Copy link
Member

Leaving a note here, it seems the Doc Registry can now be extended, so we "may" be able to implement the "override" idea at the docRegistry level instead. Not sure if it would be useful but I'll make note of this here jupyterlab/jupyterlab#10256

@lresende lresende added this to the 3.1.x milestone Aug 2, 2021
@marthacryan marthacryan removed their assignment Oct 1, 2021
@ajbozarth
Copy link
Member

IIUC jupyterlab/jupyterlab#11540 has added support for this. Once that is released we'll be able to add this support. As such moving this to the 4.0 sprint (with the assumption that it will be release in lab 4)

@ajbozarth ajbozarth modified the milestones: Backlog Long Term, 4.0.0 Dec 15, 2021
@ajbozarth ajbozarth self-assigned this Dec 15, 2021
@ajbozarth ajbozarth modified the milestones: 4.0.0, 3.7.0 Feb 22, 2022
@ajbozarth
Copy link
Member

Once #2495 is merged this should be pretty trial for me to fix

ajbozarth added a commit to ajbozarth/elyra that referenced this issue Feb 28, 2022
Pipieline files can currently be opened in either the pipeline
editor or the file editor. This uodate also allows users to open
pipeline files with the JSON viewer.

Fixes elyra-ai#1943
akchinSTC pushed a commit that referenced this issue Mar 1, 2022
Pipieline files can currently be opened in either the pipeline
editor or the file editor. This uodate also allows users to open
pipeline files with the JSON viewer.

Fixes #1943
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants