-
-
Notifications
You must be signed in to change notification settings - Fork 146
Conversation
… files // gut out files that serve no purpose
find . -name "dash_*.gz" | xargs pip install -I --progress-bar off --no-cache-dir | ||
pip install --no-cache-dir --progress-bar off main.tar.gz[dev,testing] | ||
pip list | grep dash | xargs pip show && cd .. | ||
echo $(python -V 2>&1) | grep 3. && python -m unittest tests/test_dash_import.py |
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.
Only test_dash_import remains and is moved here https://github.com/plotly/dash-core-components/pull/939/files#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R158
@@ -1,5 +1,5 @@ | |||
[flake8] | |||
ignore = C901, E203, E266, E501, E731, W503 | |||
ignore = C901, E203, E231, E266, E501, E731, W503 |
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.
Black/flake8 disagreement about spaces after trailing comma. Black wins over Flake8, same as in the dash-table.
include dash_core_components/async-*.js | ||
include dash_core_components/async-*.js.map | ||
include dash_core_components/*.js | ||
include dash_core_components/*.js.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.
This is consistent with what is being done in other repos and how these deps are published in the npm package.
@@ -76,18 +76,18 @@ | |||
_js_dist.extend( | |||
[ | |||
{ | |||
"relative_package_path": "{}.min.js".format(__name__), | |||
"relative_package_path": "{}.js".format(__name__), |
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.
There hasn't been a dev
vs. prod
build of this package since we've moved prop-types
from the component packages to the dash-renderer.
"file-saver": "^2.0.2", | ||
"highlight.js": "^10.3.1", | ||
"moment": "^2.20.1", | ||
"base64-js": "^1.5.1", |
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.
Update everything to latest except for react-dates
and react-dropzone
major bumps that cause props and visual changes. Bumping those should be part of a future general Dash 2.x discussion
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.
Dunno if we have appetite for this in Dash 2, but we should at least discuss.
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.4.0", | ||
"@babel/core": "^7.4.0", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", |
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.
These are redundant with recent versions of babel
"component-playground": "^3.0.0", | ||
"copyfiles": "^2.0.0", | ||
"css-loader": "^1.0.1", | ||
"enzyme": "^3.7.0", |
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.
Enzyme and Jest 🔪
@@ -2,12 +2,11 @@ | |||
|
|||
import pytest | |||
import dash | |||
from dash.testing import wait |
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 to use the common wait
function instead of the dcc home-brewed one
matches what we're doing in dash - 27, 36, 39
and update react-markdown to latest in v4
"prettier": "^2.3.2", | ||
"react": "^16.14.0", | ||
"react-dom": "^16.14.0", | ||
"react-jsx-parser": "1.21.0", |
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.
Pinned - upgrading react-jsx-parser
to 1.28 breaks dcc.Markdown
with html allowed.
@@ -159,7 +159,7 @@ def test_slsl005_slider_tooltip(dash_dcc): | |||
style=dict(height=100), | |||
), | |||
], | |||
style=dict(maxHeight=300, overflowX="scroll"), | |||
style=dict(maxHeight=300, overflowX="scroll", width=400), |
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.
Slider tooltips don't render correctly on Percy. They do pretty well when the width is locked like this, though there's still a bit of an offset. But when the width is set by the page they're way off: Most of the slider, and its handles, are positioned in percentages but the tooltips are positioned in pixels. Ironic, because the tooltips and handles could have used the same positioning logic: left: <some %>; transform: translateX(-50%)
. But when Percy picks this up it rerenders the page with a different width and pixels and % no longer have the same relationship at all.
I suspect there's a real bug here, perhaps if your slider is subject to CSS scaling or if you change its width through a style prop after rendering; but I haven't tested it. Sliders do update correctly when their width updates as the window is resized though, which is the most important use case.
@@ -42,6 +42,8 @@ def test_cdpr001_date_clearable_true_works(dash_dcc): | |||
(single_date,) = dash_dcc.get_date_range("dps") | |||
assert not single_date, "date should be cleared" | |||
|
|||
assert dash_dcc.get_logs() == [] |
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.
helpful message on assertion failure.
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 is a pattern we use at the end of most tests - it just means "there are no errors in the JS console"
We could probably make it clearer to read though by building this directly into the fixture, like:
dash_duo.assert_clean_console()
(dash_dcc
is a dash_duo
clone with some dcc-specific additions. I say clone because it behaves like a subclass but isn't really... the subclassing happens one layer down.)
LGTM |
Depends on plotly/dash#1563
Fixes partially https://github.com/plotly/dash-core/issues/203
Related to plotly/dash-table#878
dash_dcc
fixture (except for test_dash_import which is just a pure unit test)dash_dcc.get_logs()
assert to tests that don't have one (uncovered 5 tests that were broken or at least badly configured by adding that check)ci/circleci: test-legacy-xx
,ci/circleci: test-37
, andci/circleci: lint-unit-37
checksTODO (ACJ 2021-07-07): five percy snapshots still have problems: