Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

3.0 clean offsets #110

Merged
merged 49 commits into from
Sep 25, 2018
Merged

3.0 clean offsets #110

merged 49 commits into from
Sep 25, 2018

Conversation

Marc-Andre-Rivet
Copy link
Contributor

No description provided.

Marc-André Rivet added 9 commits September 24, 2018 12:44
…clean-offsets

# Conflicts:
#	dash_table/bundle.js
#	dash_table/demo.js
#	src/dash-table/components/CellFactory.tsx
#	src/dash-table/components/ControlledTable/index.tsx
#	tests/e2e/cypress/integration/dash_test.ts
#	tests/e2e/cypress/integration/delete_row_test.ts
…clean-offsets

# Conflicts:
#	tests/e2e/cypress/integration/dash_test.ts
- cleanup "hidden" conditional processing
# Conflicts:
#	CHANGELOG.md
#	dash_table/bundle.js
#	dash_table/demo.js
#	dash_table/package.json
#	package.json
#	src/dash-table/components/CellFactory.tsx
#	src/dash-table/components/ControlledTable/index.tsx
#	src/dash-table/components/HeaderFactory.tsx
#	src/dash-table/components/Table/index.tsx
#	src/dash-table/components/Table/props.ts
#	tests/e2e/cypress/integration/delete_row_test.ts
@@ -1,6 +1,6 @@
{
"name": "dash-table",
"version": "3.1.0rc1",
"version": "3.1.0rc2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

bump version

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-110 September 25, 2018 17:39 Inactive
@@ -42,7 +42,7 @@ class App extends Component {
}
],
table_style: [
{ selector: '.dash-spreadsheet.freeze-left', rule: 'width: 1000px; max-width: 1000px;' }
{ selector: '.dash-spreadsheet.dash-freeze-left', rule: 'width: 1000px; max-width: 1000px;' }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

style -- add prefix for external/contract classes

Logger.error(`Invalid combination of filtering / sorting / pagination`, filtering, sorting, pagination_mode);
return (<div>Invalid props combination</div>);
}

return (<RealTable {...this.props} />);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Table.js is the Dash component wrapper, its role is to

  • bridge the dash and TS worlds
  • make sure the props are sane

Here we add the first sanity check: are the sorting/paging/filtering props compatible with each other?

If paging is done BE -> sort/filter must be off or in BE
Otherwise all combos are valid

return (<td
ref='td'
tabIndex={-1}
className={this.classes.join(' ')}
style={this.style}
data-dash-column={property}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of exposing the columns as column-{index} classes, expose as an attribute with value equal to column id -- this is more consistent with what the user gives us and less about implementation details

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-110 September 25, 2018 17:51 Inactive
Copy link
Contributor

@valentijnnieman valentijnnieman left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tiny suggestion on naming.

pagination_mode
} = this.props;

function isFe(value: any) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a full description in the name, like isFrontEnd is better here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updating

return ['fe', true, false].indexOf(value) !== -1;
}

function isBe(value: any) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly here, isBackEnd could be slightly more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updating

