You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/12 04:20:00 UTC

[GitHub] [superset] nytai opened a new pull request #13087: perf: add lazy loading along react-router routes and router links in menu

nytai opened a new pull request #13087:
URL: https://github.com/apache/superset/pull/13087


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Part of the move towards consolidating superset front-end into a single page app, this page includes some performance improvements between page loads. 
   
   - code splitting and lazy loading along react-router routes.
   - provide list of react-router registered routes to menu component in order to use react router <Link/> component
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   N/A
   
   ### TEST PLAN
   <!--- What steps should be taken to verify the changes -->
   - All pages in the app load without error
   - Menu navigating between front-end routes (eg, Charts, Cashboards, Databases, Datasets) does not result in a full-page load. Page loads should be much faster.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: https://github.com/apache/superset/issues/12896
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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

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



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


[GitHub] [superset] nytai merged pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   


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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (2e30ea6) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `14.04%`.
   > The diff coverage is `25.83%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   67.10%   +14.04%     
   ===========================================
     Files         489      491        +2     
     Lines       17314    28934    +11620     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19417    +10230     
   - Misses       8127     9517     +1390     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `67.10% <25.83%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.63% <66.66%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `89.74% <93.75%> (ø)` | |
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <100.00%> (ø)` | |
   | ... and [952 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [86807e4...d677f3c](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] suddjian commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
suddjian commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575607941



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -36,16 +37,28 @@ export interface MenuObjectProps {
   url?: string;
   childs?: (MenuObjectChildProps | string)[];
   isHeader?: boolean;
+  frontEndRoutes?: {
+    [route: string]: boolean;
+  };
 }

Review comment:
       I think one place or another we'll need to have a list of frontend routes, at least until all routes become assimilated.

##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -36,16 +37,28 @@ export interface MenuObjectProps {
   url?: string;
   childs?: (MenuObjectChildProps | string)[];
   isHeader?: boolean;
+  frontEndRoutes?: {
+    [route: string]: boolean;
+  };
 }

Review comment:
       I think one place or another we'll need to have a list of frontend routes, until all routes become assimilated into the react frontend.




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

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



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


[GitHub] [superset] suddjian commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
suddjian commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575519155



##########
File path: superset-frontend/src/views/App.tsx
##########
@@ -77,79 +155,81 @@ const App = () => (
               ReactRouterRoute={Route}
               stringifyOptions={{ encode: false }}
             >
-              <Menu data={menu} />
-              <Switch>
-                <Route path="/superset/welcome/">
-                  <ErrorBoundary>
-                    <Welcome user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/dashboard/list/">
-                  <ErrorBoundary>
-                    <DashboardList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/chart/list/">
-                  <ErrorBoundary>
-                    <ChartList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/tablemodelview/list/">
-                  <ErrorBoundary>
-                    <DatasetList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/databaseview/list/">
-                  <ErrorBoundary>
-                    <DatabaseList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/savedqueryview/list/">
-                  <ErrorBoundary>
-                    <SavedQueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/csstemplatemodelview/list/">
-                  <ErrorBoundary>
-                    <CssTemplatesList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationlayermodelview/list/">
-                  <ErrorBoundary>
-                    <AnnotationLayersList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationmodelview/:annotationLayerId/annotation/">
-                  <ErrorBoundary>
-                    <AnnotationList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/superset/sqllab/history/">
-                  <ErrorBoundary>
-                    <QueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-              </Switch>
+              <Menu data={menu} frontEndRoutes={frontEndRoutes} />
+              <Suspense fallback={<Loading />}>
+                <Switch>
+                  <Route path={routes.welcome}>

Review comment:
       It might be nice to reference these view components from the `frontEndRoutes` list, and iterate over them to populate the 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] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (f8f5267) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.65%`.
   > The diff coverage is `25.83%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.71%   +13.65%     
   ===========================================
     Files         489      491        +2     
     Lines       17314    28932    +11618     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19303    +10116     
   - Misses       8127     9629     +1502     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.71% <25.83%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.63% <66.66%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `89.74% <93.75%> (ø)` | |
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <100.00%> (ø)` | |
   | ... and [952 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [86807e4...f8f5267](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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






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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575766671



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -36,16 +37,28 @@ export interface MenuObjectProps {
   url?: string;
   childs?: (MenuObjectChildProps | string)[];
   isHeader?: boolean;
+  frontEndRoutes?: {
+    [route: string]: boolean;
+  };
 }
 
 export default function MenuObject({
   label,
   childs,
   url,
   index,
+  frontEndRoutes,
 }: MenuObjectProps) {
   const [dropdownOpen, setDropdownOpen] = useState(false);
-
+  if (url && frontEndRoutes && frontEndRoutes[url]) {

Review comment:
       and also here:
   ```
    if (frontEndRoutes?.[url]) {
   ```




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

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



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


[GitHub] [superset] nytai commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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



##########
File path: superset-frontend/src/views/App.tsx
##########
@@ -77,79 +155,81 @@ const App = () => (
               ReactRouterRoute={Route}
               stringifyOptions={{ encode: false }}
             >
-              <Menu data={menu} />
-              <Switch>
-                <Route path="/superset/welcome/">
-                  <ErrorBoundary>
-                    <Welcome user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/dashboard/list/">
-                  <ErrorBoundary>
-                    <DashboardList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/chart/list/">
-                  <ErrorBoundary>
-                    <ChartList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/tablemodelview/list/">
-                  <ErrorBoundary>
-                    <DatasetList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/databaseview/list/">
-                  <ErrorBoundary>
-                    <DatabaseList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/savedqueryview/list/">
-                  <ErrorBoundary>
-                    <SavedQueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/csstemplatemodelview/list/">
-                  <ErrorBoundary>
-                    <CssTemplatesList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationlayermodelview/list/">
-                  <ErrorBoundary>
-                    <AnnotationLayersList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationmodelview/:annotationLayerId/annotation/">
-                  <ErrorBoundary>
-                    <AnnotationList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/superset/sqllab/history/">
-                  <ErrorBoundary>
-                    <QueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-              </Switch>
+              <Menu data={menu} frontEndRoutes={frontEndRoutes} />
+              <Suspense fallback={<Loading />}>
+                <Switch>
+                  <Route path={routes.welcome}>

Review comment:
       We could do that, an array might make more sense then, something like `{route: string, component: React.ReactNode}[]`




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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575766380



##########
File path: superset-frontend/src/components/Menu/Menu.tsx
##########
@@ -192,7 +202,11 @@ export function Menu({
                     if (typeof child !== 'string') {
                       return (
                         <DropdownMenu.Item key={`${child.label}`}>
-                          <a href={child.url}>{child.label}</a>
+                          {frontEndRoutes && frontEndRoutes[child.url || ''] ? (

Review comment:
       just proposals:
   1. Change loop to:
   ```
   section.childs?.map((child = '') => {
   ```
   and then just:
   ```
   frontEndRoutes?.[child.url]
   ```




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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575767590



##########
File path: superset-frontend/src/views/App.tsx
##########
@@ -77,79 +155,81 @@ const App = () => (
               ReactRouterRoute={Route}
               stringifyOptions={{ encode: false }}
             >
-              <Menu data={menu} />
-              <Switch>
-                <Route path="/superset/welcome/">
-                  <ErrorBoundary>
-                    <Welcome user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/dashboard/list/">
-                  <ErrorBoundary>
-                    <DashboardList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/chart/list/">
-                  <ErrorBoundary>
-                    <ChartList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/tablemodelview/list/">
-                  <ErrorBoundary>
-                    <DatasetList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/databaseview/list/">
-                  <ErrorBoundary>
-                    <DatabaseList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/savedqueryview/list/">
-                  <ErrorBoundary>
-                    <SavedQueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/csstemplatemodelview/list/">
-                  <ErrorBoundary>
-                    <CssTemplatesList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationlayermodelview/list/">
-                  <ErrorBoundary>
-                    <AnnotationLayersList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationmodelview/:annotationLayerId/annotation/">
-                  <ErrorBoundary>
-                    <AnnotationList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/superset/sqllab/history/">
-                  <ErrorBoundary>
-                    <QueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-              </Switch>
+              <Menu data={menu} frontEndRoutes={frontEndRoutes} />
+              <Suspense fallback={<Loading />}>
+                <Switch>
+                  <Route path={routes.welcome}>
+                    <ErrorBoundary>
+                      <Welcome user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.dashboards}>
+                    <ErrorBoundary>
+                      <DashboardList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.charts}>
+                    <ErrorBoundary>
+                      <ChartList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.datasets}>
+                    <ErrorBoundary>
+                      <DatasetList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.databases}>
+                    <ErrorBoundary>
+                      <DatabaseList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.savedQueries}>
+                    <ErrorBoundary>
+                      <SavedQueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.cssTemplates}>
+                    <ErrorBoundary>
+                      <CssTemplatesList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotationLayers}>
+                    <ErrorBoundary>
+                      <AnnotationLayersList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotations}>
+                    <ErrorBoundary>
+                      <AnnotationList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.queries}>
+                    <ErrorBoundary>
+                      <QueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alerts}>
+                    <ErrorBoundary>
+                      <AlertList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reports}>
+                    <ErrorBoundary>
+                      <AlertList user={user} isReportEnabled />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alertLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reportLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} isReportEnabled />
+                    </ErrorBoundary>

