Skip to content

Commit 2c456cd

Browse files
authored
Merge pull request #1822 from plotly/no-radium
Remove radium from renderer, and minor renderer dep bumps
2 parents deb8341 + 43e7b34 commit 2c456cd

File tree

12 files changed

+2536
-5817
lines changed

12 files changed

+2536
-5817
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
44

55
## [Unreleased]
66

7+
- [#1822](https://github.com/plotly/dash/pull/1822) Remove Radium from renderer dependencies, as part of investigating React 17 support.
8+
79
- [#1745](https://github.com/plotly/dash/pull/1745):
810
Improve our `extras_require`: there are now five options here, each with a well-defined role:
911
- `dash[dev]`: for developing and building dash components.

components/dash-core-components/tests/integration/link/test_absolute_path.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_lipa001_path(dash_dcc):
1313
]
1414
)
1515

16-
@app.callback(Output("content", "children"), [Input("url", "pathname")])
16+
@app.callback(Output("content", "children"), Input("url", "pathname"))
1717
def display_children(children):
1818
return children
1919

@@ -29,12 +29,27 @@ def display_children(children):
2929
@pytest.mark.DCC782
3030
def test_lipa002_path(dash_dcc):
3131
app = Dash(__name__)
32+
33+
def extras(t):
34+
return f"""<!DOCTYPE html>
35+
<html><body>
36+
{t[::-1]}
37+
</body></html>
38+
"""
39+
40+
app.server.add_url_rule(
41+
"/extra/<string:t>",
42+
view_func=extras,
43+
endpoint="/extra/<string:t>",
44+
methods=["GET"],
45+
)
46+
3247
app.layout = html.Div(
3348
[
3449
dcc.Link(
3550
children="Absolute Path",
3651
id="link1",
37-
href="https://google.com",
52+
href=dash_dcc.server.url + "/extra/eseehc",
3853
refresh=True,
3954
),
4055
dcc.Location(id="url", refresh=False),
@@ -44,12 +59,13 @@ def test_lipa002_path(dash_dcc):
4459

4560
dash_dcc.wait_for_element("#link1").click()
4661

47-
location = dash_dcc.driver.execute_script(
62+
location, text = dash_dcc.driver.execute_script(
4863
"""
49-
return window.location.href
64+
return [window.location.href, document.body.textContent.trim()]
5065
"""
5166
)
5267

53-
assert location == "https://www.google.com/"
68+
assert location == dash_dcc.server.url + "/extra/eseehc"
69+
assert text == "cheese"
5470

5571
assert dash_dcc.get_logs() == []

components/dash-core-components/tests/integration/tooltip/test_tooltip.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ def update_tooltip_content(hoverData):
8080
assert 175 < coords[0] < 185, "x0 is about 200 minus half a marker size"
8181
assert 175 < coords[1] < 185, "y0 is about 200 minus half a marker size"
8282

83-
ActionChains(dash_dcc.driver).move_to_element_with_offset(elem, 0, 0).perform()
83+
ActionChains(dash_dcc.driver).move_to_element_with_offset(
84+
elem, 5, elem.size["height"] - 5
85+
).perform()
8486

8587
until(lambda: not dash_dcc.find_element("#graph-tooltip").is_displayed(), 3)

components/dash-table/tests/selenium/test_markdown_link.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def get_app(cell_selectable, markdown_options):
7-
md = "[Click me](https://www.google.com)"
7+
md = "[Click me](/assets/logo.png)"
88

99
data = [dict(a=md, b=md), dict(a=md, b=md)]
1010

@@ -51,14 +51,14 @@ def test_tmdl001_click_markdown_link(test, markdown_options, new_tab, cell_selec
5151

5252
assert len(test.driver.window_handles) == 2
5353
test.driver.switch_to.window(test.driver.window_handles[1])
54-
assert test.driver.current_url.startswith("https://www.google.com")
54+
assert test.driver.current_url.endswith("assets/logo.png")
5555

5656
# Make sure the cell is still selected iff cell_selectable, after switching tabs
5757
test.driver.switch_to.window(test.driver.window_handles[0])
5858
assert target.cell(0, "a").is_selected() == cell_selectable
5959

6060
else:
6161
assert len(test.driver.window_handles) == 1
62-
assert test.driver.current_url.startswith("https://www.google.com")
62+
assert test.driver.current_url.endswith("assets/logo.png")
6363

6464
assert test.get_log_errors() == []

0 commit comments

Comments
 (0)