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

475 Pattern Matching Callbacks (codenamed wildcards) #1103

Merged
merged 88 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
76d5fad
cleanup: break out validation, clean up usage
alexcjohnson Oct 11, 2019
53a952b
wildcards back end
alexcjohnson Oct 15, 2019
505d561
remove useless `switch` in dependencyGraph.js
alexcjohnson Oct 23, 2019
e2e3566
remove obsolete pre-multi-output fallback from dependencyGraph.js
alexcjohnson Oct 23, 2019
05908b2
wildcards front end
alexcjohnson Oct 29, 2019
aef7cca
python linting and a little wildcard validation fixing
alexcjohnson Jan 30, 2020
58eaa96
update tests for pendingCallbacks and new paths structure
alexcjohnson Jan 30, 2020
8305bbf
fix fix redux_state_rqs
alexcjohnson Jan 30, 2020
b517f8b
fix isAppReady test
alexcjohnson Jan 30, 2020
830ab23
more robust moveHistory
alexcjohnson Jan 30, 2020
e0fea66
ugh py2 unicode fix
alexcjohnson Jan 30, 2020
3acf89b
fix single-output as multi
alexcjohnson Jan 30, 2020
822b935
fix circular dep check and initial callback prevention
alexcjohnson Jan 30, 2020
97f9aa0
fix persistence edge case for pendingCallbacks world
alexcjohnson Jan 31, 2020
2019f8f
fix callback_context
alexcjohnson Jan 31, 2020
126f53a
update tests
alexcjohnson Jan 31, 2020
53a81c3
lint
alexcjohnson Jan 31, 2020
b4ad963
bring back previous error message formatting
alexcjohnson Jan 31, 2020
04c3289
lint
alexcjohnson Jan 31, 2020
8a246c1
fix error reporting for single-output callbacks
alexcjohnson Feb 1, 2020
4a32012
ANY -> MATCH
alexcjohnson Feb 3, 2020
abceaf4
wildcards initial test
alexcjohnson Feb 4, 2020
e896169
some test tweaks - linting, and hopefully robustifying graphs in percy
alexcjohnson Feb 4, 2020
7c18830
trigger wildcard callbacks when items deleted from an array input
alexcjohnson Feb 5, 2020
817d790
extra tests & debugging to help with reported errors
alexcjohnson Feb 5, 2020
a776632
thread-safe passing of outputs_list to callback wrapper
alexcjohnson Feb 5, 2020
a28a62d
robustify wildcard test
alexcjohnson Feb 5, 2020
95e6936
split out existing callback_context tests to their own file
alexcjohnson Feb 6, 2020
8186fa5
backward compatibility fix for callback_context.triggered
alexcjohnson Feb 6, 2020
db070b3
handle callback queue race condition
alexcjohnson Feb 10, 2020
7a192b2
simpler - and hopefully more robust - solution to callback race issue
alexcjohnson Feb 10, 2020
13acfda
Py2 fix for callback context backward compatibility shim
alexcjohnson Feb 10, 2020
3a38f58
fix callback_context test for py2
alexcjohnson Feb 10, 2020
8a1f5e5
Merge branch 'dev' into 475-wildcards
Marc-Andre-Rivet Feb 17, 2020
1aa6bcf
fix unique key warning from error components
alexcjohnson Feb 28, 2020
1cd18bd
fix & test for dcc.Location multi-path case
alexcjohnson Feb 29, 2020
20355fa
Merge branch 'dev' into 475-wildcards
alexcjohnson Feb 29, 2020
316cdd8
fix the fix for dcc.Location multi-path init case
alexcjohnson Feb 29, 2020
7e57ed1
fix #1105 - isAppReady with an unrendered but in-layout async component
alexcjohnson Mar 6, 2020
d39e3ad
closes #1053 - add test for complex callback graph with preventDefault
alexcjohnson Mar 6, 2020
5b25247
close #1071 - add test for chained callbacks with table coming in late
alexcjohnson Mar 6, 2020
5694843
close #1084 - callback chain with sliders and multiple outputs
alexcjohnson Mar 6, 2020
21dc9eb
close #635 - converging callback graph from a multi-output start
alexcjohnson Mar 6, 2020
11d0530
remove commented-out, never-used wildcards code
alexcjohnson Mar 12, 2020
3d4daaa
show initialization errors in devtools
alexcjohnson Mar 20, 2020
ad74d62
special test method for element to be missing
alexcjohnson Mar 20, 2020
e9a47bf
move non-layout-linked callback validation to the front end
alexcjohnson Mar 20, 2020
5b27dd7
move layout-linked callback validation to the front end
alexcjohnson Mar 26, 2020
000e247
Merge branch 'dev' into 475-wildcards
alexcjohnson Mar 26, 2020
1ace29f
add npm-run-all for formatting
alexcjohnson Mar 26, 2020
a3fe1b4
lint/format
alexcjohnson Mar 26, 2020
2b7edec
I guess we were using redux devtools wrong and it only just now compl…
alexcjohnson Mar 27, 2020
d85e79d
tweak dash import in callback validation tests
alexcjohnson Mar 27, 2020
0596540
halt circularity and cb/layout validation after we find earlier errors
alexcjohnson Mar 27, 2020
c28dae6
flow components have no propTypes
alexcjohnson Mar 27, 2020
5a11de5
refactor callback validation tests order-agnostic
alexcjohnson Mar 27, 2020
d3d4ec6
one more kind of order independence in callback validation tests
alexcjohnson Mar 27, 2020
620f48f
ugh more order-dependence fixing
alexcjohnson Mar 27, 2020
8f80410
that extra callback out of order really didn't need to be there
alexcjohnson Mar 27, 2020
d6b4a21
callback graph update + wildcards
alexcjohnson Mar 27, 2020
e203dea
Merge branch 'dev' into 475-wildcards
alexcjohnson Mar 27, 2020
f875766
changelog for wildcards
alexcjohnson Mar 27, 2020
57391f4
Apply suggestions from code review
alexcjohnson Mar 31, 2020
221e388
fix wildcardOverlap for MATCH/ALLSMALLER case, fix mergeAllBlockers, …
alexcjohnson Apr 1, 2020
fa76dd7
Merge branch '475-wildcards' of github.com:plotly/dash into 475-wildc…
alexcjohnson Apr 1, 2020
669ecc1
fix & test multi-app url routing
alexcjohnson Apr 1, 2020
3f46fe6
clean up renderer package-lock
alexcjohnson Apr 1, 2020
883a6ef
rearrange APIController
alexcjohnson Apr 1, 2020
14b7e3c
TreeContainer ramda & other cleanup
alexcjohnson Apr 1, 2020
0675e11
black
alexcjohnson Apr 1, 2020
1e75e9b
fix erroneous changelog message about unchanged props
alexcjohnson Apr 1, 2020
caceaaa
fix and test wildcards with same keys for different element classes
alexcjohnson Apr 1, 2020
6238ee0
log errors from the error reducer
alexcjohnson Apr 1, 2020
380a907
remove now-obsolete console tests re: persistence
alexcjohnson Apr 1, 2020
2f6f301
Merge branch 'dev' into 475-wildcards
alexcjohnson Apr 1, 2020
20b876e
remove InputGraph
alexcjohnson Apr 2, 2020
b5ae436
fix for exact duplicate callback outputs
alexcjohnson Apr 2, 2020
e6f850e
add more callback cycle tests
alexcjohnson Apr 3, 2020
6f772a9
fix for derived props (eg dcc.Store.modified_timestamp)
alexcjohnson Apr 3, 2020
041df7f
--pause option for dash.testing
alexcjohnson Apr 3, 2020
4f5def4
fix the derived props pendingCallbacks fix for multi-output callbacks
alexcjohnson Apr 3, 2020
41fdae1
fix layout changedProps edge case
alexcjohnson Apr 5, 2020
0c76dc7
lint testing/browser
alexcjohnson Apr 5, 2020
90eb451
changelog for --pause option
alexcjohnson Apr 5, 2020
7c47b05
trap ID errors during callback dispatch
alexcjohnson Apr 7, 2020
37daf77
Merge branch 'dev' into 475-wildcards
alexcjohnson Apr 7, 2020
de5e289
black
alexcjohnson Apr 7, 2020
8a03f3a
fix callback_validation tests
alexcjohnson Apr 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [1.10.0] - 2020-04-01
### Added
- [#1103](https://github.com/plotly/dash/pull/1103) Wildcard IDs and callbacks. Component IDs can be dictionaries, and callbacks can reference patterns of components, using three different wildcards: `ALL`, `MATCH`, and `ALLSMALLER`, available from `dash.dependencies`. This lets you create components on demand, and have callbacks respond to any and all of them. To help with this, `dash.callback_context` gets three new entries: `outputs_list`, `inputs_list`, and `states_list`, which contain all the ids, properties, and except for the outputs, the property values from all matched components.
- [#1103](https://github.com/plotly/dash/pull/1103) `dash.testing` option `--pause`: after opening the dash app in a test, will invoke `pdb` for live debugging of both Javascript and Python. Use with a single test case like `pytest -k cbwc001 --pause`.

- [#1134](https://github.com/plotly/dash/pull/1134) Allow `dash.run_server()` host and port parameters to be set with environment variables HOST & PORT, respectively

### Changed
- [#1103](https://github.com/plotly/dash/pull/1103) Multiple changes to the callback pipeline:
- `dash.callback_context.triggered` now does NOT reflect any initial values, and DOES reflect EVERY value which has been changed either by activity in the app or as a result of a previous callback. That means that the initial call of a callback with no prerequisite callbacks will list nothing as triggering. For backward compatibility, we continue to provide a length-1 list for `triggered`, but its `id` and `property` are blank strings, and `bool(triggered)` is `False`.
- A user interaction which returns the same property value as was previously present will not trigger the component to re-render, nor trigger callbacks using that property as an input.
- Callback validation is now mostly done in the browser, rather than in Python. A few things - mostly type validation, like ensuring IDs are strings or dicts and properties are strings - are still done in Python, but most others, like ensuring outputs are unique, inputs and outputs don't overlap, and (if desired) that IDs are present in the layout, are done in the browser. This means you can define callbacks BEFORE the layout and still validate IDs to the layout; and while developing an app, most errors in callback definitions will not halt the app.

- [#1145](https://github.com/plotly/dash/pull/1145) Update from React 16.8.6 to 16.13.0

### Fixed
- [#1103](https://github.com/plotly/dash/pull/1103) Fixed multiple bugs with chained callbacks either not triggering, inconsistently triggering, or triggering multiple times. This includes: [#635](https://github.com/plotly/dash/issues/635), [#832](https://github.com/plotly/dash/issues/832), [#1053](https://github.com/plotly/dash/issues/1053), [#1071](https://github.com/plotly/dash/issues/1071), and [#1084](https://github.com/plotly/dash/issues/1084). Also fixed [#1105](https://github.com/plotly/dash/issues/1105): async components that aren't rendered by the page (for example in a background Tab) would block the app from executing callbacks.

- [#1142](https://github.com/plotly/dash/pull/1142) [Persistence](https://dash.plot.ly/persistence): Also persist 0, empty string etc

## [1.9.1] - 2020-02-27
Expand Down
Loading