Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add supports of filtering and sorting to iot-table #184

Closed
wants to merge 31 commits into from

Conversation

square-li
Copy link
Contributor

@square-li square-li commented Jul 29, 2022

Overview

Release Table component V2. Adding supports for filtering and sorting.

Tests

[Include a link to the passing GitHub action running the test suite here.]

Legal

This project is available under the Apache 2.0 License.

square-li and others added 23 commits June 13, 2022 10:41
- config typescript & rollup
- config jest
- config eslint
- add unit tests for createTableItems method
- updated .eslintrc.js at project root level
- update descriptions for tests in createTableItems.spec.ts
- add one test case for getting data point from aggregated datastream
- add createCellItem function
- add unit tests for createCellItem
- rename SC_DataStream to SynchroChartsDataStream for better consistency
- update createCellItem tests.
feat: set up table package and add createTableItems method
- iconUtils.tsx - copied from synchro-charts with changes.
- iconUtils.spec.ts - copied from synchro-charts with changes:
-- add one test cases, that color are provided, compared with the original.
- spinner.tsx - copied from synchro-charts with adjustments for React
- spinner.spec.tsx - copied from synchro-charts with adjustments for React
- add new test case for default cell function
- fix an issue when property if missing from tableItem.
- update default cell function
* feat: Replace iot-table with new version.

* Update autogenerated types

* fix import

* another fix for import

* another fix for import

* Remove unused property for Iot.

* Fix a typo

* Code cleanups.

* Code cleanups.

* update type of `ColumnDefinition.formatter`

also added a few use cases in testing-ground.tsx

* update type of `ColumnDefinition.formatter`

also added a few use cases in testing-ground.tsx

* Update asset/property IDs and table examples.

* update: add formatter to filterOptions

Property filtering options now has the same displayed value as table.

* update formatPropertyFilterOptions function to better handle error & loading states.

* update test examples for table component.

* Disable Customized formatter for property filter options.

* update test cases after disabled formatter for filter options

* Remove unused dependency.

* a few bug fixes
- Split sorting and propertyFiltering
- Remove formatting on property filtering options.

* UI adjustment - center icon and string vertically.

* Update styles and unit tests

* Remove unused imports and statements.

* Reformat css file

* Restore testing ground
* Update docs. Add README.md for new table component.
@square-li square-li changed the title Feature table Table component v2 Jul 29, 2022
# Conflicts:
#	packages/components/package.json
#	packages/components/src/components.d.ts
#	packages/components/src/components/iot-table/iot-table.tsx
#	packages/components/src/testing/testing-ground/siteWiseQueries.ts
#	packages/components/src/testing/testing-ground/testing-ground.tsx
#	yarn.lock
@lgtm-com
Copy link

lgtm-com bot commented Jul 29, 2022

This pull request introduces 1 alert when merging edd73ee into c80bf86 - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

@lgtm-com
Copy link

lgtm-com bot commented Jul 29, 2022

This pull request introduces 1 alert when merging d177e2d into c80bf86 - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

@square-li square-li marked this pull request as ready for review August 2, 2022 16:59
@lgtm-com
Copy link

lgtm-com bot commented Aug 2, 2022

This pull request introduces 1 alert when merging ed682e9 into 4cc2786 - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

docs/Table.md Show resolved Hide resolved
docs/Table.md Outdated Show resolved Hide resolved
docs/Table.md Outdated Show resolved Hide resolved
packages/table/src/utils/createCellItem.spec.ts Outdated Show resolved Hide resolved
packages/table/src/utils/createCellItem.ts Outdated Show resolved Hide resolved
packages/table/src/utils/tableHelpers.tsx Outdated Show resolved Hide resolved
packages/table/src/table/index.tsx Outdated Show resolved Hide resolved
@diehbria
Copy link
Contributor

diehbria commented Aug 2, 2022

Should this be a major version change with documented changes in the change logs?

@diehbria
Copy link
Contributor

diehbria commented Aug 2, 2022

are there any tests related to displaying non-latest data when there are cached more recent data (i.e. that the cells don't simply always display the latest data point, as KPI/Grid/Old table did

@tracy-french
Copy link
Contributor

What are the next steps to merge this PR in?

@square-li
Copy link
Contributor Author

Adding supports of messageOverrrides by this PR: #211.
Other requested changes will be added shortly as separated PRs also.

@square-li
Copy link
Contributor Author

Updating docs and bump version by this PR: #213

@lgtm-com
Copy link

lgtm-com bot commented Aug 25, 2022

This pull request introduces 1 alert when merging 1b54f6e into 0edf35c - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

@lgtm-com
Copy link

lgtm-com bot commented Aug 25, 2022

This pull request introduces 1 alert when merging 6ae7312 into 0edf35c - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

- render correct data based on different viewports
- render spinner when a datastream is loading
- render error icon and message when a datastream in error state
- render icon and apply styles when it breaches thresholds
@lgtm-com
Copy link

lgtm-com bot commented Aug 26, 2022

This pull request introduces 1 alert when merging 48b92de into 0edf35c - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

@lgtm-com
Copy link

lgtm-com bot commented Aug 29, 2022

This pull request introduces 1 alert when merging ccac1c5 into 0edf35c - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

@square-li square-li changed the title Table component v2 feat: add supports of filtering and sorting to iot-table Aug 29, 2022
@lgtm-com
Copy link

lgtm-com bot commented Aug 29, 2022

This pull request introduces 1 alert when merging 1f4bf90 into 0edf35c - view on LGTM.com

new alerts:

  • 1 for Polynomial regular expression used on uncontrolled data

@square-li
Copy link
Contributor Author

square-li commented Aug 29, 2022

Closing this PR.
New PR with git history cleaned up: #221

@square-li square-li closed this Aug 29, 2022
@square-li square-li deleted the feature-table branch September 14, 2022 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants