Skip to content

1189 julia components #1302

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

Merged

Conversation

waralex
Copy link
Contributor

@waralex waralex commented Jun 12, 2020

Changes in generator to reverse dependencies.
Now the main components depend on DashBase, and the rest depend on Dash. I also took out the logic for checking parameters to DashBase and removed the generation of additional constructors if the component does not have the children property.
Corresponding Dash PR: plotly/Dash.jl#42

Dash.register_package(
Dash.ResourcePkg(
DashBase.register_package(
DashBase.ResourcePkg(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not new here, but is it important that this be two nested calls? Could it be refactored to just:

DashBase.register_package(
    "{project_shortname}",
    resources_path,
    version = version,
    [
        {resources_dist}
    ]
)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@waralex points out we can do this later - not a major issue anyway.

return result
available_props = Symbol[{component_props}]
wild_props = Symbol[{wildcard_symbols}]
return Component("{funcname}", "{element_name}", "{module_name}", available_props, wild_props; kwargs...)
Copy link
Collaborator

Choose a reason for hiding this comment

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

FWIW on the Python side we could have used only kwargs like this but we chose to insert all the prop names explicitly in the signature (except wildcards of course) because it helps with autocompletion in IDEs. I have no idea if similar functionality exists in Julia, and anyway even if we do want to do this we can add it later.

@alexcjohnson
Copy link
Collaborator

@waralex this and plotly/Dash.jl#42 look great, pending a few minor comments. I thought we had solved the CI build problem you're seeing here, but @Marc-Andre-Rivet probably knows precisely what's going on (aside from the linter complaints, which you should be able to address easily via flake8 / black when you're ready)

@alexcjohnson alexcjohnson marked this pull request as ready for review July 9, 2020 11:53
@alexcjohnson
Copy link
Collaborator

merging into #1197, will sort out the tests and give a final review there.

@alexcjohnson alexcjohnson merged commit 0be806e into plotly:1189-julia-components Jul 9, 2020
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.

2 participants