Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains another round of updates, cleanup, and refactoring.
Highlights:
Plugin
Introduces a dash app plugin that customizes the behavior of
app.callback
, rather than requiring the use ofdx.callback
. (Closes #4)Compatibility
Full backward compatibility with Dash 1. The new Dash Express features are only available when providing
@app.callback
with theinput
/state
/output
keyword arguments, but regular dependency objects are now accepted as positional arguments again.Remove
ComponentProps
Removes the
component.props[...]
syntax and theComponentProps
class. Instead, a newprops
argument is added todx.arg
. So now, to customize the component properties you doinstead of
It avoids introducing an additional class, and it provides a place (
arg
) to document that the default value is"value"
. This is a proposed resolution of #6.Default argument kind
The default value of
kind
indx.arg
is now determined by whether the value is passed in theinput
orstate
keyword argument. This argument can be overridden by explicitly providing a value to thedx.arg
constructor. This makes it possible to define the "manual" workflow more easily.Instead of:
All of the components specifications can be passed to the
state
keyword argument, and the button specified askind=input
so that it is treated as input.Documentation and Demos
The DOCUMENTATION.md and associated demos have been updated with these changes