This repository was archived by the owner on Jun 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 72
Issue 680 - row
and Bootstrap interactions
#844
Merged
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
81b7f68
change `row` class to `table-row` to avoid bootstrap collisions
e57e9ec
update .row -> .table-row in tests
86b0c43
row -> table-row in actual table..
ca91071
changelog
669e92c
Merge branch 'dev' into 680-bootstrap-row
Marc-Andre-Rivet 08ef709
Add bootstrap to all visual tests - undo `table-` prefix fix temporarily
24e535b
Merge branch '680-bootstrap-row' of github.com:plotly/dash-table into…
1197b62
re apply `table-` prefix to fix `row` + override bootstrap 3.4.1 and …
170991b
make `table-row` more unique: `dt-table-container__row`
384330c
dt-table-container__row-0
c3e72d9
undo 'common' for bootstrap
ce75c45
!bootstrap
0426c84
!jquery
ec22f1c
Merge branch 'dev' into 680-bootstrap-row
Marc-Andre-Rivet a7d7465
CI: set appropriate percy token
2019e43
Merge branch '680-bootstrap-row' of github.com:plotly/dash-table into…
d2857e1
percy snapshot names can't contain `,`
e848edd
snapshots
0e53caa
conftest
5565825
percy
80fa30a
black
ea99a96
.
88701f2
undo
1d4641f
.
7ea3ccb
tmp_path
cad6e4f
dt-download
ab86080
tmpdir
b44ea17
PERCY_PARALLEL_TOTAL: -1
4791dc6
npx percy
9dc3058
percy-python-selenium?!
2bfe491
remove npx percy
8795792
+ @percy/agent
b97024d
puppets
cfd32ce
3.7-node
e6db08b
libnss3
be09a62
stretch
c10e1a8
puppet orb
7637f45
!orbs
b40a3cb
command
0201f5f
.
a090e2f
.
d5522e3
apt-get
ebc9f64
libgbm
08b1297
libgbm-dev
4c6d0fa
browsers
0eaf587
very long iframe delay
89e0692
no iframe
f1a5608
no externals?
67ef04d
percy v1
ba588ad
add back dbc theme
10f6779
undo fix: dt-table-container__row -> row
2d243d0
finalize
35298ab
percyfinalize
4ff7d7a
percy finalize
02a0f9b
redo `dt-table-container__row` fix
21220f1
clean up config
57a0b46
tests/selenium
227b79c
remove time.sleep(3)
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
dash-bootstrap-components==0.10.7 | ||
pandas | ||
preconditions | ||
xlrd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import dash | ||
import pytest | ||
|
||
import dash_bootstrap_components as dbc | ||
import dash_html_components as html | ||
from dash_table import DataTable | ||
|
||
import pandas as pd | ||
|
||
url = "https://github.com/plotly/datasets/raw/master/" "26k-consumer-complaints.csv" | ||
rawDf = pd.read_csv(url) | ||
df = rawDf.to_dict("rows") | ||
|
||
|
||
def get_app(fixed_rows, fixed_columns, ops): | ||
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP]) | ||
|
||
props = dict( | ||
id="table", | ||
data=df[0:250], | ||
columns=[ | ||
{"name": i, "id": i, "hideable": i == "Complaint ID"} for i in rawDf.columns | ||
], | ||
style_table=dict(height="500px", maxHeight="500px", overflow="auto"), | ||
editable=True, | ||
sort_action="native", | ||
include_headers_on_copy_paste=True, | ||
**fixed_rows, | ||
**fixed_columns, | ||
**ops | ||
) | ||
|
||
app.layout = html.Div([DataTable(**props)]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Initially wanted this test to show a unmodified table + a another table in an iframe with bootstrap styles applied to offer some comparison point during review (e.g. only the bootstrap version changed vs. both) but the iframe content is never visible. |
||
|
||
return app | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"fixed_rows,fixed_rows_description", | ||
[(dict(), "unfixed_rows"), (dict(fixed_rows=dict(headers=True)), "fixed_rows")], | ||
) | ||
@pytest.mark.parametrize( | ||
"fixed_columns,fixed_columns_description", | ||
[ | ||
(dict(), "unfixed_columns"), | ||
(dict(fixed_columns=dict(headers=True)), "fixed_columns"), | ||
], | ||
) | ||
@pytest.mark.parametrize( | ||
"ops,ops_description", | ||
[ | ||
(dict(), "ops: none"), | ||
(dict(row_selectable="single", row_deletable=True), "ops: sinle+deletable"), | ||
(dict(row_selectable="multi", row_deletable=True), "ops: multi+deletable"), | ||
], | ||
) | ||
def test_tbbs001_display( | ||
dash_thread_server, | ||
dash_duo, | ||
test, | ||
fixed_rows, | ||
fixed_columns, | ||
ops, | ||
fixed_rows_description, | ||
fixed_columns_description, | ||
ops_description, | ||
): | ||
test.start_server(get_app(fixed_rows, fixed_columns, ops)) | ||
|
||
test.table("table").is_ready() | ||
|
||
test.percy_snapshot( | ||
"DataTable Bootstrap side-effects with rows={} columns={} ops={}".format( | ||
fixed_rows_description, fixed_columns_description, ops_description | ||
) | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Table tests sometimes use
dash_thread_server
anddash_duo
--dash_duo
specifically also creates a temporary folder, both fixtures clash and the tests end up throwing an error because the directory already exists. Pytest uses a py27 compatible object that does not exposeexists_ok
and hence the error can't otherwise be prevented.