Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Issue 324 - Fix header misalignment regression with "always visible" scrollbar#325

Merged
Marc-Andre-Rivet merged 7 commits into
masterfrom
3.1-issue324-misaligned-regression
Jan 9, 2019
Merged

Issue 324 - Fix header misalignment regression with "always visible" scrollbar#325
Marc-Andre-Rivet merged 7 commits into
masterfrom
3.1-issue324-misaligned-regression

Conversation

@Marc-Andre-Rivet

Copy link
Copy Markdown
Contributor

Fix #324.

Virtualization #253 introduced a regression for the table's fragments style generation. Specifically, the style is not generated when the table is not virtualized!

@chriddyp
chriddyp temporarily deployed to dash-table-review-pr-325 January 9, 2019 16:59 Inactive
"webpack-dev-server": "^3.1.10",
"webpack": "^4.28.3",
"webpack-cli": "^3.2.1",
"webpack-dev-server": "^3.1.14",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is noise from renovate/all -- we don't commit the build result when updating deps

if (!virtualization || !uiCell || !uiViewport) {
return [
[{}, {}],
base,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If there is no virtualization or if the virtualization is not ready -- return the scrolling offset only


return [
[{}, { fragment: { marginRight } }],
base,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Otherwise, return offset + virtualization-specific styling

@bpostlethwaite

Copy link
Copy Markdown
Member

is it much work to put in a regression test?

@Marc-Andre-Rivet

Copy link
Copy Markdown
Contributor Author

@bpostlethwaite The best I can do is add a unit test to make sure the logic is sound, which I'll add now. There's no easy way to test this in e2e/integration atm.

@valentijnnieman valentijnnieman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Small but important change - looks good to me 💃

scrollbarWidth
);

validate(style, scrollbarWidth);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Basic unit tests to make sure (not-)virtualized table (not-)ready always returns the correct styling for the header alignment / offset.

@chriddyp

chriddyp commented Jan 9, 2019

Copy link
Copy Markdown
Member

is it much work to put in a regression test?

or maybe part of the review app for manual testing / qa?

@chriddyp
chriddyp temporarily deployed to dash-table-review-pr-325 January 9, 2019 19:07 Inactive
@chriddyp
chriddyp temporarily deployed to dash-table-review-pr-325 January 9, 2019 19:34 Inactive
@chriddyp
chriddyp temporarily deployed to dash-table-review-pr-325 January 9, 2019 19:55 Inactive
@chriddyp
chriddyp temporarily deployed to dash-table-review-pr-325 January 9, 2019 20:15 Inactive
Comment thread cypress.json
"supportFile": "./tests/cypress/support/index.js",
"videoFolder": "./tests/cypress/videos"
"videoFolder": "./tests/cypress/videos",
"numTestsKeptInMemory": 0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some annoying tidbits related to Cypress -- it seems the additional tests tipped it over into Heap Overflow land.

Comment thread dash_table/package-info.json Outdated
"private::runtests-v1:unit": "cypress run --browser chrome --spec 'tests/cypress/tests/unit/**/*'",
"private::runtests-v1:standalone": "cypress run --browser chrome --spec 'tests/cypress/tests/standalone/**/*'",
"private::runtests-v1:server": "cypress run --browser chrome --spec 'tests/cypress/tests/server/**/*'",
"private::runtests-v1": "run-s private::runtests-v1:unit private::runtests-v1:standalone private::runtests-v1:server",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some annoying tidbits related to Cypress -- it seems the additional tests tipped it over into Heap Overflow land. Break up to test into sections for now. Should probably explore parallelisation in the future.

@Marc-Andre-Rivet

Copy link
Copy Markdown
Contributor Author

or maybe part of the review app for manual testing / qa?

Yes! As we plan on linking all core dash-* repos versions together in the future, adding documentation for this in dash-core (https://github.com/plotly/dash-core/blob/master/Manual%20Testing.md) and adding an entry for PR review checklist to that effect (https://github.com/plotly/dash-core/blob/master/PR%20Checklist.md#test-review)

@Marc-Andre-Rivet
Marc-Andre-Rivet merged commit 3a0aa23 into master Jan 9, 2019
@Marc-Andre-Rivet
Marc-Andre-Rivet deleted the 3.1-issue324-misaligned-regression branch July 18, 2019 12:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants