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 2020/10/16 03:13:41 UTC
[GitHub] [incubator-superset] lilykuang opened a new pull request #11296: feat: css template add/ edit modal
lilykuang opened a new pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
- css template add/edit modal
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
![Screen Shot 2020-10-15 at 8 10 51 PM](https://user-images.githubusercontent.com/5705598/96208579-bd0d4400-0f22-11eb-9b96-1ebe05fd0bbd.png)
### TEST PLAN
<!--- What steps should be taken to verify the changes -->
- jest test
### 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.
- [x] 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] [incubator-superset] nytai merged pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
nytai merged pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296
----------------------------------------------------------------
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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `0.00%`.
> The diff coverage is `68.69%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 65.68% -0.01%
==========================================
Files 835 836 +1
Lines 39659 39771 +112
Branches 3610 3647 +37
==========================================
+ Hits 26052 26122 +70
- Misses 13498 13540 +42
Partials 109 109
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `55.58% <4.90%> (-0.39%)` | :arrow_down: |
| #javascript | `62.77% <68.69%> (+0.05%)` | :arrow_up: |
| #python | `60.87% <ø> (-0.03%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `80.39% <47.05%> (-16.91%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `72.44% <72.44%> (ø)` | |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/result\_set.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
| [...set-frontend/src/dashboard/util/getDropPosition.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldERyb3BQb3NpdGlvbi5qcw==) | `90.47% <0.00%> (-1.59%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/actions/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9hY3Rpb25zL3NxbExhYi5qcw==) | `64.52% <0.00%> (-0.43%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `41.25% <0.00%> (-0.42%)` | :arrow_down: |
| [superset-frontend/src/views/CRUD/hooks.ts](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvaG9va3MudHM=) | `78.65% <0.00%> (+2.24%)` | :arrow_up: |
| ... and [2 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `5.10%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 60.58% -5.11%
==========================================
Files 835 394 -441
Lines 39659 24935 -14724
Branches 3610 0 -3610
==========================================
- Hits 26052 15106 -10946
+ Misses 13498 9829 -3669
+ Partials 109 0 -109
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `?` | |
| #javascript | `?` | |
| #python | `60.58% <ø> (-0.33%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `82.97% <0.00%> (-8.52%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `86.03% <0.00%> (-3.08%)` | :arrow_down: |
| [superset/databases/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2FwaS5weQ==) | `87.73% <0.00%> (-2.84%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `71.86% <0.00%> (-2.61%)` | :arrow_down: |
| [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `97.56% <0.00%> (-2.44%)` | :arrow_down: |
| [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.48% <0.00%> (-1.89%)` | :arrow_down: |
| ... and [446 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `4.10%`.
> The diff coverage is `68.69%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 61.58% -4.11%
==========================================
Files 835 836 +1
Lines 39659 39768 +109
Branches 3610 3647 +37
==========================================
- Hits 26052 24492 -1560
- Misses 13498 15095 +1597
- Partials 109 181 +72
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `?` | |
| #javascript | `62.77% <68.69%> (+0.05%)` | :arrow_up: |
| #python | `60.87% <ø> (-0.03%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `80.39% <47.05%> (-16.91%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `72.44% <72.44%> (ø)` | |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupFormatters.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [172 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] lilykuang closed pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
lilykuang closed pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296
----------------------------------------------------------------
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] [incubator-superset] codecov-io commented on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/dde69d82b39feb853b9aa93976d312b9daf1c0c2?el=desc) will **increase** coverage by `1.27%`.
> The diff coverage is `68.69%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
+ Coverage 61.50% 62.77% +1.27%
==========================================
Files 834 442 -392
Lines 39562 14833 -24729
Branches 3610 3647 +37
==========================================
- Hits 24331 9311 -15020
+ Misses 15050 5341 -9709
Partials 181 181
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `62.77% <68.69%> (+0.05%)` | :arrow_up: |
| #python | `?` | |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `80.39% <47.05%> (-16.91%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `72.44% <72.44%> (ø)` | |
| [superset/db\_engine\_specs/redshift.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3JlZHNoaWZ0LnB5) | | |
| [...tions/versions/e9df189e5c7e\_update\_base\_metrics.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy9lOWRmMTg5ZTVjN2VfdXBkYXRlX2Jhc2VfbWV0cmljcy5weQ==) | | |
| [...40e8ea\_change\_table\_schema\_description\_to\_long\_.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy84OTExNWE0MGU4ZWFfY2hhbmdlX3RhYmxlX3NjaGVtYV9kZXNjcmlwdGlvbl90b19sb25nXy5weQ==) | | |
| [...80aa3f04bc82\_add\_parent\_ids\_in\_dashboard\_layout.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy84MGFhM2YwNGJjODJfYWRkX3BhcmVudF9pZHNfaW5fZGFzaGJvYXJkX2xheW91dC5weQ==) | | |
| [...ions/versions/a2d606a761d9\_adding\_favstar\_model.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy9hMmQ2MDZhNzYxZDlfYWRkaW5nX2ZhdnN0YXJfbW9kZWwucHk=) | | |
| [superset/css\_templates/commands/exceptions.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9jb21tYW5kcy9leGNlcHRpb25zLnB5) | | |
| [superset/commands/utils.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29tbWFuZHMvdXRpbHMucHk=) | | |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | | |
| ... and [387 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [dde69d8...ee66ef2](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] rusackas commented on a change in pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#discussion_r506734833
##########
File path: superset-frontend/src/views/CRUD/csstemplates/CssTemplateModal.tsx
##########
@@ -0,0 +1,258 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { FunctionComponent, useState, useEffect } from 'react';
+import { styled, t } from '@superset-ui/core';
+import { useSingleViewResource } from 'src/views/CRUD/hooks';
+
+import Icon from 'src/components/Icon';
+import Modal from 'src/common/components/Modal';
+import withToasts from 'src/messageToasts/enhancers/withToasts';
+import { CssEditor } from 'src/components/AsyncAceEditor';
+
+import { TemplateObject } from './types';
+
+interface CssTemplateModalProps {
+ addDangerToast: (msg: string) => void;
+ cssTemplate?: TemplateObject | null;
+ onCssTemplateAdd?: (cssTemplate?: TemplateObject) => void;
+ onHide: () => void;
+ show: boolean;
+}
+
+const StyledCssTemplateTitle = styled.div`
+ margin: ${({ theme }) => theme.gridUnit * 2}px auto
+ ${({ theme }) => theme.gridUnit * 4}px auto;
+`;
+
+const StyledCssEditor = styled(CssEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+const StyledIcon = styled(Icon)`
+ margin: auto ${({ theme }) => theme.gridUnit * 2}px auto 0;
+`;
+
+const TemplateContainer = styled.div`
+ margin-bottom: ${({ theme }) => theme.gridUnit * 10}px;
+
+ .control-label {
+ margin-bottom: ${({ theme }) => theme.gridUnit * 2}px;
+ }
+
+ .required {
+ margin-left: ${({ theme }) => theme.gridUnit / 2}px;
+ color: ${({ theme }) => theme.colors.error.base};
+ }
+
+ input[type='text'] {
+ padding: ${({ theme }) => theme.gridUnit * 1.5}px
+ ${({ theme }) => theme.gridUnit * 2}px;
+ border: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
+ border-radius: ${({ theme }) => theme.gridUnit}px;
+ width: 50%;
+ }
+`;
+
+const CssTemplateModal: FunctionComponent<CssTemplateModalProps> = ({
+ addDangerToast,
+ onCssTemplateAdd,
+ onHide,
+ show,
+ cssTemplate = null,
+}) => {
+ const [disableSave, setDisableSave] = useState<boolean>(true);
+ const [
+ currentCssTemplate,
+ setCurrentCssTemplate,
+ ] = useState<TemplateObject | null>(null);
+ const [isHidden, setIsHidden] = useState<boolean>(true);
+ const isEditMode = cssTemplate !== null;
+
+ // cssTemplate fetch logic
+ const {
+ state: { loading, resource },
+ fetchResource,
+ createResource,
+ updateResource,
+ } = useSingleViewResource<TemplateObject>(
+ 'css_template',
+ t('css_template'),
+ addDangerToast,
+ );
+
+ // Functions
+ const hide = () => {
+ setIsHidden(true);
+ onHide();
+ };
+
+ const onSave = () => {
+ if (isEditMode) {
+ // Edit
+ if (currentCssTemplate && currentCssTemplate.id) {
+ const update_id = currentCssTemplate.id;
+ delete currentCssTemplate.id;
+ delete currentCssTemplate.created_by;
+ updateResource(update_id, currentCssTemplate).then(() => {
+ if (onCssTemplateAdd) {
+ onCssTemplateAdd();
+ }
+
+ hide();
+ });
+ }
+ } else if (currentCssTemplate) {
+ // Create
+ createResource(currentCssTemplate).then(() => {
+ if (onCssTemplateAdd) {
+ onCssTemplateAdd();
+ }
+
+ hide();
+ });
+ }
+ };
+
+ const onTemplateNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
+ const { target } = event;
+
+ const data = {
+ ...currentCssTemplate,
+ template_name: currentCssTemplate ? currentCssTemplate.template_name : '',
+ css: currentCssTemplate ? currentCssTemplate.css : '',
+ };
+
+ data[target.name] = target.value;
+ setCurrentCssTemplate(data);
+ };
+
+ const onCssChange = (css: string) => {
+ const data = {
+ ...currentCssTemplate,
+ template_name: currentCssTemplate ? currentCssTemplate.template_name : '',
+ css,
+ };
+ setCurrentCssTemplate(data);
+ };
+
+ const validate = () => {
+ if (
+ currentCssTemplate &&
+ currentCssTemplate.template_name.length &&
+ currentCssTemplate.css &&
+ currentCssTemplate.css.length
+ ) {
+ setDisableSave(false);
+ } else {
+ setDisableSave(true);
+ }
+ };
+
+ // Initialize
+ if (
+ isEditMode &&
+ (!currentCssTemplate ||
+ !currentCssTemplate.id ||
+ (cssTemplate && cssTemplate.id !== currentCssTemplate.id) ||
+ (isHidden && show))
+ ) {
+ if (cssTemplate && cssTemplate.id !== null && !loading) {
+ const id = cssTemplate.id || 0;
+
+ fetchResource(id).then(() => {
+ setCurrentCssTemplate(resource);
+ });
+ }
+ } else if (
+ !isEditMode &&
+ (!currentCssTemplate || currentCssTemplate.id || (isHidden && show))
+ ) {
+ setCurrentCssTemplate({
+ template_name: '',
+ css: '',
+ });
+ }
+
+ // Validation
+ useEffect(() => {
+ validate();
+ }, [
+ currentCssTemplate ? currentCssTemplate.template_name : '',
+ currentCssTemplate ? currentCssTemplate.css : '',
+ ]);
+
+ // Show/hide
+ if (isHidden && show) {
+ setIsHidden(false);
+ }
+
+ return (
+ <Modal
+ disablePrimaryButton={disableSave}
+ onHandledPrimaryAction={onSave}
+ onHide={hide}
+ primaryButtonName={isEditMode ? t('Save') : t('Add')}
+ show={show}
+ width="800px"
Review comment:
FWIW, we can do some fun stuff with this, e.g. `width={"calc(100% - 100px)"}` if you ever feel like it :D
If/when there are a lot of these modals kicking around, we should probably add a limited number of preferred values to the Theme or a constants file.
----------------------------------------------------------------
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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `0.14%`.
> The diff coverage is `68.69%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 65.54% -0.15%
==========================================
Files 835 836 +1
Lines 39659 39771 +112
Branches 3610 3647 +37
==========================================
+ Hits 26052 26066 +14
- Misses 13498 13592 +94
- Partials 109 113 +4
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `54.94% <4.90%> (-1.03%)` | :arrow_down: |
| #javascript | `62.77% <68.69%> (+0.05%)` | :arrow_up: |
| #python | `60.87% <ø> (-0.03%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `80.39% <47.05%> (-16.91%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `72.44% <72.44%> (ø)` | |
| [...et-frontend/src/SqlLab/reducers/getInitialState.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9nZXRJbml0aWFsU3RhdGUuanM=) | `33.33% <0.00%> (-16.67%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset-frontend/src/reduxUtils.ts](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3JlZHV4VXRpbHMudHM=) | `70.88% <0.00%> (-8.87%)` | :arrow_down: |
| [...rontend/src/SqlLab/components/TabbedSqlEditors.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1RhYmJlZFNxbEVkaXRvcnMuanN4) | `76.12% <0.00%> (-5.17%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/actions/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9hY3Rpb25zL3NxbExhYi5qcw==) | `60.25% <0.00%> (-4.71%)` | :arrow_down: |
| [...rontend/src/SqlLab/components/SqlEditorLeftBar.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvckxlZnRCYXIuanN4) | `44.00% <0.00%> (-4.00%)` | :arrow_down: |
| [superset-frontend/src/SqlLab/reducers/sqlLab.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9yZWR1Y2Vycy9zcWxMYWIuanM=) | `37.91% <0.00%> (-3.75%)` | :arrow_down: |
| [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
| ... and [10 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `4.53%`.
> The diff coverage is `68.69%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 61.15% -4.54%
==========================================
Files 835 836 +1
Lines 39659 39768 +109
Branches 3610 3647 +37
==========================================
- Hits 26052 24322 -1730
- Misses 13498 15265 +1767
- Partials 109 181 +72
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `?` | |
| #javascript | `62.77% <68.69%> (+0.05%)` | :arrow_up: |
| #python | `60.19% <ø> (-0.71%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `80.39% <47.05%> (-16.91%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `72.44% <72.44%> (ø)` | |
| [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/explore/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvaW5kZXguanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/dashboard/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupColors.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset-frontend/src/setup/setupFormatters.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [181 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] rusackas commented on a change in pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#discussion_r506735967
##########
File path: superset-frontend/src/views/CRUD/csstemplates/CssTemplateModal.tsx
##########
@@ -0,0 +1,258 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import React, { FunctionComponent, useState, useEffect } from 'react';
+import { styled, t } from '@superset-ui/core';
+import { useSingleViewResource } from 'src/views/CRUD/hooks';
+
+import Icon from 'src/components/Icon';
+import Modal from 'src/common/components/Modal';
+import withToasts from 'src/messageToasts/enhancers/withToasts';
+import { CssEditor } from 'src/components/AsyncAceEditor';
+
+import { TemplateObject } from './types';
+
+interface CssTemplateModalProps {
+ addDangerToast: (msg: string) => void;
+ cssTemplate?: TemplateObject | null;
+ onCssTemplateAdd?: (cssTemplate?: TemplateObject) => void;
+ onHide: () => void;
+ show: boolean;
+}
+
+const StyledCssTemplateTitle = styled.div`
+ margin: ${({ theme }) => theme.gridUnit * 2}px auto
+ ${({ theme }) => theme.gridUnit * 4}px auto;
+`;
+
+const StyledCssEditor = styled(CssEditor)`
+ border-radius: ${({ theme }) => theme.borderRadius}px;
+ border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
+`;
+
+const StyledIcon = styled(Icon)`
+ margin: auto ${({ theme }) => theme.gridUnit * 2}px auto 0;
+`;
+
+const TemplateContainer = styled.div`
+ margin-bottom: ${({ theme }) => theme.gridUnit * 10}px;
+
+ .control-label {
+ margin-bottom: ${({ theme }) => theme.gridUnit * 2}px;
+ }
+
+ .required {
+ margin-left: ${({ theme }) => theme.gridUnit / 2}px;
+ color: ${({ theme }) => theme.colors.error.base};
+ }
+
+ input[type='text'] {
+ padding: ${({ theme }) => theme.gridUnit * 1.5}px
+ ${({ theme }) => theme.gridUnit * 2}px;
+ border: 1px solid ${({ theme }) => theme.colors.grayscale.light2};
+ border-radius: ${({ theme }) => theme.gridUnit}px;
+ width: 50%;
+ }
+`;
+
+const CssTemplateModal: FunctionComponent<CssTemplateModalProps> = ({
+ addDangerToast,
+ onCssTemplateAdd,
+ onHide,
+ show,
+ cssTemplate = null,
+}) => {
+ const [disableSave, setDisableSave] = useState<boolean>(true);
+ const [
+ currentCssTemplate,
+ setCurrentCssTemplate,
+ ] = useState<TemplateObject | null>(null);
+ const [isHidden, setIsHidden] = useState<boolean>(true);
+ const isEditMode = cssTemplate !== null;
+
+ // cssTemplate fetch logic
+ const {
+ state: { loading, resource },
+ fetchResource,
+ createResource,
+ updateResource,
+ } = useSingleViewResource<TemplateObject>(
+ 'css_template',
+ t('css_template'),
+ addDangerToast,
+ );
+
+ // Functions
+ const hide = () => {
+ setIsHidden(true);
+ onHide();
+ };
+
+ const onSave = () => {
+ if (isEditMode) {
+ // Edit
+ if (currentCssTemplate && currentCssTemplate.id) {
+ const update_id = currentCssTemplate.id;
+ delete currentCssTemplate.id;
+ delete currentCssTemplate.created_by;
+ updateResource(update_id, currentCssTemplate).then(() => {
+ if (onCssTemplateAdd) {
+ onCssTemplateAdd();
+ }
+
+ hide();
+ });
+ }
+ } else if (currentCssTemplate) {
+ // Create
+ createResource(currentCssTemplate).then(() => {
+ if (onCssTemplateAdd) {
+ onCssTemplateAdd();
+ }
+
+ hide();
+ });
+ }
+ };
+
+ const onTemplateNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {
+ const { target } = event;
+
+ const data = {
+ ...currentCssTemplate,
+ template_name: currentCssTemplate ? currentCssTemplate.template_name : '',
+ css: currentCssTemplate ? currentCssTemplate.css : '',
+ };
+
+ data[target.name] = target.value;
+ setCurrentCssTemplate(data);
+ };
+
+ const onCssChange = (css: string) => {
+ const data = {
+ ...currentCssTemplate,
+ template_name: currentCssTemplate ? currentCssTemplate.template_name : '',
+ css,
+ };
+ setCurrentCssTemplate(data);
+ };
+
+ const validate = () => {
+ if (
+ currentCssTemplate &&
+ currentCssTemplate.template_name.length &&
+ currentCssTemplate.css &&
+ currentCssTemplate.css.length
+ ) {
+ setDisableSave(false);
+ } else {
+ setDisableSave(true);
+ }
+ };
+
+ // Initialize
+ if (
+ isEditMode &&
+ (!currentCssTemplate ||
+ !currentCssTemplate.id ||
+ (cssTemplate && cssTemplate.id !== currentCssTemplate.id) ||
+ (isHidden && show))
+ ) {
+ if (cssTemplate && cssTemplate.id !== null && !loading) {
+ const id = cssTemplate.id || 0;
+
+ fetchResource(id).then(() => {
+ setCurrentCssTemplate(resource);
+ });
+ }
+ } else if (
+ !isEditMode &&
+ (!currentCssTemplate || currentCssTemplate.id || (isHidden && show))
+ ) {
+ setCurrentCssTemplate({
+ template_name: '',
+ css: '',
+ });
+ }
+
+ // Validation
+ useEffect(() => {
+ validate();
+ }, [
+ currentCssTemplate ? currentCssTemplate.template_name : '',
+ currentCssTemplate ? currentCssTemplate.css : '',
+ ]);
+
+ // Show/hide
+ if (isHidden && show) {
+ setIsHidden(false);
+ }
+
+ return (
+ <Modal
+ disablePrimaryButton={disableSave}
+ onHandledPrimaryAction={onSave}
+ onHide={hide}
+ primaryButtonName={isEditMode ? t('Save') : t('Add')}
+ show={show}
+ width="800px"
+ title={
+ <h4 data-test="css-template-modal-title">
+ {isEditMode ? (
+ <StyledIcon name="edit-alt" />
+ ) : (
+ <StyledIcon name="plus-large" />
+ )}
+ {isEditMode
+ ? t('Edit CSS Template Properties')
+ : t('Add CSS Template')}
+ </h4>
+ }
+ >
+ <StyledCssTemplateTitle>
+ <h4>{t('Basic Information')}</h4>
+ </StyledCssTemplateTitle>
+ <TemplateContainer>
+ <div className="control-label">
+ {t('css template name')}
+ <span className="required">*</span>
+ </div>
+ <input
+ name="template_name"
+ onChange={onTemplateNameChange}
+ type="text"
+ value={currentCssTemplate?.template_name}
+ />
+ </TemplateContainer>
+ <TemplateContainer>
+ <div className="control-label">
+ {t('css')}
+ <span className="required">*</span>
+ </div>
+ <StyledCssEditor
+ height="240px"
Review comment:
Might not be worth the battle, but I'm curious if we could make the modal take up as much room on the screen as it can, and use a flexbox layout within the modal, which would let THIS component take up as much of the layout as possible, rather than limiting its height with a static value.
----------------------------------------------------------------
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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `6.87%`.
> The diff coverage is `4.90%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 58.81% -6.88%
==========================================
Files 835 799 -36
Lines 39659 38446 -1213
Branches 3610 3426 -184
==========================================
- Hits 26052 22613 -3439
- Misses 13498 15651 +2153
- Partials 109 182 +73
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `55.56% <4.90%> (-0.41%)` | :arrow_down: |
| #javascript | `?` | |
| #python | `60.58% <ø> (-0.33%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `2.43% <0.00%> (-94.86%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `5.68% <5.68%> (ø)` | |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rc/dashboard/util/getLayoutComponentFromChartId.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldExheW91dENvbXBvbmVudEZyb21DaGFydElkLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `0.00% <0.00%> (-89.19%)` | :arrow_down: |
| [.../src/dashboard/components/FilterIndicatorGroup.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlckluZGljYXRvckdyb3VwLmpzeA==) | `11.76% <0.00%> (-88.24%)` | :arrow_down: |
| [...c/explore/components/controls/withVerification.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy93aXRoVmVyaWZpY2F0aW9uLmpzeA==) | `9.09% <0.00%> (-87.88%)` | :arrow_down: |
| ... and [278 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/dde69d82b39feb853b9aa93976d312b9daf1c0c2?el=desc) will **increase** coverage by `1.27%`.
> The diff coverage is `68.69%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
+ Coverage 61.50% 62.77% +1.27%
==========================================
Files 834 442 -392
Lines 39562 14833 -24729
Branches 3610 3647 +37
==========================================
- Hits 24331 9311 -15020
+ Misses 15050 5341 -9709
Partials 181 181
```
| Flag | Coverage Δ | |
|---|---|---|
| #javascript | `62.77% <68.69%> (+0.05%)` | :arrow_up: |
| #python | `?` | |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `80.39% <47.05%> (-16.91%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `72.44% <72.44%> (ø)` | |
| [superset/cachekeys/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2FjaGVrZXlzL2FwaS5weQ==) | | |
| [superset/migrations/versions/8b70aa3d0f87\_.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy84YjcwYWEzZDBmODdfLnB5) | | |
| [superset/models/\_\_init\_\_.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL19faW5pdF9fLnB5) | | |
| [superset/examples/flights.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvZmxpZ2h0cy5weQ==) | | |
| [superset/tasks/slack\_util.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdGFza3Mvc2xhY2tfdXRpbC5weQ==) | | |
| [superset/datasets/commands/exceptions.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvZXhjZXB0aW9ucy5weQ==) | | |
| [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | | |
| [...ersions/2929af7925ed\_tz\_offsets\_in\_data\_sources.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yOTI5YWY3OTI1ZWRfdHpfb2Zmc2V0c19pbl9kYXRhX3NvdXJjZXMucHk=) | | |
| ... and [387 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [dde69d8...ee66ef2](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `5.66%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 60.02% -5.67%
==========================================
Files 835 394 -441
Lines 39659 24935 -14724
Branches 3610 0 -3610
==========================================
- Hits 26052 14968 -11084
+ Misses 13498 9967 -3531
+ Partials 109 0 -109
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `?` | |
| #javascript | `?` | |
| #python | `60.02% <ø> (-0.88%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset/views/database/views.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.30% <0.00%> (-25.14%)` | :arrow_down: |
| [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
| [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `82.97% <0.00%> (-8.52%)` | :arrow_down: |
| [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
| [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `73.65% <0.00%> (-7.78%)` | :arrow_down: |
| [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.83% <0.00%> (-7.53%)` | :arrow_down: |
| [superset/sql\_validators/base.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
| [superset/views/database/forms.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvZm9ybXMucHk=) | `83.33% <0.00%> (-5.56%)` | :arrow_down: |
| [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `70.65% <0.00%> (-3.83%)` | :arrow_down: |
| ... and [452 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=h1) Report
> Merging [#11296](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/31e4a90440885c5e0100408e65fedc33786240db?el=desc) will **decrease** coverage by `7.10%`.
> The diff coverage is `4.90%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11296/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11296?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #11296 +/- ##
==========================================
- Coverage 65.69% 58.58% -7.11%
==========================================
Files 835 799 -36
Lines 39659 38446 -1213
Branches 3610 3426 -184
==========================================
- Hits 26052 22525 -3527
- Misses 13498 15731 +2233
- Partials 109 190 +81
```
| Flag | Coverage Δ | |
|---|---|---|
| #cypress | `54.91% <4.90%> (-1.06%)` | :arrow_down: |
| #javascript | `?` | |
| #python | `60.58% <ø> (-0.33%)` | :arrow_down: |
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/incubator-superset/pull/11296?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `2.43% <0.00%> (-94.86%)` | :arrow_down: |
| [...d/src/views/CRUD/csstemplates/CssTemplateModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlTW9kYWwudHN4) | `5.68% <5.68%> (ø)` | |
| [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2RuZC1yZW9yZGVyLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rset-frontend/src/dashboard/util/getEmptyLayout.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...rc/dashboard/util/getLayoutComponentFromChartId.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldExheW91dENvbXBvbmVudEZyb21DaGFydElkLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL3Jlc2l6YWJsZS9SZXNpemFibGVIYW5kbGUuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEZpbHRlclNjb3BlRnJvbU5vZGVzVHJlZS5qcw==) | `0.00% <0.00%> (-93.48%)` | :arrow_down: |
| [...uperset-frontend/src/utils/getClientErrorObject.ts](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `0.00% <0.00%> (-89.19%)` | :arrow_down: |
| [.../src/dashboard/components/FilterIndicatorGroup.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlckluZGljYXRvckdyb3VwLmpzeA==) | `11.76% <0.00%> (-88.24%)` | :arrow_down: |
| [...c/explore/components/controls/withVerification.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy93aXRoVmVyaWZpY2F0aW9uLmpzeA==) | `9.09% <0.00%> (-87.88%)` | :arrow_down: |
| ... and [280 more](https://codecov.io/gh/apache/incubator-superset/pull/11296/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11296?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/incubator-superset/pull/11296?src=pr&el=footer). Last update [31e4a90...3fdcf10](https://codecov.io/gh/apache/incubator-superset/pull/11296?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] [incubator-superset] codecov-io edited a comment on pull request #11296: feat: css template add/edit modal
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11296:
URL: https://github.com/apache/incubator-superset/pull/11296#issuecomment-709707492
----------------------------------------------------------------
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