Review comment:
       just proposal to reduce code may be create map like:
   ```
   const pathToRoute = {
      [routes.alertLogs]:  { Component : ExecutionLog },
      [routes.reportLogs]: { Component : ExecutionLog, isReportEnabled: true },
      ...etc others...
   }
   ```
   and then just:
   
   ```
   <Suspense fallback={<Loading />}>
       <Route path="/superset/welcome/">	                
            <Switch>
            {Object.values(routes).map(route => {
                   const { Component, ...otherProps } = pathToRoute[route]
                   return <Route path={route}>                  
                              <ErrorBoundary>             
                                     <Component user={user} {...otherProps}/>
                               </ErrorBoundary>	 
                   </Route>
            }) }
           ...
   ```




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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (533db7a) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.71%`.
   > The diff coverage is `41.75%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.77%   +13.71%     
   ===========================================
     Files         489      492        +3     
     Lines       17314    29032    +11718     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19386    +10199     
   - Misses       8127     9646     +1519     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.77% <41.75%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `58.82% <20.00%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.99% <82.05%> (ø)` | |
   | [superset/db\_engine\_specs/trino.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3RyaW5vLnB5) | `90.47% <90.47%> (ø)` | |
   | ... and [927 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [2e6ea76...2076fa4](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (2076fa4) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `10.70%`.
   > The diff coverage is `53.08%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   63.76%   +10.70%     
   ===========================================
     Files         489      961      +472     
     Lines       17314    44801    +27487     
     Branches     4482     4063      -419     
   ===========================================
   + Hits         9187    28569    +19382     
   - Misses       8127    16232     +8105     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `58.29% <69.15%> (+5.23%)` | :arrow_up: |
   | python | `66.74% <41.75%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...end/src/SqlLab/components/RunQueryActionButton.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1J1blF1ZXJ5QWN0aW9uQnV0dG9uLnRzeA==) | `52.77% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `100.00% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0UmVuZGVyZXIuanN4) | `75.67% <0.00%> (-1.04%)` | :arrow_down: |
   | [...perset-frontend/src/common/components/Dropdown.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9jb21wb25lbnRzL0Ryb3Bkb3duLnRzeA==) | `50.00% <ø> (ø)` | |
   | [...rontend/src/components/ListView/CardSortSelect.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvQ2FyZFNvcnRTZWxlY3QudHN4) | `78.94% <ø> (ø)` | |
   | [...ontend/src/components/ListViewCard/ImageLoader.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0ltYWdlTG9hZGVyLnRzeA==) | `75.00% <0.00%> (ø)` | |
   | [...set-frontend/src/components/URLShortLinkButton.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rQnV0dG9uLmpzeA==) | `100.00% <ø> (ø)` | |
   | [...rset-frontend/src/components/URLShortLinkModal.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rTW9kYWwudHN4) | `77.77% <ø> (ø)` | |
   | [...src/dashboard/components/FiltersBadge/selectors.ts](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9zZWxlY3RvcnMudHM=) | `90.00% <ø> (ø)` | |
   | [...src/dashboard/components/HeaderActionsDropdown.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlckFjdGlvbnNEcm9wZG93bi5qc3g=) | `68.49% <ø> (+0.92%)` | :arrow_up: |
   | ... and [609 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [2e6ea76...2076fa4](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (2076fa4) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `10.72%`.
   > The diff coverage is `53.08%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   63.78%   +10.72%     
   ===========================================
     Files         489      961      +472     
     Lines       17314    44829    +27515     
     Branches     4482     4063      -419     
   ===========================================
   + Hits         9187    28596    +19409     
   - Misses       8127    16233     +8106     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `58.29% <69.15%> (+5.23%)` | :arrow_up: |
   | python | `66.77% <41.75%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [...end/src/SqlLab/components/RunQueryActionButton.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1J1blF1ZXJ5QWN0aW9uQnV0dG9uLnRzeA==) | `52.77% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartContainer.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0Q29udGFpbmVyLmpzeA==) | `100.00% <ø> (ø)` | |
   | [superset-frontend/src/chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0UmVuZGVyZXIuanN4) | `75.67% <0.00%> (-1.04%)` | :arrow_down: |
   | [...perset-frontend/src/common/components/Dropdown.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9jb21wb25lbnRzL0Ryb3Bkb3duLnRzeA==) | `50.00% <ø> (ø)` | |
   | [...rontend/src/components/ListView/CardSortSelect.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvQ2FyZFNvcnRTZWxlY3QudHN4) | `78.94% <ø> (ø)` | |
   | [...ontend/src/components/ListViewCard/ImageLoader.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXdDYXJkL0ltYWdlTG9hZGVyLnRzeA==) | `75.00% <0.00%> (ø)` | |
   | [...set-frontend/src/components/URLShortLinkButton.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rQnV0dG9uLmpzeA==) | `100.00% <ø> (ø)` | |
   | [...rset-frontend/src/components/URLShortLinkModal.tsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVVJMU2hvcnRMaW5rTW9kYWwudHN4) | `77.77% <ø> (ø)` | |
   | [...src/dashboard/components/FiltersBadge/selectors.ts](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9zZWxlY3RvcnMudHM=) | `90.00% <ø> (ø)` | |
   | [...src/dashboard/components/HeaderActionsDropdown.jsx](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlckFjdGlvbnNEcm9wZG93bi5qc3g=) | `68.49% <ø> (+0.92%)` | :arrow_up: |
   | ... and [609 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [2e6ea76...2076fa4](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] michael-s-molina commented on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on pull request #13087:
URL: https://github.com/apache/superset/pull/13087#issuecomment-780497250


   @nytai When I click on SQL Lab -> SQL Editor (http://localhost:9000/superset/sqllab/) I get a 404. Is this related to this PR?


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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575767590



##########
File path: superset-frontend/src/views/App.tsx
##########
@@ -77,79 +155,81 @@ const App = () => (
               ReactRouterRoute={Route}
               stringifyOptions={{ encode: false }}
             >
-              <Menu data={menu} />
-              <Switch>
-                <Route path="/superset/welcome/">
-                  <ErrorBoundary>
-                    <Welcome user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/dashboard/list/">
-                  <ErrorBoundary>
-                    <DashboardList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/chart/list/">
-                  <ErrorBoundary>
-                    <ChartList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/tablemodelview/list/">
-                  <ErrorBoundary>
-                    <DatasetList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/databaseview/list/">
-                  <ErrorBoundary>
-                    <DatabaseList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/savedqueryview/list/">
-                  <ErrorBoundary>
-                    <SavedQueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/csstemplatemodelview/list/">
-                  <ErrorBoundary>
-                    <CssTemplatesList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationlayermodelview/list/">
-                  <ErrorBoundary>
-                    <AnnotationLayersList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationmodelview/:annotationLayerId/annotation/">
-                  <ErrorBoundary>
-                    <AnnotationList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/superset/sqllab/history/">
-                  <ErrorBoundary>
-                    <QueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-              </Switch>
+              <Menu data={menu} frontEndRoutes={frontEndRoutes} />
+              <Suspense fallback={<Loading />}>
+                <Switch>
+                  <Route path={routes.welcome}>
+                    <ErrorBoundary>
+                      <Welcome user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.dashboards}>
+                    <ErrorBoundary>
+                      <DashboardList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.charts}>
+                    <ErrorBoundary>
+                      <ChartList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.datasets}>
+                    <ErrorBoundary>
+                      <DatasetList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.databases}>
+                    <ErrorBoundary>
+                      <DatabaseList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.savedQueries}>
+                    <ErrorBoundary>
+                      <SavedQueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.cssTemplates}>
+                    <ErrorBoundary>
+                      <CssTemplatesList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotationLayers}>
+                    <ErrorBoundary>
+                      <AnnotationLayersList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotations}>
+                    <ErrorBoundary>
+                      <AnnotationList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.queries}>
+                    <ErrorBoundary>
+                      <QueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alerts}>
+                    <ErrorBoundary>
+                      <AlertList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reports}>
+                    <ErrorBoundary>
+                      <AlertList user={user} isReportEnabled />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alertLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reportLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} isReportEnabled />
+                    </ErrorBoundary>

Review comment:
       just proposal to reduce code may be create map like:
   ```
   const pathToRoute = {
      [routes.alertLogs]:  { Component : ExecutionLog },
      [routes. reportLogs]: { Component : ExecutionLog, isReportEnabled: true },
      ...etc others...
   }
   ```
   and then just:
   
   ```
   <Suspense fallback={<Loading />}>
       <Route path="/superset/welcome/">	                
            <Switch>
            {Object.values(routes).map(route => {
                   const { Component, ...otherProps } = pathToRoute[route]
                   return <Route path={routes.alertLogs}>
                       <ExecutionLog user={user} />	                    
                              <ErrorBoundary>             
                                     <Component user={user} {...otherProps}/>
                               </ErrorBoundary>	 
                   </Route>
            }) }
           ...
   ```




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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575766380



##########
File path: superset-frontend/src/components/Menu/Menu.tsx
##########
@@ -192,7 +202,11 @@ export function Menu({
                     if (typeof child !== 'string') {
                       return (
                         <DropdownMenu.Item key={`${child.label}`}>
-                          <a href={child.url}>{child.label}</a>
+                          {frontEndRoutes && frontEndRoutes[child.url || ''] ? (

Review comment:
       just proposal:
   ```
   const { url = '' } = child
   frontEndRoutes?.[child.url]
   ```




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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (922a877) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.71%`.
   > The diff coverage is `48.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.77%   +13.71%     
   ===========================================
     Files         489      492        +3     
     Lines       17314    29034    +11720     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19388    +10201     
   - Misses       8127     9646     +1519     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.77% <48.76%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/constants.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uc3RhbnRzLnB5) | `100.00% <ø> (ø)` | |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `58.82% <20.00%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.99% <82.05%> (ø)` | |
   | ... and [930 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [c9f76d5...922a877](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] ktmud commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575451536



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -36,16 +37,28 @@ export interface MenuObjectProps {
   url?: string;
   childs?: (MenuObjectChildProps | string)[];
   isHeader?: boolean;
+  frontEndRoutes?: {
+    [route: string]: boolean;
+  };
 }

Review comment:
       Bycatch: maybe let `MenuObject` extends from `MenuObjectChild`
   
   ````ts
   export interface MenuObjectProps extends MenuObjectChildProps {
     isHeader?: boolean;
     childs?: (MenuObjectChildProps | string)[];
   }
   ````
   
   I'm also wondering whether it makes more sense to set `isFrontendRoute` to the menu object, instead of passing the full list of frontend routes around:
   
   ```ts
   export interface MenuObjectChildProps {
     label: string;
     name?: string;
     icon: string;
     index: number;
     url?: string;
     isFrontendRoute?: boolean;
   }
   ```




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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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






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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (d677f3c) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.63%`.
   > The diff coverage is `25.83%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.69%   +13.63%     
   ===========================================
     Files         489      491        +2     
     Lines       17314    28932    +11618     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19296    +10109     
   - Misses       8127     9636     +1509     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.69% <25.83%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.63% <66.66%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `89.74% <93.75%> (ø)` | |
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <100.00%> (ø)` | |
   | ... and [952 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [86807e4...d677f3c](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575767590



##########
File path: superset-frontend/src/views/App.tsx
##########
@@ -77,79 +155,81 @@ const App = () => (
               ReactRouterRoute={Route}
               stringifyOptions={{ encode: false }}
             >
-              <Menu data={menu} />
-              <Switch>
-                <Route path="/superset/welcome/">
-                  <ErrorBoundary>
-                    <Welcome user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/dashboard/list/">
-                  <ErrorBoundary>
-                    <DashboardList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/chart/list/">
-                  <ErrorBoundary>
-                    <ChartList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/tablemodelview/list/">
-                  <ErrorBoundary>
-                    <DatasetList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/databaseview/list/">
-                  <ErrorBoundary>
-                    <DatabaseList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/savedqueryview/list/">
-                  <ErrorBoundary>
-                    <SavedQueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/csstemplatemodelview/list/">
-                  <ErrorBoundary>
-                    <CssTemplatesList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationlayermodelview/list/">
-                  <ErrorBoundary>
-                    <AnnotationLayersList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationmodelview/:annotationLayerId/annotation/">
-                  <ErrorBoundary>
-                    <AnnotationList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/superset/sqllab/history/">
-                  <ErrorBoundary>
-                    <QueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-              </Switch>
+              <Menu data={menu} frontEndRoutes={frontEndRoutes} />
+              <Suspense fallback={<Loading />}>
+                <Switch>
+                  <Route path={routes.welcome}>
+                    <ErrorBoundary>
+                      <Welcome user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.dashboards}>
+                    <ErrorBoundary>
+                      <DashboardList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.charts}>
+                    <ErrorBoundary>
+                      <ChartList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.datasets}>
+                    <ErrorBoundary>
+                      <DatasetList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.databases}>
+                    <ErrorBoundary>
+                      <DatabaseList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.savedQueries}>
+                    <ErrorBoundary>
+                      <SavedQueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.cssTemplates}>
+                    <ErrorBoundary>
+                      <CssTemplatesList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotationLayers}>
+                    <ErrorBoundary>
+                      <AnnotationLayersList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotations}>
+                    <ErrorBoundary>
+                      <AnnotationList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.queries}>
+                    <ErrorBoundary>
+                      <QueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alerts}>
+                    <ErrorBoundary>
+                      <AlertList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reports}>
+                    <ErrorBoundary>
+                      <AlertList user={user} isReportEnabled />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alertLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reportLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} isReportEnabled />
+                    </ErrorBoundary>

