Skip to content
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

Provide support for arbitrary file extensions within Dash for R component libraries #186

Merged
merged 10 commits into from
Apr 24, 2020

Conversation

rpkyle
Copy link
Contributor

@rpkyle rpkyle commented Mar 17, 2020

This PR proposes to address #185, which implements functionality found in plotly/dash#481. In particular, the internal get_mimetype function should now handle both .map and .js.map, and uses guess_mimetype from the mime package for extensions other than .js, .css and .map/.js.map.

This feature will require edits to Dash's package generator; a PR proposing those changes is in process.

If the extension is unknown, Dash for R will assume application/octet-stream instead. Other features this PR would provide:

  • support for loading binary file dependencies within the _dash-component-suites handler
  • support for properly setting a variety of new resource$type values via the mime package

@rpkyle rpkyle added enhancement parity Modifications to improve parity across Dash implementations labels Mar 17, 2020
@rpkyle rpkyle added this to the Dash Q1/2020 milestone Mar 17, 2020
@rpkyle rpkyle self-assigned this Mar 17, 2020
@wbrgss wbrgss self-requested a review April 2, 2020 21:19
@rpkyle rpkyle marked this pull request as ready for review April 8, 2020 22:00
@rpkyle
Copy link
Contributor Author

rpkyle commented Apr 20, 2020

This PR is currently on hold until minor edits are made within Dash related to handling of component library assets, as noted in plotly/dash#1186.

@@ -37,7 +37,7 @@ jobs:
command: |
python -m venv venv
. venv/bin/activate
git clone --depth 1 https://github.com/plotly/dash.git dash-main
git clone -b 481-arbitrary-extensions --depth 1 https://github.com/plotly/dash.git dash-main
Copy link
Contributor

Choose a reason for hiding this comment

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

Temporary, for (1) the modified standard test component, (2) the modified generator

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃

@rpkyle rpkyle merged commit a4d9dec into dev Apr 24, 2020
@rpkyle rpkyle deleted the 185-arbitrary-extensions branch May 4, 2020 06:04
@rpkyle rpkyle mentioned this pull request May 6, 2020
rpkyle added a commit that referenced this pull request May 6, 2020
* Add unit tests for index customization (#176)

* Send status code of 1 when unit tests fail (#177)

* Support for arbitrary file extensions (#186)

* Add assortment of unit tests to Dash for R (#179)

* Nested and standard components test (#191)

* Support inline clientside callbacks in Dash for R (#140)

* Speed up CI, use image from plotly

* Update to dash-renderer 1.4.1

Co-authored-by: HammadTheOne <hammadkhan@plotly.com>
Co-authored-by: Marc-André Rivet <marc-andre.rivet@plotly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement parity Modifications to improve parity across Dash implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants