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 explanation docs about APIs #6289

Merged
merged 14 commits into from
Mar 10, 2024
Merged

Add explanation docs about APIs #6289

merged 14 commits into from
Mar 10, 2024

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Jan 31, 2024

In this PR I plan to add two different explanation sections:

  • Reactivity vs Callbacks (Preview)
  • Functions vs Classes

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 71.56%. Comparing base (ee579e6) to head (b5270ef).
Report is 3 commits behind head on main.

Files Patch % Lines
panel/param.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #6289       +/-   ##
===========================================
- Coverage   81.91%   71.56%   -10.36%     
===========================================
  Files         310      310               
  Lines       45992    45996        +4     
===========================================
- Hits        37676    32917     -4759     
- Misses       8316    13079     +4763     
Flag Coverage Δ
ui-tests ?
unitexamples-tests 71.56% <50.00%> (+0.08%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
doc/explanation/api/reactivity.md Show resolved Hide resolved
doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
doc/explanation/api/reactivity.md Show resolved Hide resolved
doc/explanation/api/reactivity.md Show resolved Hide resolved
Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

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

Looks good. For expedience I pushed some direct edits to the PR, so please review that commit and make sure I didn't break anything. :-) I think this guide helps, but I still think we'll need more info, e.g. "what are all the cases where I can provide a parameter object and it will be treated as a reactive object"? Clearly some Panel objects accept them for Parameter values; is it all Panel objects, for all Parameters?

:link: reactivity
:link-type: doc

A discussion that contrasts reactive and callback based APIs in Panel.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure "discussion" adds much here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Might misunderstand the above context, but I think I ran into the above issue when using layouts. To my surprise it was quite easy (for Philip at least :-) ) to update this in the Panel code for Flexbox. See below.

A number of ListLike layouts do not support objects = at the moment. The PR below would fix that and make behaviour more uniform.

I Made a PR for Flexbox, Philip, was able to fix it with +- 5 lines of changed code. At his request I made this PR for the other layouts: #6389

doc/explanation/api/reactivity.md Outdated Show resolved Hide resolved
@philippjfr philippjfr merged commit 67e26af into main Mar 10, 2024
11 of 15 checks passed
@philippjfr philippjfr deleted the reactive_explanation branch March 10, 2024 13:18
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.

None yet

4 participants