Skip to content

CSV/JSON renderer in JupyterLab #832

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

Merged
merged 2 commits into from
Dec 7, 2019
Merged

CSV/JSON renderer in JupyterLab #832

merged 2 commits into from
Dec 7, 2019

Conversation

timkpaine
Copy link
Member

@timkpaine timkpaine commented Dec 3, 2019

Initial cut at a CSV/JSON viewer in jupyterlab

Standalone CSV/JSON viewer:

  • Can parse records-oriented JSON or CVS, available from the right click menus for Open With
  • Shows error for datatypes can't parse
  • Grabs light/dark theme from environment
  • Changes when theme is changed

Updates for PerspectiveWidget:

  • If you don't pass in dark=True or dark=False, it will pick it up from the environment

@timkpaine timkpaine added enhancement Feature requests or improvements JS Jupyter labels Dec 3, 2019
@texodus texodus requested a review from sc1f December 4, 2019 19:20
@timkpaine
Copy link
Member Author

tmp

starting

adding perspective csv/json browser

bugfixes for widgets/jlab phosphor differences

working on themeing

pickup theme from env if not set

fix stale comment

remove local registry
@texodus
Copy link
Member

texodus commented Dec 7, 2019

Thanks for the PR and review! This is a cool feature!

I will merge this now, but I have reservations about this design. I do not think dark keyword argument is the right API for this, and I definitely do not think it belongs on PerspectiveViewer class. IMO, dark is Jupyter-specific and should be implemented as Widget.addClass() calls here where we already know the jupyter dark class names, rather than manipulating an attribute dark that ultimately does the same thing.

PerspectiveViewer inherits from Widget which makes this possible, as <perspective-viewer> inherits HTMLElement, and should similarly use class to manipulate DOM style.

@texodus texodus merged commit b929dab into master Dec 7, 2019
@texodus texodus deleted the renderer branch December 7, 2019 18:04
@timkpaine
Copy link
Member Author

Yep, I think we want to expose full styles themselves into python rather than just light/dark . But light/dark was an existing api, not a new api, so it wouldn't make sense to implement that change in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements JS Jupyter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants