The current definition of the DashApp struct should be made comparable to the Dash class in R and Python (it can remain a struct, but the interface provided to users should be more or less identical):
| struct DashApp |
| name ::String |
| layout ::Component |
| callbacks ::Dict{Symbol, Callback} |
| external_stylesheets ::Vector{String} |
| external_scripts ::Vector{String} |
| url_base_pathname ::String |
| assets_folder ::String |
| callable_components ::Dict{Symbol, Component} |
| type_links ::Dict{Symbol, Dict{Symbol, Type}} |
| functionDashApp(name::String, layout::Component; |
| external_stylesheets ::Vector{String}=Vector{String}(), |
| external_scripts ::Vector{String}=Vector{String}(), |
| url_base_pathname="/", |
| assets_folder::String="assets") |
| new(name, layout, Dict{Symbol, Callback}(), |
| external_stylesheets, external_scripts, |
| url_base_pathname, assets_folder, |
| Components.collect_with_ids(layout), Dict{Symbol, Dict{Symbol, Type}}() |
| ) |
| end |
| end |
For parity, if possible, we should use similar names across all backends
The following initial additions to the Dash.jl API are proposed:
We should consider removing the following elements:
- [ ] Remove callable_components, any required logic can be rolled into internal component handling, in similar fashion to Python and R
- [ ] Remove type_links
A full list of current Dash parameters appears below; eventually all three backends should support these.
| 🏁 | Pull request | Element | Python | R | Julia |
|---|
| | | | | |
| ✔️ | | name | ✔️ | ✔️ | ✔️ |
| ✔️ | | assets_folder | ✔️ | ✔️ | ✔️ |
| ✔️ | | url_base_pathname | ✔️ | ✔️ | ✔️ |
| ✔️ | | external_scripts | ✔️ | ✔️ | ✔️ |
| ✔️ | | external_stylesheets | ✔️ | ✔️ | ✔️ |
| ✔️ | | assets_url_path | ✔️ | ✔️ | ✔️ |
| ✔️ | | meta_tags | ✔️ | ✔️ | ✔️ |
| ✔️ | | requests_pathname_prefix | ✔️ | ✔️ | ✔️ |
| ✔️ | | routes_pathname_prefix | ✔️ | ✔️ | ✔️ |
| ✔️ | | suppress_callback_exceptions | ✔️ | ✔️ | ✔️ |
| ✔️ | | index_string | ✔️ | ✔️ | ✔️ |
| ✔️ | | show_undo_redo | ✔️ | ✔️ | ✔️ |
| ✔️ | | compress | ✔️ | ✔️ | ✔️ |
| ✔️ | | assets_ignore | ✔️ | ✔️ | ✔️ |
| ✔️ | | serve_locally | ✔️ | ✔️ | ✔️ |
| ✔️ | | eager_loading | ✔️ | ✔️ | ✔️ |
| | include_assets_files | ✔️ | ❌ | ✔️ |
| | assets_external_path | ✔️ | ❌ | ❌ |
The current definition of the
DashAppstruct should be made comparable to theDashclass in R and Python (it can remain a struct, but the interface provided to users should be more or less identical):Dash.jl/src/Dash.jl
Lines 98 to 119 in 2707170
For parity, if possible, we should use similar names across all backends
callbackstocallbackThe following initial additions to the Dash.jl API are proposed:
serve_locallyparametersuppress_callback_exceptionsparameterassets_ignoreparameterassets_url_pathparameterlayout_getmethodWe should consider removing the following elements:
- [ ] Removecallable_components, any required logic can be rolled into internal component handling, in similar fashion to Python and R- [ ] Removetype_linksnamewith a warning message as in Dash for R, and suggest usingtitleinstead.A full list of current Dash parameters appears below; eventually all three backends should support these.
nameassets_folderurl_base_pathnameexternal_scriptsexternal_stylesheetsassets_url_pathmeta_tagsrequests_pathname_prefixroutes_pathname_prefixsuppress_callback_exceptionsindex_stringshow_undo_redocompressassets_ignoreserve_locallyeager_loadinginclude_assets_filesassets_external_path