Review comment:
       just proposal to reduce code may be create map like:
   ```
   const pathToRoute = {
      [routes.alertLogs]:  { Component : ExecutionLog },
      [routes.reportLogs]: { Component : ExecutionLog, isReportEnabled: true },
      ...etc others...
   }
   ```
   and then just:
   
   ```
   <Suspense fallback={<Loading />}>
       <Route path="/superset/welcome/">	                
            <Switch>
            {Object.values(routes).map(route => {
                   const { Component, ...otherProps } = pathToRoute[route]
                   return <Route path={routes.alertLogs}>                  
                              <ErrorBoundary>             
                                     <Component user={user} {...otherProps}/>
                               </ErrorBoundary>	 
                   </Route>
            }) }
           ...
   ```




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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (d677f3c) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `14.05%`.
   > The diff coverage is `25.83%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   67.11%   +14.05%     
   ===========================================
     Files         489      491        +2     
     Lines       17314    28934    +11620     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19419    +10232     
   - Misses       8127     9515     +1388     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `67.11% <25.83%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.63% <66.66%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `89.74% <93.75%> (ø)` | |
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <100.00%> (ø)` | |
   | ... and [952 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [86807e4...d677f3c](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (922a877) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.71%`.
   > The diff coverage is `48.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.77%   +13.71%     
   ===========================================
     Files         489      492        +3     
     Lines       17314    29032    +11718     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19386    +10199     
   - Misses       8127     9646     +1519     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.77% <48.76%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/constants.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29uc3RhbnRzLnB5) | `100.00% <ø> (ø)` | |
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `58.82% <20.00%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.99% <82.05%> (ø)` | |
   | ... and [930 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [c9f76d5...922a877](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] codecov-io commented on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (2e30ea6) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.63%`.
   > The diff coverage is `25.83%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.69%   +13.63%     
   ===========================================
     Files         489      491        +2     
     Lines       17314    28934    +11620     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19298    +10111     
   - Misses       8127     9636     +1509     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.69% <25.83%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.63% <66.66%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `89.74% <93.75%> (ø)` | |
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <100.00%> (ø)` | |
   | ... and [952 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [86807e4...d677f3c](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575766751



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -71,7 +84,11 @@ export default function MenuObject({
           if (typeof child !== 'string') {
             return (
               <Menu.Item key={`${child.label}`}>
-                <a href={child.url}>&nbsp; {child.label}</a>
+                {frontEndRoutes && frontEndRoutes[child.url || ''] ? (

Review comment:
       and here:
   ```
   const { url = '' } = child
   frontEndRoutes?.[child.url]
   ```




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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (f95eb68) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `14.13%`.
   > The diff coverage is `41.75%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   67.19%   +14.13%     
   ===========================================
     Files         489      492        +3     
     Lines       17314    29034    +11720     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19509    +10322     
   - Misses       8127     9525     +1398     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `67.19% <41.75%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `58.82% <20.00%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.99% <82.05%> (ø)` | |
   | [superset/db\_engine\_specs/trino.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3RyaW5vLnB5) | `90.47% <90.47%> (ø)` | |
   | ... and [927 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [2e6ea76...2076fa4](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575766380



##########
File path: superset-frontend/src/components/Menu/Menu.tsx
##########
@@ -192,7 +202,11 @@ export function Menu({
                     if (typeof child !== 'string') {
                       return (
                         <DropdownMenu.Item key={`${child.label}`}>
-                          <a href={child.url}>{child.label}</a>
+                          {frontEndRoutes && frontEndRoutes[child.url || ''] ? (

Review comment:
       just proposals:
   1. Change loop to:
   ```
   section.childs?.map((child = '') => {
   ```
   2. and then just:
   ```
   frontEndRoutes?.[child.url]
   ```




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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (d677f3c) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.63%`.
   > The diff coverage is `25.83%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.69%   +13.63%     
   ===========================================
     Files         489      491        +2     
     Lines       17314    28934    +11620     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19298    +10111     
   - Misses       8127     9636     +1509     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.69% <25.83%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.63% <66.66%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/db\_engine\_specs/elasticsearch.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2VsYXN0aWNzZWFyY2gucHk=) | `89.74% <93.75%> (ø)` | |
   | [superset/app.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXBwLnB5) | `81.36% <100.00%> (ø)` | |
   | ... and [952 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [86807e4...d677f3c](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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

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



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


[GitHub] [superset] nytai commented on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   @michael-s-molina Thanks for reporting, I have a PR open with a fix


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

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



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


[GitHub] [superset] nytai commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -36,16 +37,28 @@ export interface MenuObjectProps {
   url?: string;
   childs?: (MenuObjectChildProps | string)[];
   isHeader?: boolean;
+  frontEndRoutes?: {
+    [route: string]: boolean;
+  };
 }

Review comment:
       We could have a `routes.tsx` module where we keep the list of route & component pairs, along with other util functions like `isFrontendRoute`. That should help abstract away some of the stuff that's currently in the `src/views/App.tsx` module such as ErrorBoundary wrapping 




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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575766840



##########
File path: superset-frontend/src/components/Menu/MenuObject.tsx
##########
@@ -71,7 +84,11 @@ export default function MenuObject({
           if (typeof child !== 'string') {
             return (
               <Menu.Item key={`${child.label}`}>
-                <a href={child.url}>&nbsp; {child.label}</a>
+                {frontEndRoutes && frontEndRoutes[child.url || ''] ? (
+                  <Link to={child.url || ''}>&nbsp; {child.label}</Link>

Review comment:
       I think no need space if use `&nbsp;`
   like:
   ```
   &nbsp;{child.label}
   ```




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

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



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


[GitHub] [superset] simcha90 commented on a change in pull request #13087: perf: add lazy loading along react-router routes and router links in menu

Posted by GitBox <gi...@apache.org>.
simcha90 commented on a change in pull request #13087:
URL: https://github.com/apache/superset/pull/13087#discussion_r575767590



##########
File path: superset-frontend/src/views/App.tsx
##########
@@ -77,79 +155,81 @@ const App = () => (
               ReactRouterRoute={Route}
               stringifyOptions={{ encode: false }}
             >
-              <Menu data={menu} />
-              <Switch>
-                <Route path="/superset/welcome/">
-                  <ErrorBoundary>
-                    <Welcome user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/dashboard/list/">
-                  <ErrorBoundary>
-                    <DashboardList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/chart/list/">
-                  <ErrorBoundary>
-                    <ChartList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/tablemodelview/list/">
-                  <ErrorBoundary>
-                    <DatasetList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/databaseview/list/">
-                  <ErrorBoundary>
-                    <DatabaseList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/savedqueryview/list/">
-                  <ErrorBoundary>
-                    <SavedQueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/csstemplatemodelview/list/">
-                  <ErrorBoundary>
-                    <CssTemplatesList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationlayermodelview/list/">
-                  <ErrorBoundary>
-                    <AnnotationLayersList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/annotationmodelview/:annotationLayerId/annotation/">
-                  <ErrorBoundary>
-                    <AnnotationList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/superset/sqllab/history/">
-                  <ErrorBoundary>
-                    <QueryList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/list/">
-                  <ErrorBoundary>
-                    <AlertList user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/alert/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} />
-                  </ErrorBoundary>
-                </Route>
-                <Route path="/report/:alertId/log">
-                  <ErrorBoundary>
-                    <ExecutionLog user={user} isReportEnabled />
-                  </ErrorBoundary>
-                </Route>
-              </Switch>
+              <Menu data={menu} frontEndRoutes={frontEndRoutes} />
+              <Suspense fallback={<Loading />}>
+                <Switch>
+                  <Route path={routes.welcome}>
+                    <ErrorBoundary>
+                      <Welcome user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.dashboards}>
+                    <ErrorBoundary>
+                      <DashboardList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.charts}>
+                    <ErrorBoundary>
+                      <ChartList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.datasets}>
+                    <ErrorBoundary>
+                      <DatasetList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.databases}>
+                    <ErrorBoundary>
+                      <DatabaseList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.savedQueries}>
+                    <ErrorBoundary>
+                      <SavedQueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.cssTemplates}>
+                    <ErrorBoundary>
+                      <CssTemplatesList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotationLayers}>
+                    <ErrorBoundary>
+                      <AnnotationLayersList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.annotations}>
+                    <ErrorBoundary>
+                      <AnnotationList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.queries}>
+                    <ErrorBoundary>
+                      <QueryList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alerts}>
+                    <ErrorBoundary>
+                      <AlertList user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reports}>
+                    <ErrorBoundary>
+                      <AlertList user={user} isReportEnabled />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.alertLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} />
+                    </ErrorBoundary>
+                  </Route>
+                  <Route path={routes.reportLogs}>
+                    <ErrorBoundary>
+                      <ExecutionLog user={user} isReportEnabled />
+                    </ErrorBoundary>

Review comment:
       just proposal to reduce code may be create map like:
   ```
   const pathToRoute = {
      [routes.alertLogs]:  { Component : ExecutionLog },
      [routes. reportLogs]: { Component : ExecutionLog, isReportEnabled: true },
      ...etc others...
   }
   ```
   and then just:
   
   ```
   <Suspense fallback={<Loading />}>
       <Route path="/superset/welcome/">	                
            <Switch>
            {Object.values(routes).map(route => {
                   const { Component, ...otherProps } = pathToRoute[route]
                   return <Route path={routes.alertLogs}>                  
                              <ErrorBoundary>             
                                     <Component user={user} {...otherProps}/>
                               </ErrorBoundary>	 
                   </Route>
            }) }
           ...
   ```




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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13087: perf: add lazy loading along react-router routes and router links in menu

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=h1) Report
   > Merging [#13087](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=desc) (533db7a) into [master](https://codecov.io/gh/apache/superset/commit/2ce79823dfad61bce6196fcacd56a844f44818c0?el=desc) (2ce7982) will **increase** coverage by `13.71%`.
   > The diff coverage is `41.75%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13087/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #13087       +/-   ##
   ===========================================
   + Coverage   53.06%   66.77%   +13.71%     
   ===========================================
     Files         489      492        +3     
     Lines       17314    29034    +11720     
     Branches     4482        0     -4482     
   ===========================================
   + Hits         9187    19388    +10201     
   - Misses       8127     9646     +1519     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | python | `66.77% <41.75%> (?)` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/examples/birth\_names.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmlydGhfbmFtZXMucHk=) | `73.19% <ø> (ø)` | |
   | [...43f2fdb\_add\_granularity\_to\_charts\_where\_missing.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8wNzBjMDQzZjJmZGJfYWRkX2dyYW51bGFyaXR5X3RvX2NoYXJ0c193aGVyZV9taXNzaW5nLnB5) | `0.00% <0.00%> (ø)` | |
   | [...s/260bf0649a77\_migrate\_x\_dateunit\_in\_time\_range.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy8yNjBiZjA2NDlhNzdfbWlncmF0ZV94X2RhdGV1bml0X2luX3RpbWVfcmFuZ2UucHk=) | `0.00% <0.00%> (ø)` | |
   | [...ons/versions/41ce8799acc3\_rename\_pie\_label\_type.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbWlncmF0aW9ucy92ZXJzaW9ucy80MWNlODc5OWFjYzNfcmVuYW1lX3BpZV9sYWJlbF90eXBlLnB5) | `0.00% <0.00%> (ø)` | |
   | [superset/connectors/sqla/views.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3ZpZXdzLnB5) | `62.43% <4.34%> (ø)` | |
   | [superset/views/datasource.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS5weQ==) | `88.70% <16.66%> (ø)` | |
   | [superset/viz.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdml6LnB5) | `58.82% <20.00%> (ø)` | |
   | [superset/charts/commands/exceptions.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY2hhcnRzL2NvbW1hbmRzL2V4Y2VwdGlvbnMucHk=) | `92.85% <77.77%> (ø)` | |
   | [superset/utils/core.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY29yZS5weQ==) | `87.99% <82.05%> (ø)` | |
   | [superset/db\_engine\_specs/trino.py](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3RyaW5vLnB5) | `90.47% <90.47%> (ø)` | |
   | ... and [927 more](https://codecov.io/gh/apache/superset/pull/13087/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/13087?src=pr&el=footer). Last update [2e6ea76...2076fa4](https://codecov.io/gh/apache/superset/pull/13087?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