10000 Add ability to require explicit load of ReactiveHTML extension by philippjfr · Pull Request #3254 · holoviz/panel · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@philippjfr
Copy link
Member
@philippjfr philippjfr commented Mar 23, 2022

Currently any ReactiveHTML component that is imported when the panel extension is run or a server app is served for the first time will be loaded and all its JS/CSS dependencies will be embedded in the page. This isn't really a nice way to handle this problem because it creates a tension between offering helpful namespaces that include all components and reducing the number of external JS/CSS that are included in the page. To get around this we introduce the concept of a ReactiveHTML._extension_name. This, if declared, tells Panel not to load the dependencies for this component unless it has been explicitly loaded with pn.extension(<extension_name>). This replicates the behavior we have long implemented for regular Bokeh models with dependencies we do not want to include by default and which have to be loaded using the panel extension.

@codecov
Copy link
codecov bot commented Mar 23, 2022

Codecov Report

Merging #3254 (2dc98ff) into master (32dc94f) will increase coverage by 0.10%.
The diff coverage is 61.53%.

@@            Coverage Diff             @@
##           master    #3254      +/-   ##
==========================================
+ Coverage   83.03%   83.14%   +0.10%     
==========================================
  Files         195      195              
  Lines       25986    26006      +20     
==========================================
+ Hits        21578    21623      +45     
+ Misses       4408     4383      -25     
Impacted Files Coverage Δ
panel/config.py 60.23% <0.00%> (-0.71%) ⬇️
panel/io/resources.py 82.95% <75.00%> (ø)
panel/reactive.py 77.37% <78.57%> (+0.01%) ⬆️
panel/layout/__init__.py 100.00% <100.00%> (ø)
panel/layout/gridstack.py 52.54% <100.00%> (+52.54%) ⬆️
panel/models/reactive_html.py 80.28% <0.00%> (+0.70%) ⬆️
panel/io/datamodel.py 48.95% <0.00%> (+1.04%) ⬆️

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 32dc94f...2dc98ff. Read the comment docs.

@philippjfr philippjfr merged commit 2819a83 into master Mar 23, 2022
@philippjfr philippjfr deleted the reactive_loading branch March 23, 2022 12:44
@philippjfr philippjfr added this to the v0.13.0 milestone Mar 23, 2022
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0