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

Create theme exporter #7

Merged

Conversation

HaudinFlorence
Copy link
Member

@HaudinFlorence HaudinFlorence commented Jan 13, 2023

Version of the theme editor where the parameters changed in the theme editor are exported to a variable.css file that can be downloaded.

@github-actions
Copy link

Binder 👈 Launch a Binder on branch HaudinFlorence/jupyterlab-theme-editor/create_theme_exporter

…o an hexadecimal compatible string was not working due to the presence of white spaces. Inversion between white and black hexadecimal affection was also corrected.
@fcollonval fcollonval changed the base branch from create_theme_exporter to main January 20, 2023 09:40
Comment on lines 23 to 25
env = Environment(loader=PackageLoader(
"jupyter_theme_editor", "templates"))
j2_template = env.get_template("template.css")
Copy link
Member

Choose a reason for hiding this comment

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

We can do thing a bit better here because the Environment and finding the template is gonna be always the same. We can pass them in the initialize to avoid recreating them every time.

See that example:

https://github.com/jupyterlab/pull-requests/blob/453ef305f3b0fe4d1781aa2ecea85d7a2ec9c3f0/jupyterlab_pullrequests/handlers.py#L32

And how to pass the keyword arguments to initialize

https://github.com/jupyterlab/pull-requests/blob/453ef305f3b0fe4d1781aa2ecea85d7a2ec9c3f0/jupyterlab_pullrequests/handlers.py#L226

Copy link
Member Author

@HaudinFlorence HaudinFlorence Jan 20, 2023

Choose a reason for hiding this comment

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

@fcollonval Thanks a lot for the review. A tentative changed is proposed in commit c8c9a6e

package.json Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
src/view.tsx Outdated Show resolved Hide resolved
src/view.tsx Outdated Show resolved Hide resolved
style/template.css Outdated Show resolved Hide resolved
style/base.css Outdated Show resolved Hide resolved
style/index.css Outdated Show resolved Hide resolved
HaudinFlorence and others added 5 commits January 20, 2023 11:37
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
Co-authored-by: Frédéric Collonval <[email protected]>
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

This looks good @HaudinFlorence

You can merge

@HaudinFlorence HaudinFlorence marked this pull request as ready for review January 25, 2023 16:41
@HaudinFlorence HaudinFlorence merged commit c070696 into jupyterlab-contrib:main Jan 25, 2023
@fcollonval fcollonval added the enhancement New feature or request label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants