You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/04 17:05:57 UTC
[GitHub] [superset] lyndsiWilliams opened a new pull request #12949: refactor: Converting TableElement.jsx to functional component
lyndsiWilliams opened a new pull request #12949:
URL: https://github.com/apache/superset/pull/12949
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TEST PLAN
<!--- What steps should be taken to verify the changes -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams commented on pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams commented on pull request #12949:
URL: https://github.com/apache/superset/pull/12949#issuecomment-773483307
Still working on PR summary and testing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io commented on pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #12949:
URL: https://github.com/apache/superset/pull/12949#issuecomment-773495087
# [Codecov](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=h1) Report
> Merging [#12949](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=desc) (4067237) into [master](https://codecov.io/gh/apache/superset/commit/c781ab8adf4cb002edb33a9f2118ed84db8d6941?el=desc) (c781ab8) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12949/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12949 +/- ##
==========================================
- Coverage 66.92% 66.87% -0.06%
==========================================
Files 1024 489 -535
Lines 50185 28661 -21524
Branches 5213 0 -5213
==========================================
- Hits 33588 19166 -14422
+ Misses 16457 9495 -6962
+ Partials 140 0 -140
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `66.87% <ø> (+2.78%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.69% <0.00%> (-24.88%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `86.95% <0.00%> (-7.49%)` | :arrow_down: |
| [superset/db\_engine\_specs/clickhouse.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2NsaWNraG91c2UucHk=) | `87.09% <0.00%> (-7.35%)` | :arrow_down: |
| [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.25% <0.00%> (-6.28%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.85% <0.00%> (-6.12%)` | :arrow_down: |
| ... and [566 more](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=footer). Last update [c781ab8...4067237](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams edited a comment on pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams edited a comment on pull request #12949:
URL: https://github.com/apache/superset/pull/12949#issuecomment-773483307
Working on PR summary and testing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams commented on a change in pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams commented on a change in pull request #12949:
URL: https://github.com/apache/superset/pull/12949#discussion_r570414529
##########
File path: superset-frontend/src/SqlLab/components/TableElement.jsx
##########
@@ -52,59 +51,40 @@ const StyledSpan = styled.span`
cursor: pointer;
`;
-class TableElement extends React.PureComponent {
- constructor(props) {
- super(props);
- this.state = {
- sortColumns: false,
- expanded: true,
- hovered: false,
- };
- this.removeFromStore = this.removeFromStore.bind(this);
- this.toggleSortColumns = this.toggleSortColumns.bind(this);
- this.removeTable = this.removeTable.bind(this);
- this.setHover = this.setHover.bind(this);
- }
-
- setHover(hovered) {
- this.setState({ hovered });
- }
+function TableElement({ actions, table, timeout }) {
+ const [state, setState] = useState({
Review comment:
Break these into individual hooks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams commented on a change in pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams commented on a change in pull request #12949:
URL: https://github.com/apache/superset/pull/12949#discussion_r638448205
##########
File path: superset-frontend/src/SqlLab/components/TableElement.jsx
##########
@@ -52,59 +51,40 @@ const StyledSpan = styled.span`
cursor: pointer;
`;
-class TableElement extends React.PureComponent {
- constructor(props) {
- super(props);
- this.state = {
- sortColumns: false,
- expanded: true,
- hovered: false,
- };
- this.removeFromStore = this.removeFromStore.bind(this);
- this.toggleSortColumns = this.toggleSortColumns.bind(this);
- this.removeTable = this.removeTable.bind(this);
- this.setHover = this.setHover.bind(this);
- }
-
- setHover(hovered) {
- this.setState({ hovered });
- }
+function TableElement({ actions, table, timeout }) {
+ const [state, setState] = useState({
Review comment:
Completed at [`this commit`](https://github.com/apache/superset/pull/12949/commits/28bb86ab8231a8c03490d6e69c269287fde472d2)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams closed pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams closed pull request #12949:
URL: https://github.com/apache/superset/pull/12949
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams commented on pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams commented on pull request #12949:
URL: https://github.com/apache/superset/pull/12949#issuecomment-773483307
Still working on PR summary and testing.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eschutho commented on pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
eschutho commented on pull request #12949:
URL: https://github.com/apache/superset/pull/12949#issuecomment-774165426
Do you want to set this as a "draft", too?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams commented on a change in pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams commented on a change in pull request #12949:
URL: https://github.com/apache/superset/pull/12949#discussion_r570414529
##########
File path: superset-frontend/src/SqlLab/components/TableElement.jsx
##########
@@ -52,59 +51,40 @@ const StyledSpan = styled.span`
cursor: pointer;
`;
-class TableElement extends React.PureComponent {
- constructor(props) {
- super(props);
- this.state = {
- sortColumns: false,
- expanded: true,
- hovered: false,
- };
- this.removeFromStore = this.removeFromStore.bind(this);
- this.toggleSortColumns = this.toggleSortColumns.bind(this);
- this.removeTable = this.removeTable.bind(this);
- this.setHover = this.setHover.bind(this);
- }
-
- setHover(hovered) {
- this.setState({ hovered });
- }
+function TableElement({ actions, table, timeout }) {
+ const [state, setState] = useState({
Review comment:
Break these into individual hooks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov-io commented on pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #12949:
URL: https://github.com/apache/superset/pull/12949#issuecomment-773495087
# [Codecov](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=h1) Report
> Merging [#12949](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=desc) (4067237) into [master](https://codecov.io/gh/apache/superset/commit/c781ab8adf4cb002edb33a9f2118ed84db8d6941?el=desc) (c781ab8) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/12949/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #12949 +/- ##
==========================================
- Coverage 66.92% 66.87% -0.06%
==========================================
Files 1024 489 -535
Lines 50185 28661 -21524
Branches 5213 0 -5213
==========================================
- Hits 33588 19166 -14422
+ Misses 16457 9495 -6962
+ Partials 140 0 -140
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `?` | |
| javascript | `?` | |
| python | `66.87% <ø> (+2.78%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.69% <0.00%> (-24.88%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `86.95% <0.00%> (-7.49%)` | :arrow_down: |
| [superset/db\_engine\_specs/clickhouse.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2NsaWNraG91c2UucHk=) | `87.09% <0.00%> (-7.35%)` | :arrow_down: |
| [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.25% <0.00%> (-6.28%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.85% <0.00%> (-6.12%)` | :arrow_down: |
| ... and [566 more](https://codecov.io/gh/apache/superset/pull/12949/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=footer). Last update [c781ab8...4067237](https://codecov.io/gh/apache/superset/pull/12949?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lyndsiWilliams commented on pull request #12949: [WIP] refactor: Converting TableElement.jsx to functional component
Posted by GitBox <gi...@apache.org>.
lyndsiWilliams commented on pull request #12949:
URL: https://github.com/apache/superset/pull/12949#issuecomment-852177645
Corbin has taken this over at [this PR](https://github.com/apache/superset/pull/14830).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org