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/14 18:20:07 UTC

[GitHub] [incubator-superset] riahk opened a new pull request #11271: feat: CSS Templates List Actions

riahk opened a new pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271


   ### SUMMARY
   - [x] Add filters support
   - [x] Add single and bulk delete action functionality
   - [x] Add modified by tooltip
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <img width="1208" alt="Screen Shot 2020-10-14 at 11 04 59 AM" src="https://user-images.githubusercontent.com/8216382/96028928-cd33ff00-0e0e-11eb-9f78-91eb43f1a186.png">
   <img width="1203" alt="Screen Shot 2020-10-14 at 11 05 23 AM" src="https://user-images.githubusercontent.com/8216382/96028947-d1f8b300-0e0e-11eb-92d2-76f9a85260c2.png">
   <img width="1202" alt="Screen Shot 2020-10-14 at 11 05 30 AM" src="https://user-images.githubusercontent.com/8216382/96028956-d45b0d00-0e0e-11eb-903d-54e6019a17c5.png">
   
   ### TEST PLAN
   - [x] Update `CssTemplatesList_spec.jsx`
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [x] 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] [incubator-superset] codecov-io edited a comment on pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `7.47%`.
   > The diff coverage is `2.56%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   58.30%   -7.48%     
   ==========================================
     Files         839      800      -39     
     Lines       39828    38550    -1278     
     Branches     3652     3450     -202     
   ==========================================
   - Hits        26200    22477    -3723     
   - Misses      13528    15895    +2367     
   - Partials      100      178      +78     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `55.19% <0.00%> (-0.90%)` | :arrow_down: |
   | #javascript | `?` | |
   | #python | `60.00% <50.00%> (-0.90%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `1.29% <0.00%> (-79.10%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `2.63% <ø> (-59.21%)` | :arrow_down: |
   | [superset/views/css\_templates.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY3NzX3RlbXBsYXRlcy5weQ==) | `89.65% <0.00%> (-0.35%)` | :arrow_down: |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/components/Menu/LanguagePicker.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9MYW5ndWFnZVBpY2tlci50c3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `0.00% <0.00%> (-89.19%)` | :arrow_down: |
   | ... and [292 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...b5ff769](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 commented on pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `5.43%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   60.00%   -5.44%     
   ==========================================
     Files         831      393     -438     
     Lines       39528    24823   -14705     
     Branches     3598        0    -3598     
   ==========================================
   - Hits        25866    14895   -10971     
   + Misses      13553     9928    -3625     
   + Partials      109        0     -109     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.00% <100.00%> (-0.54%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `65.62% <0.00%> (-9.38%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-3.89%)` | :arrow_down: |
   | [superset/utils/celery.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `82.14% <0.00%> (-3.58%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `86.55% <0.00%> (-0.81%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `88.91% <0.00%> (-0.69%)` | :arrow_down: |
   | ... and [441 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...6e34eaf](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `2.69%`.
   > The diff coverage is `80.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   62.74%   -2.70%     
   ==========================================
     Files         831      441     -390     
     Lines       39528    14766   -24762     
     Branches     3598     3617      +19     
   ==========================================
   - Hits        25866     9265   -16601     
   + Misses      13553     5320    -8233     
   - Partials      109      181      +72     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.74% <80.00%> (+0.07%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwRm9ybWF0dGVycy5qcw==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [566 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...0d13810](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r504980128



##########
File path: superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
##########
@@ -74,4 +89,76 @@ describe('CssTemplatesList', () => {
   it('renders a ListView', () => {
     expect(wrapper.find(ListView)).toExist();
   });
+
+  it('fetches templates', () => {
+    const callsQ = fetchMock.calls(/css_template\/\?q/);
+    expect(callsQ).toHaveLength(1);
+    expect(callsQ[0][0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders Filters', () => {
+    expect(wrapper.find(Filters)).toExist();
+  });
+
+  it('searches', async () => {
+    const filtersWrapper = wrapper.find(Filters);
+    act(() => {
+      filtersWrapper
+        .find('[name="template_name"]')
+        .first()
+        .props()
+        .onSubmit('fooo');
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(fetchMock.lastCall()[0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(filters:!((col:template_name,opr:ct,value:fooo)),order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders a DeleteModal', () => {
+    expect(wrapper.find(DeleteModal)).toExist();
+  });
+
+  it('deletes', async () => {
+    act(() => {
+      wrapper.find('span[data-test="delete-action"]').first().props().onClick();
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(
+      wrapper.find(DeleteModal).first().props().description,
+    ).toMatchInlineSnapshot(
+      `"This action will permanently delete the template."`,
+    );
+
+    act(() => {
+      wrapper
+        .find('#delete')
+        .first()
+        .props()
+        .onChange({ target: { value: 'DELETE' } });
+    });
+    await waitForComponentToPaint(wrapper);
+    act(() => {
+      wrapper.find('button').last().props().onClick();

Review comment:
       I'm a-ok with testing onClick handlers like this, but curious, just for conversation, if you see advantages to it versus doing a `simulate('click')`




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `5.77%`.
   > The diff coverage is `50.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   60.00%   -5.78%     
   ==========================================
     Files         839      394     -445     
     Lines       39828    24952   -14876     
     Branches     3652        0    -3652     
   ==========================================
   - Hits        26200    14972   -11228     
   + Misses      13528     9980    -3548     
   + Partials      100        0     -100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.00% <50.00%> (-0.90%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/css\_templates.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY3NzX3RlbXBsYXRlcy5weQ==) | `89.65% <0.00%> (-0.35%)` | :arrow_down: |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `83.55% <0.00%> (-6.19%)` | :arrow_down: |
   | [superset/databases/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2FwaS5weQ==) | `86.79% <0.00%> (-3.78%)` | :arrow_down: |
   | ... and [461 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...b5ff769](https://codecov.io/gh/apache/incubator-superset/pull/11271?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] nytai commented on a change in pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
nytai commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r508170763



##########
File path: superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
##########
@@ -74,4 +89,76 @@ describe('CssTemplatesList', () => {
   it('renders a ListView', () => {
     expect(wrapper.find(ListView)).toExist();
   });
+
+  it('fetches templates', () => {
+    const callsQ = fetchMock.calls(/css_template\/\?q/);
+    expect(callsQ).toHaveLength(1);
+    expect(callsQ[0][0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders Filters', () => {
+    expect(wrapper.find(Filters)).toExist();
+  });
+
+  it('searches', async () => {
+    const filtersWrapper = wrapper.find(Filters);
+    act(() => {
+      filtersWrapper
+        .find('[name="template_name"]')
+        .first()
+        .props()
+        .onSubmit('fooo');
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(fetchMock.lastCall()[0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(filters:!((col:template_name,opr:ct,value:fooo)),order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders a DeleteModal', () => {
+    expect(wrapper.find(DeleteModal)).toExist();
+  });
+
+  it('deletes', async () => {
+    act(() => {
+      wrapper.find('span[data-test="delete-action"]').first().props().onClick();

Review comment:
       +1 for the more generic `[data-test="delete-action"]`




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `5.20%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   60.57%   -5.21%     
   ==========================================
     Files         839      394     -445     
     Lines       39828    24934   -14894     
     Branches     3652        0    -3652     
   ==========================================
   - Hits        26200    15105   -11095     
   + Misses      13528     9829    -3699     
   + Partials      100        0     -100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.57% <100.00%> (-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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `97.56% <0.00%> (-2.44%)` | :arrow_down: |
   | ... and [452 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...5ec7c72](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `5.75%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   60.02%   -5.76%     
   ==========================================
     Files         839      394     -445     
     Lines       39828    24934   -14894     
     Branches     3652        0    -3652     
   ==========================================
   - Hits        26200    14967   -11233     
   + Misses      13528     9967    -3561     
   + Partials      100        0     -100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.02% <100.00%> (-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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.10% <0.00%> (-25.33%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvZm9ybXMucHk=) | `83.33% <0.00%> (-5.56%)` | :arrow_down: |
   | ... and [457 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...5ec7c72](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `5.58%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   60.19%   -5.59%     
   ==========================================
     Files         839      394     -445     
     Lines       39828    24925   -14903     
     Branches     3652        0    -3652     
   ==========================================
   - Hits        26200    15004   -11196     
   + Misses      13528     9921    -3607     
   + Partials      100        0     -100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.19% <100.00%> (-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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-11.67%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `97.59% <0.00%> (-2.41%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.43% <0.00%> (-1.68%)` | :arrow_down: |
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `73.98% <0.00%> (-0.49%)` | :arrow_down: |
   | ... and [448 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...afcde0f](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `4.31%`.
   > The diff coverage is `79.16%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   61.47%   -4.32%     
   ==========================================
     Files         839      839              
     Lines       39828    39868      +40     
     Branches     3652     3659       +7     
   ==========================================
   - Hits        26200    24507    -1693     
   - Misses      13528    15180    +1652     
   - Partials      100      181      +81     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.70% <78.72%> (+0.03%)` | :arrow_up: |
   | #python | `60.73% <100.00%> (-0.18%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `78.49% <78.26%> (-1.90%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [176 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...afcde0f](https://codecov.io/gh/apache/incubator-superset/pull/11271?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] nytai commented on pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
nytai commented on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-713082580


   https://github.com/apache/incubator-superset/pull/11296 just merged, so let's rebase and make sure everything looks good as this will likely be the last PR for this feature. 


----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `4.04%`.
   > The diff coverage is `80.39%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   61.39%   -4.05%     
   ==========================================
     Files         831      834       +3     
     Lines       39528    39600      +72     
     Branches     3598     3617      +19     
   ==========================================
   - Hits        25866    24313    -1553     
   - Misses      13553    15106    +1553     
   - Partials      109      181      +72     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.74% <80.00%> (+0.07%)` | :arrow_up: |
   | #python | `60.59% <100.00%> (+0.05%)` | :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/incubator-superset/pull/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [179 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...0d13810](https://codecov.io/gh/apache/incubator-superset/pull/11271?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] nytai merged pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
nytai merged pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271


   


----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r504978687



##########
File path: superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
##########
@@ -74,4 +89,76 @@ describe('CssTemplatesList', () => {
   it('renders a ListView', () => {
     expect(wrapper.find(ListView)).toExist();
   });
+
+  it('fetches templates', () => {
+    const callsQ = fetchMock.calls(/css_template\/\?q/);
+    expect(callsQ).toHaveLength(1);
+    expect(callsQ[0][0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders Filters', () => {
+    expect(wrapper.find(Filters)).toExist();
+  });
+
+  it('searches', async () => {
+    const filtersWrapper = wrapper.find(Filters);
+    act(() => {
+      filtersWrapper
+        .find('[name="template_name"]')
+        .first()
+        .props()
+        .onSubmit('fooo');

Review comment:
       NIT: we prefer 'foo' around here! J/K, use as much 'oooooo' as you want 👻 




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `5.60%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   60.18%   -5.61%     
   ==========================================
     Files         839      394     -445     
     Lines       39828    24936   -14892     
     Branches     3652        0    -3652     
   ==========================================
   - Hits        26200    15007   -11193     
   + Misses      13528     9929    -3599     
   + Partials      100        0     -100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.18% <100.00%> (-0.73%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-11.67%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvd29ybGRfYmFuay5weQ==) | `97.10% <0.00%> (-2.90%)` | :arrow_down: |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `97.59% <0.00%> (-2.41%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `80.70% <0.00%> (-1.76%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.43% <0.00%> (-1.68%)` | :arrow_down: |
   | [superset/views/core.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `73.98% <0.00%> (-0.49%)` | :arrow_down: |
   | ... and [444 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...afcde0f](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `4.03%`.
   > The diff coverage is `80.39%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   61.39%   -4.04%     
   ==========================================
     Files         831      834       +3     
     Lines       39528    39600      +72     
     Branches     3598     3617      +19     
   ==========================================
   - Hits        25866    24314    -1552     
   - Misses      13553    15105    +1552     
   - Partials      109      181      +72     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.74% <80.00%> (+0.07%)` | :arrow_up: |
   | #python | `60.59% <100.00%> (+0.06%)` | :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/incubator-superset/pull/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [178 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...0d13810](https://codecov.io/gh/apache/incubator-superset/pull/11271?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] riahk commented on a change in pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
riahk commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r504985963



##########
File path: superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
##########
@@ -74,4 +89,76 @@ describe('CssTemplatesList', () => {
   it('renders a ListView', () => {
     expect(wrapper.find(ListView)).toExist();
   });
+
+  it('fetches templates', () => {
+    const callsQ = fetchMock.calls(/css_template\/\?q/);
+    expect(callsQ).toHaveLength(1);
+    expect(callsQ[0][0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders Filters', () => {
+    expect(wrapper.find(Filters)).toExist();
+  });
+
+  it('searches', async () => {
+    const filtersWrapper = wrapper.find(Filters);
+    act(() => {
+      filtersWrapper
+        .find('[name="template_name"]')
+        .first()
+        .props()
+        .onSubmit('fooo');
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(fetchMock.lastCall()[0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(filters:!((col:template_name,opr:ct,value:fooo)),order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders a DeleteModal', () => {
+    expect(wrapper.find(DeleteModal)).toExist();
+  });
+
+  it('deletes', async () => {
+    act(() => {
+      wrapper.find('span[data-test="delete-action"]').first().props().onClick();
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(
+      wrapper.find(DeleteModal).first().props().description,
+    ).toMatchInlineSnapshot(
+      `"This action will permanently delete the template."`,
+    );
+
+    act(() => {
+      wrapper
+        .find('#delete')
+        .first()
+        .props()
+        .onChange({ target: { value: 'DELETE' } });
+    });
+    await waitForComponentToPaint(wrapper);
+    act(() => {
+      wrapper.find('button').last().props().onClick();

Review comment:
       I find it can be a bit finicky, in this example it works but there's another case of calling `onClick` where `simulate('click')` doesn't work.




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `4.40%`.
   > The diff coverage is `80.39%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   61.03%   -4.41%     
   ==========================================
     Files         831      834       +3     
     Lines       39528    39607      +79     
     Branches     3598     3622      +24     
   ==========================================
   - Hits        25866    24174    -1692     
   - Misses      13553    15251    +1698     
   - Partials      109      182      +73     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.79% <80.00%> (+0.12%)` | :arrow_up: |
   | #python | `59.99% <100.00%> (-0.55%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [185 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...6e34eaf](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r504979296



##########
File path: superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
##########
@@ -74,4 +89,76 @@ describe('CssTemplatesList', () => {
   it('renders a ListView', () => {
     expect(wrapper.find(ListView)).toExist();
   });
+
+  it('fetches templates', () => {
+    const callsQ = fetchMock.calls(/css_template\/\?q/);
+    expect(callsQ).toHaveLength(1);
+    expect(callsQ[0][0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders Filters', () => {
+    expect(wrapper.find(Filters)).toExist();
+  });
+
+  it('searches', async () => {
+    const filtersWrapper = wrapper.find(Filters);
+    act(() => {
+      filtersWrapper
+        .find('[name="template_name"]')
+        .first()
+        .props()
+        .onSubmit('fooo');
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(fetchMock.lastCall()[0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(filters:!((col:template_name,opr:ct,value:fooo)),order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders a DeleteModal', () => {
+    expect(wrapper.find(DeleteModal)).toExist();
+  });
+
+  it('deletes', async () => {
+    act(() => {
+      wrapper.find('span[data-test="delete-action"]').first().props().onClick();

Review comment:
       Not sure we even need to rely on this being a span, but whatevs.




----------------------------------------------------------------
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 commented on a change in pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
nytai commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r508170265



##########
File path: superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.tsx
##########
@@ -71,13 +80,105 @@ function CssTemplatesList({
   const canEdit = hasPerm('can_edit');
   const canDelete = hasPerm('can_delete');
 
+  const menuData: SubMenuProps = {
+    name: t('CSS Templates'),
+  };
+
+  const subMenuButtons: Array<ButtonProps> = [];
+
+  if (canDelete) {
+    subMenuButtons.push({
+      name: t('Bulk Select'),
+      onClick: toggleBulkSelect,
+      buttonStyle: 'secondary',
+    });
+  }
+
+  /* subMenuButtons.push({
+    name: t('+ CSS Template'),
+    onClick: openNewTemplate,
+    buttonStyle: 'primary',
+  }); */
+
+  menuData.buttons = subMenuButtons;
+
+  const [
+    templateCurrentlyDeleting,
+    setTemplateCurrentlyDeleting,
+  ] = useState<TemplateObject | null>(null);
+
+  const handleTemplateDelete = ({ id, template_name }: TemplateObject) => {
+    SupersetClient.delete({
+      endpoint: `/api/v1/css_template/${id}`,
+    }).then(
+      () => {
+        refreshData();
+        setTemplateCurrentlyDeleting(null);
+        addSuccessToast(t('Deleted: %s', template_name));
+      },
+      createErrorHandler(errMsg =>
+        addDangerToast(
+          t('There was an issue deleting %s: %s', template_name, errMsg),
+        ),
+      ),
+    );
+  };
+
+  const handleBulkTemplateDelete = (templatesToDelete: TemplateObject[]) => {
+    SupersetClient.delete({
+      endpoint: `/api/v1/css_template/?q=${rison.encode(
+        templatesToDelete.map(({ id }) => id),
+      )}`,
+    }).then(
+      ({ json = {} }) => {
+        refreshData();
+        addSuccessToast(json.message);
+      },
+      createErrorHandler(errMsg =>
+        addDangerToast(
+          t('There was an issue deleting the selected templates: %s', errMsg),
+        ),
+      ),
+    );
+  };
+
   const initialSort = [{ id: 'template_name', desc: true }];
   const columns = useMemo(
     () => [
       {
         accessor: 'template_name',
         Header: t('Name'),
       },
+      {
+        Cell: ({
+          row: {
+            original: {
+              changed_on_delta_humanized: changedOn,
+              changed_by: changedBy,
+            },
+          },
+        }: any) => {
+          let name = 'null';
+
+          if (changedBy) {
+            name = `${changedBy.first_name} ${changedBy.last_name}`;
+          }
+
+          return (
+            <TooltipWrapper
+              label="allow-run-async-header"
+              tooltip={`${t('Last modified by')} ${name}`}

Review comment:
       Not all languages follow the same grammar structure as english. You can pass variables into the `t` function
   ```suggestion
                 tooltip={t('Last modified by %s', name)}
   ```




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `5.19%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   60.58%   -5.20%     
   ==========================================
     Files         839      394     -445     
     Lines       39828    24936   -14892     
     Branches     3652        0    -3652     
   ==========================================
   - Hits        26200    15107   -11093     
   + Misses      13528     9829    -3699     
   + Partials      100        0     -100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.58% <100.00%> (-0.32%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `97.56% <0.00%> (-2.44%)` | :arrow_down: |
   | ... and [450 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...5ec7c72](https://codecov.io/gh/apache/incubator-superset/pull/11271?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] nytai commented on a change in pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
nytai commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r504982328



##########
File path: superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
##########
@@ -74,4 +89,76 @@ describe('CssTemplatesList', () => {
   it('renders a ListView', () => {
     expect(wrapper.find(ListView)).toExist();
   });
+
+  it('fetches templates', () => {
+    const callsQ = fetchMock.calls(/css_template\/\?q/);
+    expect(callsQ).toHaveLength(1);
+    expect(callsQ[0][0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders Filters', () => {
+    expect(wrapper.find(Filters)).toExist();
+  });
+
+  it('searches', async () => {
+    const filtersWrapper = wrapper.find(Filters);
+    act(() => {
+      filtersWrapper
+        .find('[name="template_name"]')
+        .first()
+        .props()
+        .onSubmit('fooo');
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(fetchMock.lastCall()[0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(filters:!((col:template_name,opr:ct,value:fooo)),order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders a DeleteModal', () => {
+    expect(wrapper.find(DeleteModal)).toExist();
+  });
+
+  it('deletes', async () => {
+    act(() => {
+      wrapper.find('span[data-test="delete-action"]').first().props().onClick();
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(
+      wrapper.find(DeleteModal).first().props().description,
+    ).toMatchInlineSnapshot(
+      `"This action will permanently delete the template."`,
+    );
+
+    act(() => {
+      wrapper
+        .find('#delete')
+        .first()
+        .props()
+        .onChange({ target: { value: 'DELETE' } });
+    });
+    await waitForComponentToPaint(wrapper);
+    act(() => {
+      wrapper.find('button').last().props().onClick();

Review comment:
       Enzyme has deprecated `simulate` and support for it will likely drop in the future, see:
   
   https://github.com/enzymejs/enzyme/issues/2173#issuecomment-505551552




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486






----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `4.39%`.
   > The diff coverage is `80.39%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   61.04%   -4.40%     
   ==========================================
     Files         831      834       +3     
     Lines       39528    39596      +68     
     Branches     3598     3622      +24     
   ==========================================
   - Hits        25866    24171    -1695     
   - Misses      13553    15243    +1690     
   - Partials      109      182      +73     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.79% <80.00%> (+0.12%)` | :arrow_up: |
   | #python | `60.00% <100.00%> (-0.54%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [189 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...6e34eaf](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `4.35%`.
   > The diff coverage is `80.39%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   61.07%   -4.36%     
   ==========================================
     Files         831      834       +3     
     Lines       39528    39607      +79     
     Branches     3598     3622      +24     
   ==========================================
   - Hits        25866    24191    -1675     
   - Misses      13553    15234    +1681     
   - Partials      109      182      +73     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.79% <80.00%> (+0.12%)` | :arrow_up: |
   | #python | `60.05% <100.00%> (-0.48%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [187 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...6e34eaf](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `7.24%`.
   > The diff coverage is `2.56%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   58.53%   -7.25%     
   ==========================================
     Files         839      800      -39     
     Lines       39828    38550    -1278     
     Branches     3652     3450     -202     
   ==========================================
   - Hits        26200    22565    -3635     
   - Misses      13528    15815    +2287     
   - Partials      100      170      +70     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `55.83% <0.00%> (-0.25%)` | :arrow_down: |
   | #javascript | `?` | |
   | #python | `60.00% <50.00%> (-0.90%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `1.29% <0.00%> (-79.10%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `2.63% <ø> (-59.21%)` | :arrow_down: |
   | [superset/views/css\_templates.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY3NzX3RlbXBsYXRlcy5weQ==) | `89.65% <0.00%> (-0.35%)` | :arrow_down: |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/components/Menu/LanguagePicker.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9MYW5ndWFnZVBpY2tlci50c3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL2dldENsaWVudEVycm9yT2JqZWN0LnRz) | `0.00% <0.00%> (-89.19%)` | :arrow_down: |
   | ... and [290 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...b5ff769](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `4.07%`.
   > The diff coverage is `80.39%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   61.36%   -4.08%     
   ==========================================
     Files         831      834       +3     
     Lines       39528    39600      +72     
     Branches     3598     3617      +19     
   ==========================================
   - Hits        25866    24301    -1565     
   - Misses      13553    15118    +1565     
   - Partials      109      181      +72     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.74% <80.00%> (+0.07%)` | :arrow_up: |
   | #python | `60.54% <100.00%> (+<0.01%)` | :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/incubator-superset/pull/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [185 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...0d13810](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
rusackas commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r504985185



##########
File path: superset-frontend/spec/javascripts/views/CRUD/csstemplates/CssTemplatesList_spec.jsx
##########
@@ -74,4 +89,76 @@ describe('CssTemplatesList', () => {
   it('renders a ListView', () => {
     expect(wrapper.find(ListView)).toExist();
   });
+
+  it('fetches templates', () => {
+    const callsQ = fetchMock.calls(/css_template\/\?q/);
+    expect(callsQ).toHaveLength(1);
+    expect(callsQ[0][0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders Filters', () => {
+    expect(wrapper.find(Filters)).toExist();
+  });
+
+  it('searches', async () => {
+    const filtersWrapper = wrapper.find(Filters);
+    act(() => {
+      filtersWrapper
+        .find('[name="template_name"]')
+        .first()
+        .props()
+        .onSubmit('fooo');
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(fetchMock.lastCall()[0]).toMatchInlineSnapshot(
+      `"http://localhost/api/v1/css_template/?q=(filters:!((col:template_name,opr:ct,value:fooo)),order_column:template_name,order_direction:desc,page:0,page_size:25)"`,
+    );
+  });
+
+  it('renders a DeleteModal', () => {
+    expect(wrapper.find(DeleteModal)).toExist();
+  });
+
+  it('deletes', async () => {
+    act(() => {
+      wrapper.find('span[data-test="delete-action"]').first().props().onClick();
+    });
+    await waitForComponentToPaint(wrapper);
+
+    expect(
+      wrapper.find(DeleteModal).first().props().description,
+    ).toMatchInlineSnapshot(
+      `"This action will permanently delete the template."`,
+    );
+
+    act(() => {
+      wrapper
+        .find('#delete')
+        .first()
+        .props()
+        .onChange({ target: { value: 'DELETE' } });
+    });
+    await waitForComponentToPaint(wrapper);
+    act(() => {
+      wrapper.find('button').last().props().onClick();

Review comment:
       Well that's a good reason! Perhaps we ought to open a PR to make some changes then! _<checks code>_ 104 changes, to be exact.




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `7.08%`.
   > The diff coverage is `2.43%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   58.69%   -7.09%     
   ==========================================
     Files         839      801      -38     
     Lines       39828    38535    -1293     
     Branches     3652     3447     -205     
   ==========================================
   - Hits        26200    22618    -3582     
   - Misses      13528    15739    +2211     
   - Partials      100      178      +78     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `55.23% <0.00%> (-0.86%)` | :arrow_down: |
   | #javascript | `?` | |
   | #python | `60.58% <100.00%> (-0.32%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `1.28% <0.00%> (-79.12%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `2.63% <0.00%> (-59.21%)` | :arrow_down: |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...dashboard/components/resizable/ResizableHandle.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy93aXRoVmVyaWZpY2F0aW9uLmpzeA==) | `9.09% <0.00%> (-87.88%)` | :arrow_down: |
   | ... and [281 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...afcde0f](https://codecov.io/gh/apache/incubator-superset/pull/11271?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] nytai commented on a change in pull request #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
nytai commented on a change in pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#discussion_r508170531



##########
File path: superset-frontend/src/views/CRUD/csstemplates/CssTemplatesList.tsx
##########
@@ -71,13 +80,105 @@ function CssTemplatesList({
   const canEdit = hasPerm('can_edit');
   const canDelete = hasPerm('can_delete');
 
+  const menuData: SubMenuProps = {
+    name: t('CSS Templates'),
+  };
+
+  const subMenuButtons: Array<ButtonProps> = [];
+
+  if (canDelete) {
+    subMenuButtons.push({
+      name: t('Bulk Select'),
+      onClick: toggleBulkSelect,
+      buttonStyle: 'secondary',
+    });
+  }
+
+  /* subMenuButtons.push({

Review comment:
       Is there a reason to keep this? 




----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486






----------------------------------------------------------------
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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/634676d467a57701d80df09a97ac35906001b34f?el=desc) will **decrease** coverage by `4.38%`.
   > The diff coverage is `80.39%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.43%   61.05%   -4.39%     
   ==========================================
     Files         831      834       +3     
     Lines       39528    39589      +61     
     Branches     3598     3617      +19     
   ==========================================
   - Hits        25866    24170    -1696     
   - Misses      13553    15238    +1685     
   - Partials      109      181      +72     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.74% <80.00%> (+0.07%)` | :arrow_up: |
   | #python | `60.04% <100.00%> (-0.50%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `86.25% <79.59%> (-11.05%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [193 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [634676d...0d13810](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `4.31%`.
   > The diff coverage is `79.16%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   61.47%   -4.32%     
   ==========================================
     Files         839      839              
     Lines       39828    39868      +40     
     Branches     3652     3659       +7     
   ==========================================
   - Hits        26200    24508    -1692     
   - Misses      13528    15179    +1651     
   - Partials      100      181      +81     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `62.70% <78.72%> (+0.03%)` | :arrow_up: |
   | #python | `60.73% <100.00%> (-0.17%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...d/src/views/CRUD/csstemplates/CssTemplatesList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvY3NzdGVtcGxhdGVzL0Nzc1RlbXBsYXRlc0xpc3QudHN4) | `78.49% <78.26%> (-1.90%)` | :arrow_down: |
   | [.../src/views/CRUD/data/savedquery/SavedQueryList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9zYXZlZHF1ZXJ5L1NhdmVkUXVlcnlMaXN0LnRzeA==) | `61.83% <100.00%> (ø)` | |
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/11271/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/11271/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/11271/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/11271/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/11271/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/11271/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/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [175 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...afcde0f](https://codecov.io/gh/apache/incubator-superset/pull/11271?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 #11271: feat: CSS Templates List Actions

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on pull request #11271:
URL: https://github.com/apache/incubator-superset/pull/11271#issuecomment-708581486


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=h1) Report
   > Merging [#11271](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3a0fcdacd364a4154ff4d267d2b5812808deb7e6?el=desc) will **decrease** coverage by `5.92%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/11271/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/11271?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #11271      +/-   ##
   ==========================================
   - Coverage   65.78%   59.85%   -5.93%     
   ==========================================
     Files         839      394     -445     
     Lines       39828    24925   -14903     
     Branches     3652        0    -3652     
   ==========================================
   - Hits        26200    14920   -11280     
   + Misses      13528    10005    -3523     
   + Partials      100        0     -100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `59.85% <100.00%> (-1.05%)` | :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/11271?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/css\_templates/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY3NzX3RlbXBsYXRlcy9hcGkucHk=) | `95.45% <100.00%> (+0.10%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `31.91% <0.00%> (-59.58%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `59.64% <0.00%> (-22.81%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.59% <0.00%> (-12.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `69.76% <0.00%> (-11.67%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/databases/api.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2FwaS5weQ==) | `83.49% <0.00%> (-7.08%)` | :arrow_down: |
   | [superset/databases/dao.py](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2Rhby5weQ==) | `94.11% <0.00%> (-5.89%)` | :arrow_down: |
   | ... and [461 more](https://codecov.io/gh/apache/incubator-superset/pull/11271/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/11271?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/11271?src=pr&el=footer). Last update [3a0fcda...afcde0f](https://codecov.io/gh/apache/incubator-superset/pull/11271?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