-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Refactor Dash.jl to support same parameters as Dash for Python & R #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waralex Wow, this is really coming along! I've made a few initial comments, but I'll also run locally and take a look while running some of the sample code.
This PR will be a big leap in the right direction where the Dash.jl API is concerned, at least in terms of parity with the existing backend implementations.
callable_components ::Dict{Symbol, Component} | ||
|
||
DashApp(name::String, config::DashConfig) = new(name, config, Layout(nothing), Dict{Symbol, Callback}(), Dict{Symbol, Component}()) | ||
|
||
end | ||
|
||
function layout!(app::DashApp, component::Component) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waralex I imagine this function updates the layout
within app
to include the tree of components that are passed? If that's the case, does layout
support passing a function that returns a component?
i.e. in both Python and R, I believe, the layout
can be passed a tree of components or a single function. for example:
def _layout_value(self):
return self._layout() if self._layout_is_function else self._layout
or
layout = function(...) {
private$layout_ <- if (is.function(..1)) ..1 else list(...)
invisible(private$layout_render())
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rpkyle function is not supported yet, so you can add it to issues list so I don't forget it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-Authored-By: Ryan Patrick Kyle <[email protected]>
Co-Authored-By: Ryan Patrick Kyle <[email protected]>
Co-Authored-By: Ryan Patrick Kyle <[email protected]>
I decided to take a stab at HTTP compression in #14, so hopefully that will help with a small portion of the HTTP.jl work. Otherwise, this looks great. Onward to the next set of challenges! 💃 |
Partial implementation of the issue #4
Added to config:
Implemented and added to tests behavior for:
It makes sense to deal with parameters related to resource collection and management (assets_ignore, include_assets_files, serve_locally, eager_loading) simultaneously with the new component generation system, because as part of this task, I will need to re-create the resource storage system.
The server-related parameters (server and compression) will also be implemented as a separate issue, because to do this, I need to learn more about the HTTP.jl package