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

Provide ability to set design system independently from template #4326

Merged
merged 25 commits into from
Feb 16, 2023

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Jan 26, 2023

This PR introduces the concept of a Design which can be configured directly on individual components, globally on the pn.config and via a template (i.e. the MaterialTemplate uses the Material Design object).

This allows applying design system to our components independently of templates, e.g. also in notebooks. Here is an overview of the design of different component types in a notebook. This is very much a WIP and I'm not aiming to get everything looking perfectly in this PR. I'm mostly trying to ensure that the different design systems we offer render at all and further tweak specific CSS in subsequent PRs.

Below are the three design systems displayed in JupyterLab (using the default theme and adapting to the JupyterLab theme). Note that any properties set in Python, e.g. the Bokeh theme, do not automatically adapt to the JupyterLab dark theme.

Bootstrap

Screen Shot 2023-02-14 at 19 25 56

Screen Shot 2023-02-14 at 23 24 00

Screen Shot 2023-02-14 at 19 26 05

Screen Shot 2023-02-15 at 13 02 41

Screen Shot 2023-02-14 at 19 26 13

Screen Shot 2023-02-15 at 13 02 50

Material

Screen Shot 2023-02-14 at 19 28 03

Screen Shot 2023-02-15 at 13 01 14

Screen Shot 2023-02-14 at 19 29 31

Screen Shot 2023-02-15 at 13 01 36

Screen Shot 2023-02-14 at 19 28 35

Screen Shot 2023-02-15 at 13 02 10

Fast

Screen Shot 2023-02-15 at 12 54 22

Screen Shot 2023-02-15 at 12 28 45

Screen Shot 2023-02-15 at 12 54 46

Screen Shot 2023-02-15 at 12 55 22

Screen Shot 2023-02-15 at 12 55 00

Screen Shot 2023-02-15 at 12 55 42

@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Merging #4326 (53295c3) into main (077b86e) will decrease coverage by 0.03%.
The diff coverage is 83.73%.

@@            Coverage Diff             @@
##             main    #4326      +/-   ##
==========================================
- Coverage   81.80%   81.77%   -0.03%     
==========================================
  Files         238      243       +5     
  Lines       34872    35206     +334     
==========================================
+ Hits        28526    28791     +265     
- Misses       6346     6415      +69     
Flag Coverage Δ
ui-tests 35.73% <42.07%> (-0.23%) ⬇️
unitexamples-tests 73.63% <83.59%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
panel/layout/tabs.py 90.35% <ø> (ø)
panel/template/fast/grid/__init__.py 100.00% <ø> (ø)
panel/template/fast/list/__init__.py 100.00% <ø> (ø)
panel/template/golden/__init__.py 84.61% <ø> (-6.30%) ⬇️
panel/compiler.py 10.78% <8.33%> (+0.39%) ⬆️
panel/config.py 57.00% <25.00%> (-2.85%) ⬇️
panel/layout/accordion.py 87.61% <33.33%> (-1.49%) ⬇️
panel/io/document.py 51.42% <41.66%> (-2.74%) ⬇️
panel/io/resources.py 81.36% <50.00%> (-3.26%) ⬇️
panel/pane/holoviews.py 78.97% <50.00%> (-0.11%) ⬇️
... and 39 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@philippjfr philippjfr force-pushed the branch-1.0 branch 2 times, most recently from f9a5320 to d7df015 Compare February 8, 2023 16:28
Base automatically changed from branch-1.0 to main February 8, 2023 18:04
@philippjfr philippjfr closed this Feb 8, 2023
@philippjfr philippjfr reopened this Feb 8, 2023
@philippjfr
Copy link
Member Author

pre-commit.ci autofix

@philippjfr philippjfr mentioned this pull request Feb 12, 2023
@philippjfr philippjfr changed the title Factor out theme handling from templates Provide ability to set design system independently from template Feb 15, 2023
@MarcSkovMadsen
Copy link
Collaborator

Would ot be possible One day to set the design system in a separate package? Say I want to use a custom design system.

@philippjfr
Copy link
Member Author

Would ot be possible One day to set the design system in a separate package? Say I want to use a custom design system.

Definitely, if you provide URLs you should already be able to achieve this. Still have to add support for serving them locally though.

@philippjfr philippjfr force-pushed the themers branch 2 times, most recently from cf09bf1 to 1b1ab09 Compare February 15, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants