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

Add busy/loading indicators and enable on Template #1493

Merged
merged 16 commits into from
Jul 24, 2020
Merged

Conversation

philippjfr
Copy link
Member

Adds two boolean indicators which can be used independently or in one of the default templates.

BooleanStatus

Screen Shot 2020-07-23 at 12 20 29 PM

LoadingSpinner

Screen Shot 2020-07-23 at 12 20 40 PM

Template

Screen Shot 2020-07-23 at 12 21 46 PM

Here we can see the indicator on the right of the template header.

@philippjfr philippjfr force-pushed the indicators branch 2 times, most recently from 175171a to 4895257 Compare July 23, 2020 10:31
@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Jul 23, 2020

Awesome.

Will it be possible to easily set a custom color?

In general it would be nice to set a custom color for the different button_type, booleanstatus_type, loadingspinner_type etc.. In an organisation there is normally some kind of branding guide you need to follow.

It would be nice to set that style in one place instead of many places. Setting it in CSS if it is easy would also be a good solution. In some of the material frameworks you can set :root settings like --primary-color in CSS and then everything just changes. That is nice. With Panel right now it's not easy.

@philippjfr philippjfr force-pushed the indicators branch 3 times, most recently from 64554fc to b2469de Compare July 23, 2020 10:38
@philippjfr
Copy link
Member Author

Will it be possible to easily set a custom color?

No, this is currently not supported and can't be easily supported until we improve the way CSS is handled and built. I have plans to switch to something like Sass and compile the CSS properly but for now defining preset colors is the best we can do.

@philippjfr philippjfr force-pushed the indicators branch 2 times, most recently from 04f47e3 to 9d527d7 Compare July 23, 2020 10:51
@philippjfr
Copy link
Member Author

In some of the material frameworks you can set :root settings like --primary-color in CSS and then everything just changes.

That is definitely going to be part of that CSS refactoring work.

panel/_styles/widgets.css Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 23, 2020

Codecov Report

Merging #1493 into master will increase coverage by 0.22%.
The diff coverage is 88.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1493      +/-   ##
==========================================
+ Coverage   86.09%   86.31%   +0.22%     
==========================================
  Files         141      142       +1     
  Lines       15656    15766     +110     
==========================================
+ Hits        13479    13609     +130     
+ Misses       2177     2157      -20     
Impacted Files Coverage Δ
panel/template/base.py 69.39% <68.29%> (+11.60%) ⬆️
panel/io/state.py 59.63% <100.00%> (+2.75%) ⬆️
panel/tests/test_template.py 97.40% <100.00%> (+1.65%) ⬆️
panel/viewable.py 70.30% <100.00%> (+0.52%) ⬆️
panel/widgets/indicators.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2042bbb...0078938. Read the comment docs.

@philippjfr philippjfr merged commit 67bf192 into master Jul 24, 2020
@philippjfr philippjfr deleted the indicators branch July 24, 2020 12:51
@philippjfr philippjfr added this to the v0.10.0 milestone Jul 26, 2020
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.

3 participants