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 loading_indicator to global config #4259

Merged
merged 4 commits into from
Jan 11, 2023

Conversation

MarcSkovMadsen
Copy link
Collaborator

Closes #4258

@codecov
Copy link

codecov bot commented Jan 8, 2023

Codecov Report

Merging #4259 (1c18c5b) into main (ff8037e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #4259      +/-   ##
==========================================
+ Coverage   82.71%   82.73%   +0.01%     
==========================================
  Files         237      237              
  Lines       34283    34320      +37     
==========================================
+ Hits        28358    28395      +37     
  Misses       5925     5925              
Flag Coverage Δ
ui-tests 37.95% <34.14%> (-0.01%) ⬇️
unitexamples-tests 73.92% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
panel/config.py 60.31% <100.00%> (+0.10%) ⬆️
panel/param.py 86.68% <100.00%> (+0.23%) ⬆️
panel/tests/test_param.py 99.69% <100.00%> (+0.01%) ⬆️
panel/io/state.py 70.37% <0.00%> (-0.18%) ⬇️

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

@MarcSkovMadsen
Copy link
Collaborator Author

MarcSkovMadsen commented Jan 8, 2023

This app can be used for manual testing

import time

import param

import panel as pn

pn.extension(loading_indicator=True)

class App(param.Parameterized):
    run = param.Event()
    clicks = param.Integer(-1)

    @pn.depends("run")
    def click_view(self):
        self.clicks+=1
        time.sleep(0.5)
        return f"Clicked {self.clicks} times"

app=App()
pn.Column(app.param.run, app.click_view).servable()

Assets

loading-indicator.mp4

loading-indicator (1)

panel/param.py Outdated Show resolved Hide resolved
@MarcSkovMadsen MarcSkovMadsen marked this pull request as ready for review January 8, 2023 06:48
@MarcSkovMadsen MarcSkovMadsen added this to the v0.14.3 milestone Jan 8, 2023
Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@philippjfr philippjfr merged commit 0b104b1 into main Jan 11, 2023
@philippjfr philippjfr deleted the feature/config-loading-indicator branch January 11, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make loading_indicator a valid config parameter
2 participants