@chriddyp chriddyp temporarily deployed to dash-table-review-pr-110 September 25, 2018 18:51 Inactive
@chriddyp chriddyp temporarily deployed to dash-table-review-pr-110 September 25, 2018 18:56 Inactive
@chriddyp chriddyp temporarily deployed to dash-table-review-pr-110 September 25, 2018 19:42 Inactive
@Marc-Andre-Rivet Marc-Andre-Rivet merged commit 7bece90 into develop Sep 25, 2018
Marc-Andre-Rivet added a commit that referenced this pull request Oct 11, 2018
* 3.1 props refactoring (#106)

* refactor virtualization, virtualization settings, and derived props

* refactor renaming paging / pagination props

* refactor virtual, viewport and pagination into adapters

* isolate derived props

* build update

* fix regression

* improve typing

* fix test regression

* simplify pagination adapter / refactor

* lint

* clean up unused props

* - change factory
- clean up props / build update

* fix lint

* bump version

* add dash level props for virtual_dataframe

* refactor fp / derived props

* derived props

* refactor viewport and virtual controlled props

* fix fp regression

* fix fp regression

* refactor controlled table / table fp

* controlled table purecomponent

* fix test (rebrake it!)

* fix selection regression for be paging/sorting/filtering

* improve re-renders & controlled props

* fix test regressions

* update inner-selection fixture

* remove useless spy

* - fix pr comment
- fix for IE/Edge

* clean up

* 3.0 clean offsets (#110)

* refactor virtualization, virtualization settings, and derived props

* refactor renaming paging / pagination props

* refactor virtual, viewport and pagination into adapters

* isolate derived props

* build update

* fix regression

* improve typing

* fix test regression

* simplify pagination adapter / refactor

* lint

* clean up unused props

* - change factory
- clean up props / build update

* fix lint

* bump version

* add dash level props for virtual_dataframe

* cleaup offsets

* triad validation

* - define external facing classes and attributes

* fix regression, update build

* fix test regression (invalid props)

* update test name

* refactor fp / derived props

* derived props

* refactor viewport and virtual controlled props

* fix fp regression

* fix fp regression

* refactor controlled table / table fp

* controlled table purecomponent

* fix test (rebrake it!)

* fix selection regression for be paging/sorting/filtering

* improve re-renders & controlled props

* fix test regressions

* update inner-selection fixture

* remove useless spy

* - control columns into visible columns
- cleanup "hidden" conditional processing

* update changelog

* clean up header factory

* apply style on first controlled table render

* typo/merge miss

* derived visible columns

* - visual tests for hidden columns

* rename functions

* - fix dropdown styling regression

* lint

* 3.1 props fixes (#112)

* props fixes

* update changelog

* bump version

* filter typing

* Update derivedViewport_test.ts

Add basic viewport test with |df| > page_size

* ☝️ 3 new review / documentation / target apps

see discussion in #108

* 🙈 forgot file

* 📝 incorporate @cldougl suggestions 🙇

* 3.1 refactor tests (#113)

* props fixes

* update changelog

* bump version

* filter typing

* - delete unused usage files
- restructure tests folder

* - separate cypress and visual tests into 2 ci jobs

* - build before tests!

* add browsers to the node image for visual-test

* 💯 add percent examples

* 📝 title/example clarification

* reformat sizing test app for failing tests (#125)

* Removed .only from dash_test.ts

* Production build instead of dev 🙈

* Fix failing tests

* 3.1 refactor cells rendering (#123)

* WIP
- memoize cell event handlers as derived values
- isolate cell event handlers

* wip
- attempt to isolate cell logic from input logic for individual datum

* wip
- celan up cell wrapper
- isolate input logic a bit more

* further down the rabbit hole..
- separating operation cells from content

* fix dropdown navigation regression

* fix selected row regression

* renaming / restructuring

* rename/restructure

* - clean up zipping
- separate wrappers from styles

* rework style/ast cache

* clean up

* clean up

* build update

* improve rendering perf

* optimize wrappers generation

* build config

* - fix typing regression
- fix rendering perf regression

* - fix navigation regression

* simplify slightly the derived props / ui

* fix copy/paste regressions

* clean up wrapper props

* clean up

* fix regression on conditional dropdowns

* wip, fp the headers

* fp content, wrappers, labels, indices from header factory

* fix regressions

* fp the table itself

* fix typing and behavior for table fp

* fix sorting icon regression

* fix regression

* regression

* fix column name regression with only 1 header row

* fix header actions regression

* fix style application on mount

* fix regression edit cell in n-th page

* fix editing on non-first page (continued)

* fix test

* 3.1 issue118 width behavior (#130)

* WIP
- memoize cell event handlers as derived values
- isolate cell event handlers

* wip
- attempt to isolate cell logic from input logic for individual datum

* wip
- celan up cell wrapper
- isolate input logic a bit more

* further down the rabbit hole..
- separating operation cells from content

* fix dropdown navigation regression

* fix selected row regression

* renaming / restructuring

* rename/restructure

* - clean up zipping
- separate wrappers from styles

* rework style/ast cache

* clean up

* clean up

* build update

* improve rendering perf

* optimize wrappers generation

* build config

* - fix typing regression
- fix rendering perf regression

* - fix navigation regression

* simplify slightly the derived props / ui

* fix copy/paste regressions

* clean up wrapper props

* clean up

* fix regression on conditional dropdowns

* wip, fp the headers

* fp content, wrappers, labels, indices from header factory

* fix regressions

* fp the table itself

* fix typing and behavior for table fp

* fix sorting icon regression

* fix regression

* regression

* fix column name regression with only 1 header row

* fix header actions regression

* add width percentage support + content_style

* fix style application on mount

* fix visual regression with empty df

* only apply row style when necessary

* fix tab test (no offset)

* clean up header styling

* use dash-* classes

* support default column width (override input behavior)

* fix regression edit cell in n-th page

* fix editing on non-first page (continued)

* fix test

* fit to content behavior

* fix regressions

* fix lint

* add column width visual tests

* fix dropdown minimum size when using default width

* sizing examples

* black

* fix navigation test regression

* fix regressions in visual tests

* default column width - fix dropdown width eval

* default width columns
- fix width when first content row is search filter

* percy - add delay before screenshot (attempt to fix FF visual tests)

* debugging selenium

* fix black

* debug selenium

* debug selenium

* fix black

* debug selenium

* debug selenium

* debug selenium

* undo all selenium modifications

* default column width
- filter inputs behave like cell inputs (do not affect width)

* - fixed rows+columns height evaluated correctly

* remove dead code

* remove .only from tests

* add data-dash-column to filter cells

* styling examples (#117)

* 🌈 styling examples

examples that represent of the level of customization that we need in
dash-table. The examples are implemented with HTML tables to
demonstrate the intended behaviour.

I’d like to see each of these examples implemented with the
`dash_table` syntax. We’ll use these examples as our `dash-table`
documentation

* ❌ removing black and pylint

this keeps tripping us up and I don’t think it’s worth the pain right
now.

* Backend examples (#119)

* 🏭 backend computed data usage examples

* 📊 tying it together w a graph

* ❓ not sure what `displayed_pages` does?

* Dropdown usage examples (#120)

* ⬇️ dropdown usage examples

* add conditional dropdown example
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the 3.0-clean-offsets branch October 12, 2018 13:17
Marc-Andre-Rivet added a commit that referenced this pull request Oct 12, 2018
* 3.1 props refactoring (#106)

* refactor virtualization, virtualization settings, and derived props

* refactor renaming paging / pagination props

* refactor virtual, viewport and pagination into adapters

* isolate derived props

* build update

* fix regression

* improve typing

* fix test regression

* simplify pagination adapter / refactor

* lint

* clean up unused props

* - change factory
- clean up props / build update

* fix lint

* bump version

* add dash level props for virtual_dataframe

* refactor fp / derived props

* derived props

* refactor viewport and virtual controlled props

* fix fp regression

* fix fp regression

* refactor controlled table / table fp

* controlled table purecomponent

* fix test (rebrake it!)

* fix selection regression for be paging/sorting/filtering

* improve re-renders & controlled props

* fix test regressions

* update inner-selection fixture

* remove useless spy

* - fix pr comment
- fix for IE/Edge

* clean up

* 3.0 clean offsets (#110)

* refactor virtualization, virtualization settings, and derived props

* refactor renaming paging / pagination props

* refactor virtual, viewport and pagination into adapters

* isolate derived props

* build update

* fix regression

* improve typing

* fix test regression

* simplify pagination adapter / refactor

* lint

* clean up unused props

* - change factory
- clean up props / build update

* fix lint

* bump version

* add dash level props for virtual_dataframe

* cleaup offsets

* triad validation

* - define external facing classes and attributes

* fix regression, update build

* fix test regression (invalid props)

* update test name

* refactor fp / derived props

* derived props

* refactor viewport and virtual controlled props

* fix fp regression

* fix fp regression

* refactor controlled table / table fp

* controlled table purecomponent

* fix test (rebrake it!)

* fix selection regression for be paging/sorting/filtering

* improve re-renders & controlled props

* fix test regressions

* update inner-selection fixture

* remove useless spy

* - control columns into visible columns
- cleanup "hidden" conditional processing

* update changelog

* clean up header factory

* apply style on first controlled table render

* typo/merge miss

* derived visible columns

* - visual tests for hidden columns

* rename functions

* - fix dropdown styling regression

* lint

* 3.1 props fixes (#112)

* props fixes

* update changelog

* bump version

* filter typing

* Update derivedViewport_test.ts

Add basic viewport test with |df| > page_size

* ☝️ 3 new review / documentation / target apps

see discussion in #108

* 🙈 forgot file

* 📝 incorporate @cldougl suggestions 🙇

* 3.1 refactor tests (#113)

* props fixes

* update changelog

* bump version

* filter typing

* - delete unused usage files
- restructure tests folder

* - separate cypress and visual tests into 2 ci jobs

* - build before tests!

* add browsers to the node image for visual-test

* 💯 add percent examples

* 📝 title/example clarification

* reformat sizing test app for failing tests (#125)

* Removed .only from dash_test.ts

* Production build instead of dev 🙈

* Fix failing tests

* 3.1 refactor cells rendering (#123)

* WIP
- memoize cell event handlers as derived values
- isolate cell event handlers

* wip
- attempt to isolate cell logic from input logic for individual datum

* wip
- celan up cell wrapper
- isolate input logic a bit more

* further down the rabbit hole..
- separating operation cells from content

* fix dropdown navigation regression

* fix selected row regression

* renaming / restructuring

* rename/restructure

* - clean up zipping
- separate wrappers from styles

* rework style/ast cache

* clean up

* clean up

* build update

* improve rendering perf

* optimize wrappers generation

* build config

* - fix typing regression
- fix rendering perf regression

* - fix navigation regression

* simplify slightly the derived props / ui

* fix copy/paste regressions

* clean up wrapper props

* clean up

* fix regression on conditional dropdowns

* wip, fp the headers

* fp content, wrappers, labels, indices from header factory

* fix regressions

* fp the table itself

* fix typing and behavior for table fp

* fix sorting icon regression

* fix regression

* regression

* fix column name regression with only 1 header row

* fix header actions regression

* fix style application on mount

* fix regression edit cell in n-th page

* fix editing on non-first page (continued)

* fix test

* 3.1 issue118 width behavior (#130)

* WIP
- memoize cell event handlers as derived values
- isolate cell event handlers

* wip
- attempt to isolate cell logic from input logic for individual datum

* wip
- celan up cell wrapper
- isolate input logic a bit more

* further down the rabbit hole..
- separating operation cells from content

* fix dropdown navigation regression

* fix selected row regression

* renaming / restructuring

* rename/restructure

* - clean up zipping
- separate wrappers from styles

* rework style/ast cache

* clean up

* clean up

* build update

* improve rendering perf

* optimize wrappers generation

* build config

* - fix typing regression
- fix rendering perf regression

* - fix navigation regression

* simplify slightly the derived props / ui

* fix copy/paste regressions

* clean up wrapper props

* clean up

* fix regression on conditional dropdowns

* wip, fp the headers

* fp content, wrappers, labels, indices from header factory

* fix regressions

* fp the table itself

* fix typing and behavior for table fp

* fix sorting icon regression

* fix regression

* regression

* fix column name regression with only 1 header row

* fix header actions regression

* add width percentage support + content_style

* fix style application on mount

* fix visual regression with empty df

* only apply row style when necessary

* fix tab test (no offset)

* clean up header styling

* use dash-* classes

* support default column width (override input behavior)

* fix regression edit cell in n-th page

* fix editing on non-first page (continued)

* fix test

* fit to content behavior

* fix regressions

* fix lint

* add column width visual tests

* fix dropdown minimum size when using default width

* sizing examples

* black

* fix navigation test regression

* fix regressions in visual tests

* default column width - fix dropdown width eval

* default width columns
- fix width when first content row is search filter

* percy - add delay before screenshot (attempt to fix FF visual tests)

* debugging selenium

* fix black

* debug selenium

* debug selenium

* fix black

* debug selenium

* debug selenium

* debug selenium

* undo all selenium modifications

* default column width
- filter inputs behave like cell inputs (do not affect width)

* - fixed rows+columns height evaluated correctly

* remove dead code

* remove .only from tests

* add data-dash-column to filter cells

* styling examples (#117)

* 🌈 styling examples

examples that represent of the level of customization that we need in
dash-table. The examples are implemented with HTML tables to
demonstrate the intended behaviour.

I’d like to see each of these examples implemented with the
`dash_table` syntax. We’ll use these examples as our `dash-table`
documentation

* ❌ removing black and pylint

this keeps tripping us up and I don’t think it’s worth the pain right
now.

* Backend examples (#119)

* 🏭 backend computed data usage examples

* 📊 tying it together w a graph

* ❓ not sure what `displayed_pages` does?

* Dropdown usage examples (#120)

* ⬇️ dropdown usage examples

* add conditional dropdown example

* - additional tests for editable/readonly
- fixes for editable/readonly

* bump version

* remove useless test column

* add editable prop to fixtures

* update tests to take into account readonly 'rows' column

* - refactor column isEditable calculation
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.

None yet

3 participants