-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Merge dash renderer with DashPy #1611
Conversation
…into merge-dash-renderer
@HammadTheOne the final renderer build in My rationale here is that as you have it here we're duplicating files: the ones actually getting used by dash are going to be harder to keep updated during renderer development because they need to go through an extra step, and the ones being created inside the renderer directory never get directly used at all. Also Finally (and again this is thinking about development in the renderer itself) since the entire |
I think that makes a lot of sense. I've removed the
Updated in 9f8e0aa, with slight modifications to the existing template to have the correct relative url.
I'm a little confused on this point - presently, we can |
That's right, the committed code in dev branches will not run on its own. In the dev workflow, it's normal that after checking out the branch you want, you need to run the build command to create the relevant bundles & artifacts before you can actually run dash. |
@alexcjohnson I've made some changes to the CI config so that the artifacts are built within the Other than that, I think this PR might be ready for a final pass, if the dependency structure makes sense at this point. |
@alexcjohnson @HammadTheOne Is there anything else we need to pull the trigger on this one? |
MANIFEST.in
Outdated
@@ -3,3 +3,6 @@ include LICENSE | |||
include requires-*.txt | |||
include dash/favicon.ico | |||
include dash/extract-meta.js | |||
include dash/deps/*.js | |||
recursive-include dash/dash-renderer * |
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.
This will include all the source files, won't it? I don't think we want to do that. The old dash-renderer MANIFEST.in
is just:
include package.json
include digest.json
include dash_renderer/*.js
include dash_renderer/*.map
In the new structure, dash_renderer/*.js
is replaced by dash/deps/*.js
which you have above. I'm not aware of any value that package.json
or digest.json
have to end users so we should be able to ignore those...
Then there's the question of the *.map
files: you're not currently including them, and in fact in the past in response to a user request to reduce the package size #810 we at one point removed them #910 but then for some reason that I can't find any record of we immediately reverted that 369ace9 before making a release. @Marc-Andre-Rivet do you have any memory of that? I don't see a PR or any discussion, just a revert commit
Anyway, is there anything else we really do want from the dash-renderer directory, or can we drop this line (as well as the line below that only exists in reference to this one)?
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.
Updated in afc363c. We can safely drop the other lines
I'm noticing that .map
files aren't being generated by the webpack for souce-mapping. Is this because we have inline-source-map
?
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.
Ah hmm, actually this changed in #1576 in a way that I hadn't recognized - @Marc-Andre-Rivet please confirm I'm understanding this correctly: the ONLY case we're generating a sourcemap now is when you run webpack-serve
(which is what you get with npm start
). The other build commands now seem to be all the same (as far as the bundle itself is concerned) and create no sourcemap. npm run build:js
and build:dev
are now literally the same command.
Unfortunately I can't actually run npm start
ATM, and I don't think it does what we want anyway - really I'd like a command that outputs the same files we currently create, but stays open watching the source files for changes. @Marc-Andre-Rivet didn't we have that in the renderer at some point? Am I missing something about the updated tooling?
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.
Excellent! 💃 once there's an issue open to follow up on sourcmaps #1611 (comment)
This PR addresses plotly/dash-core#225 as part of the Dash monorepo project, and merges the
dash-renderer
artifacts within Dash. Dependencies and resources are loaded from Dash itself, which will make the release and development process a bit easier. This PR also introducesgulpfile
to the Dash repo as a tool for moving and modifying files/directories.Contributor Checklist
I have broken down my PR scope into the following TODO tasks
Set up gulpfile to automate renderer updates merge to dashMANIFEST
:include dash/dash-renderer/**/**/**/**/**
(Fixed in 9900303)node_modules
(Fixed in 317d7e8)current_directory
.I have run the tests locally and they passed. (refer to testing section in contributing)
I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR
optionals
CHANGELOG.md
Closes plotly/dash-core#225