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/09/14 19:05:22 UTC

[GitHub] [incubator-superset] riahk opened a new pull request #10880: feat: data menu routing

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


   ### SUMMARY
   - [x] Updates `SubMenu` component to use `Link` from `react-router`, preventing a full page reload when navigating b/w datasets/databases
   - [x] Adds `usesRouter` prop to signal usage of `Link`
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   ### TEST PLAN
   - [ ] Add `SubMenu` tests
   
   ### 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-commenter edited a comment on pull request #10880: feat: data menu routing

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=h1) Report
   > Merging [#10880](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7cd96edcdf66c4f5ee6c1d5eb75987e5ddda03cc?el=desc) will **decrease** coverage by `4.68%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10880/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10880      +/-   ##
   ==========================================
   - Coverage   65.46%   60.78%   -4.69%     
   ==========================================
     Files         809      382     -427     
     Lines       38154    24132   -14022     
     Branches     3605        0    -3605     
   ==========================================
   - Hits        24979    14668   -10311     
   + Misses      13066     9464    -3602     
   + Partials      109        0     -109     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.78% <ø> (-0.56%)` | :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/10880?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.85% <0.00%> (-10.77%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `97.36% <0.00%> (-2.64%)` | :arrow_down: |
   | [superset/db\_engine\_specs/postgres.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3Bvc3RncmVzLnB5) | `97.43% <0.00%> (-2.57%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.56% <0.00%> (-0.77%)` | :arrow_down: |
   | [superset/views/base\_api.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvYmFzZV9hcGkucHk=) | `97.67% <0.00%> (-0.59%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.26% <0.00%> (-0.42%)` | :arrow_down: |
   | ... and [440 more](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?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/10880?src=pr&el=footer). Last update [7cd96ed...3580a08](https://codecov.io/gh/apache/incubator-superset/pull/10880?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 #10880: feat: data menu routing

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=h1) Report
   > Merging [#10880](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7cd96edcdf66c4f5ee6c1d5eb75987e5ddda03cc?el=desc) will **decrease** coverage by `6.22%`.
   > The diff coverage is `40.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10880/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10880      +/-   ##
   ==========================================
   - Coverage   65.46%   59.24%   -6.23%     
   ==========================================
     Files         809      776      -33     
     Lines       38154    37046    -1108     
     Branches     3605     3311     -294     
   ==========================================
   - Hits        24979    21948    -3031     
   - Misses      13066    14912    +1846     
   - Partials      109      186      +77     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `55.34% <40.00%> (+0.44%)` | :arrow_up: |
   | #javascript | `?` | |
   | #python | `61.34% <ø> (+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/10880?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/views/App.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0FwcC50c3g=) | `100.00% <ø> (+67.64%)` | :arrow_up: |
   | [superset-frontend/src/views/CRUD/data/common.ts](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9jb21tb24udHM=) | `100.00% <ø> (ø)` | |
   | [...tend/src/views/CRUD/data/database/DatabaseList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZUxpc3QudHN4) | `3.07% <0.00%> (-78.98%)` | :arrow_down: |
   | [...ontend/src/views/CRUD/data/dataset/DatasetList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhc2V0L0RhdGFzZXRMaXN0LnRzeA==) | `1.90% <ø> (-70.46%)` | :arrow_down: |
   | [superset-frontend/src/components/Menu/SubMenu.tsx](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTWVudS9TdWJNZW51LnRzeA==) | `72.72% <44.44%> (-27.28%)` | :arrow_down: |
   | [...uperset-frontend/src/dashboard/util/dnd-reorder.js](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL2dldEVtcHR5TGF5b3V0Lmpz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../src/dashboard/util/getFilterScopeFromNodesTree.js](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlckluZGljYXRvckdyb3VwLmpzeA==) | `11.76% <0.00%> (-88.24%)` | :arrow_down: |
   | ... and [261 more](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?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/10880?src=pr&el=footer). Last update [7cd96ed...12fe6a7](https://codecov.io/gh/apache/incubator-superset/pull/10880?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 #10880: feat: data menu routing

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



##########
File path: superset-frontend/src/components/Menu/SubMenu.tsx
##########
@@ -66,6 +81,10 @@ export interface SubMenuProps {
   name: string;
   children?: MenuChild[];
   activeChild?: MenuChild['name'];
+  /* If usesRouter is true, a react-router <Link> component will be used instead of href.
+   *  ONLY set usesRouter to true if SubMenu is wrapped in a react-router <Router>;
+   *  otherwise, a 'You should not use <Link> outside a <Router>' error will be thrown */
+  usesRouter?: boolean;

Review comment:
       Did some digging, looks like `useHistory` is just another way to access the router's history object, so I've updated the `SubMenu` to check for that! This will allow implicit Router checking.




----------------------------------------------------------------
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 #10880: feat: data menu routing

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


   


----------------------------------------------------------------
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 #10880: feat: data menu routing

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=h1) Report
   > Merging [#10880](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7cd96edcdf66c4f5ee6c1d5eb75987e5ddda03cc?el=desc) will **decrease** coverage by `5.07%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10880/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10880      +/-   ##
   ==========================================
   - Coverage   65.46%   60.39%   -5.08%     
   ==========================================
     Files         809      382     -427     
     Lines       38154    24132   -14022     
     Branches     3605        0    -3605     
   ==========================================
   - Hits        24979    14574   -10405     
   + Misses      13066     9558    -3508     
   + Partials      109        0     -109     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.39% <ø> (-0.95%)` | :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/10880?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/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/10880/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/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `79.16% <0.00%> (-12.50%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.85% <0.00%> (-10.77%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2FwaS5weQ==) | `81.38% <0.00%> (-7.98%)` | :arrow_down: |
   | [superset/databases/dao.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2Rhby5weQ==) | `94.11% <0.00%> (-5.89%)` | :arrow_down: |
   | [superset/views/database/validators.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvdmFsaWRhdG9ycy5weQ==) | `78.94% <0.00%> (-5.27%)` | :arrow_down: |
   | ... and [450 more](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?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/10880?src=pr&el=footer). Last update [7cd96ed...3580a08](https://codecov.io/gh/apache/incubator-superset/pull/10880?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] kgabryje commented on a change in pull request #10880: feat: data menu routing

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



##########
File path: superset-frontend/src/components/Menu/SubMenu.tsx
##########
@@ -66,6 +81,10 @@ export interface SubMenuProps {
   name: string;
   children?: MenuChild[];
   activeChild?: MenuChild['name'];
+  /* If usesRouter is true, a react-router <Link> component will be used instead of href.
+   *  ONLY set usesRouter to true if SubMenu is wrapped in a react-router <Router>;
+   *  otherwise, a 'You should not use <Link> outside a <Router>' error will be thrown */
+  usesRouter?: boolean;

Review comment:
       Sorry, I assumed that we use `withRouter` for pages that use react-router - that would provide `history` object to props. However, do we need to explicitly say that `DatasetList` and `DatasourceList` use router? I think we only use them inside `<Router>` in `views/App` file, so maybe we could drop `usesRouter` prop for them? Sorry if I confuse something, I'm new to the project 🙂 




----------------------------------------------------------------
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 #10880: feat: data menu routing

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=h1) Report
   > Merging [#10880](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7cd96edcdf66c4f5ee6c1d5eb75987e5ddda03cc?el=desc) will **decrease** coverage by `4.69%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10880/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10880      +/-   ##
   ==========================================
   - Coverage   65.46%   60.77%   -4.70%     
   ==========================================
     Files         809      382     -427     
     Lines       38154    24143   -14011     
     Branches     3605        0    -3605     
   ==========================================
   - Hits        24979    14673   -10306     
   + Misses      13066     9470    -3596     
   + Partials      109        0     -109     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.77% <ø> (-0.56%)` | :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/10880?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.85% <0.00%> (-10.77%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `97.36% <0.00%> (-2.64%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.56% <0.00%> (-0.77%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.26% <0.00%> (-0.42%)` | :arrow_down: |
   | [superset/models/dashboard.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2Rhc2hib2FyZC5weQ==) | `88.03% <0.00%> (-0.28%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `89.61% <0.00%> (-0.14%)` | :arrow_down: |
   | ... and [434 more](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?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/10880?src=pr&el=footer). Last update [7cd96ed...3580a08](https://codecov.io/gh/apache/incubator-superset/pull/10880?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] benceorlai commented on pull request #10880: feat: data menu routing

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


   Roadmap: https://github.com/apache-superset/superset-roadmap/issues/33


----------------------------------------------------------------
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] kgabryje commented on a change in pull request #10880: feat: data menu routing

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



##########
File path: superset-frontend/src/components/Menu/SubMenu.tsx
##########
@@ -66,6 +81,10 @@ export interface SubMenuProps {
   name: string;
   children?: MenuChild[];
   activeChild?: MenuChild['name'];
+  /* If usesRouter is true, a react-router <Link> component will be used instead of href.
+   *  ONLY set usesRouter to true if SubMenu is wrapped in a react-router <Router>;
+   *  otherwise, a 'You should not use <Link> outside a <Router>' error will be thrown */
+  usesRouter?: boolean;

Review comment:
       What do you think about checking if `props.history` exists to determine if we have access to react-router?




----------------------------------------------------------------
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 #10880: feat: data menu routing

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



##########
File path: superset-frontend/src/components/Menu/SubMenu.tsx
##########
@@ -66,6 +81,10 @@ export interface SubMenuProps {
   name: string;
   children?: MenuChild[];
   activeChild?: MenuChild['name'];
+  /* If usesRouter is true, a react-router <Link> component will be used instead of href.
+   *  ONLY set usesRouter to true if SubMenu is wrapped in a react-router <Router>;
+   *  otherwise, a 'You should not use <Link> outside a <Router>' error will be thrown */
+  usesRouter?: boolean;

Review comment:
       This is my first time using `react-router`, are you talking about the `useHistory` hook?




----------------------------------------------------------------
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 #10880: feat: data menu routing

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


   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=h1) Report
   > Merging [#10880](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/7cd96edcdf66c4f5ee6c1d5eb75987e5ddda03cc?el=desc) will **decrease** coverage by `4.67%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/10880/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/incubator-superset/pull/10880?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #10880      +/-   ##
   ==========================================
   - Coverage   65.46%   60.79%   -4.68%     
   ==========================================
     Files         809      382     -427     
     Lines       38154    24132   -14022     
     Branches     3605        0    -3605     
   ==========================================
   - Hits        24979    14670   -10309     
   + Misses      13066     9462    -3604     
   + Partials      109        0     -109     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | #cypress | `?` | |
   | #javascript | `?` | |
   | #python | `60.79% <ø> (-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/10880?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `53.90% <0.00%> (-30.08%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `70.85% <0.00%> (-10.77%)` | :arrow_down: |
   | [superset/examples/world\_bank.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `97.36% <0.00%> (-2.64%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/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/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.56% <0.00%> (-0.77%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `87.26% <0.00%> (-0.42%)` | :arrow_down: |
   | [superset/models/dashboard.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2Rhc2hib2FyZC5weQ==) | `88.03% <0.00%> (-0.28%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `89.60% <0.00%> (-0.16%)` | :arrow_down: |
   | ... and [438 more](https://codecov.io/gh/apache/incubator-superset/pull/10880/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/10880?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/10880?src=pr&el=footer). Last update [7cd96ed...3580a08](https://codecov.io/gh/apache/incubator-superset/pull/10880?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