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/07/10 23:01:30 UTC

[GitHub] [incubator-superset] lilykuang opened a new pull request #10290: fix: fetch datasets list after dataset created successfully

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


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   - update `subMenu` to use hooks 
   - fetch dataset list data after dataset created successfully 
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   After:
   https://www.loom.com/share/22f99d27dcc5493a921496a8b3302048
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [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-commenter edited a comment on pull request #10290: fix: fetch datasets list after dataset created successfully

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=h1) Report
   > Merging [#10290](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3b4df51848f1ff3b4f22771eacdd49e77077125d&el=desc) will **decrease** coverage by `5.02%`.
   > The diff coverage is `72.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10290/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10290      +/-   ##
   ==========================================
   - Coverage   70.54%   65.52%   -5.03%     
   ==========================================
     Files         599      599              
     Lines       32075    32066       -9     
     Branches     3244     3243       -1     
   ==========================================
   - Hits        22628    21010    -1618     
   - Misses       9343    10875    +1532     
   - Partials      104      181      +77     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.57% <72.00%> (-0.02%)` | :arrow_down: |
   | #python | `69.67% <ø> (-0.02%)` | :arrow_down: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...set-frontend/src/views/datasetList/DatasetList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRMaXN0LnRzeA==) | `68.49% <0.00%> (-0.48%)` | :arrow_down: |
   | [...et-frontend/src/views/datasetList/DatasetModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRNb2RhbC50c3g=) | `58.82% <66.66%> (-1.79%)` | :arrow_down: |
   | [superset-frontend/src/components/Menu/SubMenu.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9TdWJNZW51LnRzeA==) | `87.50% <77.77%> (-0.38%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/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/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [157 more](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?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/10290?src=pr&el=footer). Last update [3b4df51...3227932](https://codecov.io/gh/apache/incubator-superset/pull/10290?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-commenter commented on pull request #10290: fix: fetch datasets list after dataset created successfully

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=h1) Report
   > Merging [#10290](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3b4df51848f1ff3b4f22771eacdd49e77077125d&el=desc) will **decrease** coverage by `5.02%`.
   > The diff coverage is `72.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10290/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10290      +/-   ##
   ==========================================
   - Coverage   70.54%   65.52%   -5.03%     
   ==========================================
     Files         599      599              
     Lines       32075    32066       -9     
     Branches     3244     3243       -1     
   ==========================================
   - Hits        22628    21010    -1618     
   - Misses       9343    10875    +1532     
   - Partials      104      181      +77     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.57% <72.00%> (-0.02%)` | :arrow_down: |
   | #python | `69.67% <ø> (-0.02%)` | :arrow_down: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...set-frontend/src/views/datasetList/DatasetList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRMaXN0LnRzeA==) | `68.49% <0.00%> (-0.48%)` | :arrow_down: |
   | [...et-frontend/src/views/datasetList/DatasetModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRNb2RhbC50c3g=) | `58.82% <66.66%> (-1.79%)` | :arrow_down: |
   | [superset-frontend/src/components/Menu/SubMenu.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9TdWJNZW51LnRzeA==) | `87.50% <77.77%> (-0.38%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/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/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [157 more](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?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/10290?src=pr&el=footer). Last update [3b4df51...3227932](https://codecov.io/gh/apache/incubator-superset/pull/10290?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 #10290: fix: fetch datasets list after dataset created successfully

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


   


----------------------------------------------------------------
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] etr2460 commented on a change in pull request #10290: fix: fetch datasets list after dataset created successfully

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



##########
File path: superset-frontend/src/components/Menu/SubMenu.tsx
##########
@@ -64,71 +64,72 @@ const StyledHeader = styled.header`
 `;
 
 interface SubMenuProps {
-  createButton?: { name: string; url: string | null };
   canCreate?: boolean;
-  name: string;
   childs?: Array<{ label: string; name: string; url: string }>;
+  createButton?: { name: string; url: string | null };
+  fetchData?: () => void;
+  name: string;
 }
 
-interface SubMenuState {
-  selectedMenu: string;
-  isModalOpen: boolean;
-}
-
-class SubMenu extends React.PureComponent<SubMenuProps, SubMenuState> {
-  state: SubMenuState = {
-    selectedMenu:
-      this.props.childs && this.props.childs[0]
-        ? this.props.childs[0].label
-        : '',
-    isModalOpen: false,
-  };
+const SubMenu = ({
+  canCreate,
+  childs,
+  createButton,
+  fetchData,
+  name,
+}: SubMenuProps) => {
+  const [isModalOpen, setIsModalOpen] = useState(false);
+  const [selectedMenu, setSelectedMenu] = useState(
+    (childs && childs[0] && childs[0].label) || '',

Review comment:
       is there a need to default to empty string here? if so, you can do `childs?.[0]?.label || ''` and if not, simply do `childs?.[0]?.label` and make this a `useState<string | undefined>` call




----------------------------------------------------------------
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-commenter edited a comment on pull request #10290: fix: fetch datasets list after dataset created successfully

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=h1) Report
   > Merging [#10290](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3b4df51848f1ff3b4f22771eacdd49e77077125d&el=desc) will **decrease** coverage by `4.99%`.
   > The diff coverage is `72.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10290/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10290      +/-   ##
   ==========================================
   - Coverage   70.54%   65.54%   -5.00%     
   ==========================================
     Files         599      599              
     Lines       32075    32075              
     Branches     3244     3243       -1     
   ==========================================
   - Hits        22628    21025    -1603     
   - Misses       9343    10869    +1526     
   - Partials      104      181      +77     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.57% <72.00%> (-0.02%)` | :arrow_down: |
   | #python | `69.72% <ø> (+0.03%)` | :arrow_up: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...set-frontend/src/views/datasetList/DatasetList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRMaXN0LnRzeA==) | `68.49% <0.00%> (-0.48%)` | :arrow_down: |
   | [...et-frontend/src/views/datasetList/DatasetModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRNb2RhbC50c3g=) | `58.82% <66.66%> (-1.79%)` | :arrow_down: |
   | [superset-frontend/src/components/Menu/SubMenu.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9TdWJNZW51LnRzeA==) | `87.50% <77.77%> (-0.38%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/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/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [150 more](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?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/10290?src=pr&el=footer). Last update [3b4df51...3227932](https://codecov.io/gh/apache/incubator-superset/pull/10290?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-commenter edited a comment on pull request #10290: fix: fetch datasets list after dataset created successfully

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=h1) Report
   > Merging [#10290](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/3b4df51848f1ff3b4f22771eacdd49e77077125d&el=desc) will **decrease** coverage by `5.03%`.
   > The diff coverage is `72.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10290/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10290      +/-   ##
   ==========================================
   - Coverage   70.54%   65.50%   -5.04%     
   ==========================================
     Files         599      599              
     Lines       32075    32075              
     Branches     3244     3243       -1     
   ==========================================
   - Hits        22628    21012    -1616     
   - Misses       9343    10882    +1539     
   - Partials      104      181      +77     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `59.57% <72.00%> (-0.02%)` | :arrow_down: |
   | #python | `69.65% <ø> (-0.04%)` | :arrow_down: |
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...set-frontend/src/views/datasetList/DatasetList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRMaXN0LnRzeA==) | `68.49% <0.00%> (-0.48%)` | :arrow_down: |
   | [...et-frontend/src/views/datasetList/DatasetModal.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2RhdGFzZXRMaXN0L0RhdGFzZXRNb2RhbC50c3g=) | `58.82% <66.66%> (-1.79%)` | :arrow_down: |
   | [superset-frontend/src/components/Menu/SubMenu.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9TdWJNZW51LnRzeA==) | `87.50% <77.77%> (-0.38%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/index.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9pbmRleC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/incubator-superset/pull/10290/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/10290/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/10290/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/10290/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3NldHVwL3NldHVwQ29sb3JzLmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [154 more](https://codecov.io/gh/apache/incubator-superset/pull/10290/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10290?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/10290?src=pr&el=footer). Last update [3b4df51...3227932](https://codecov.io/gh/apache/incubator-superset/pull/10290?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] lilykuang commented on a change in pull request #10290: fix: fetch datasets list after dataset created successfully

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



##########
File path: superset-frontend/src/components/Menu/SubMenu.tsx
##########
@@ -64,71 +64,72 @@ const StyledHeader = styled.header`
 `;
 
 interface SubMenuProps {
-  createButton?: { name: string; url: string | null };
   canCreate?: boolean;
-  name: string;
   childs?: Array<{ label: string; name: string; url: string }>;
+  createButton?: { name: string; url: string | null };
+  fetchData?: () => void;
+  name: string;
 }
 
-interface SubMenuState {
-  selectedMenu: string;
-  isModalOpen: boolean;
-}
-
-class SubMenu extends React.PureComponent<SubMenuProps, SubMenuState> {
-  state: SubMenuState = {
-    selectedMenu:
-      this.props.childs && this.props.childs[0]
-        ? this.props.childs[0].label
-        : '',
-    isModalOpen: false,
-  };
+const SubMenu = ({
+  canCreate,
+  childs,
+  createButton,
+  fetchData,
+  name,
+}: SubMenuProps) => {
+  const [isModalOpen, setIsModalOpen] = useState(false);
+  const [selectedMenu, setSelectedMenu] = useState(
+    (childs && childs[0] && childs[0].label) || '',

Review comment:
       good suggestion! it doesn't need to default to empty string




----------------------------------------------------------------
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