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/23 00:49:31 UTC

[GitHub] [superset] ktmud opened a new pull request #13291: fix(home): missing key and inval dates in Recents cards

ktmud opened a new pull request #13291:
URL: https://github.com/apache/superset/pull/13291


   ### SUMMARY
   
   - Cleaning up tech debt in Welcome recents cards and add proper typing.
   - Fixes missing React children key and invalid dates bug (PR #12227 seems to have re-introduced Bug #12893 )
   
   Alternative solution to #13225 
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   #### Before
   
   ![image](https://user-images.githubusercontent.com/335541/108788757-993fb780-752d-11eb-9d2b-2c7ae3213e84.png)
   
   #### After
   
   ![Snip20210222_34](https://user-images.githubusercontent.com/335541/108788880-d441eb00-752d-11eb-9a30-41074fcd1819.png)
   
   
   ### TEST PLAN
   
   Manual verification on the home page
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue:
   - [x] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


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

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



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


[GitHub] [superset] codecov-io edited a comment on pull request #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (d9fde12) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **decrease** coverage by `5.34%`.
   > The diff coverage is `69.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   - Coverage   77.14%   71.80%   -5.35%     
   ==========================================
     Files         865      865              
     Lines       44961    44948      -13     
     Branches     5415     5421       +6     
   ==========================================
   - Hits        34686    32274    -2412     
   - Misses      10152    12465    +2313     
   - Partials      123      209      +86     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `62.20% <69.04%> (+0.02%)` | :arrow_up: |
   | python | `79.97% <100.00%> (-0.85%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...-frontend/src/views/CRUD/welcome/ActivityTable.tsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9BY3Rpdml0eVRhYmxlLnRzeA==) | `72.36% <69.04%> (+6.85%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `72.93% <100.00%> (-2.44%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rset-frontend/src/filters/components/Time/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9UaW1lL3R5cGVzLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [229 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...d9fde12](https://codecov.io/gh/apache/superset/pull/13291?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] junlincc edited a comment on pull request #13291: fix(home): missing key and invalid dates in Recents cards

Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on pull request #13291:
URL: https://github.com/apache/superset/pull/13291#issuecomment-783808032


   @yardz Hey Bruno, Jesse opened a PR as alternative of #13225, please review. 🙏
   
   cc @pkdotson 


----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -23,25 +23,43 @@ import { styled, t } from '@superset-ui/core';
 import Loading from 'src/components/Loading';
 import ListViewCard from 'src/components/ListViewCard';
 import SubMenu from 'src/components/Menu/SubMenu';
+import { Chart } from 'src/types/Chart';
+import { Dashboard, SavedQueryObject } from 'src/views/CRUD/types';
+import { mq, CardStyles } from 'src/views/CRUD/utils';
+
 import { ActivityData } from './Welcome';
-import { mq, CardStyles } from '../utils';
 import EmptyState from './EmptyState';
 
-interface ActivityObjects {
-  action?: string;
-  item_title?: string;
-  slice_name: string;
-  time: string;
-  changed_on_utc: string;
-  url: string;
-  sql: string;
-  dashboard_title: string;
-  label: string;
-  id: string;
-  table: object;
+/**
+ * Return result from /superset/recent_activity/{user_id}
+ */
+interface RecentActivity {
+  action: string;
+  item_type: 'slice' | 'dashboard';
   item_url: string;
+  item_title: string;
+  time: number;
+  time_delta_humanized?: string;
+}
+
+interface RecentSlice extends RecentActivity {
+  item_type: 'slice';
+}
+
+interface RecentDashboard extends RecentActivity {
+  item_type: 'dashboard';
 }
 
+/**
+ * Recent activity objects fetched by `getRecentAcitivtyObjs`.
+ */
+type ActivityObject =

Review comment:
       Yes, as `ActivityTable` renders [`ActivityData` ](https://github.com/apache/superset/blob/3e0681b4384d9c91a7b1f8654f4391cfab4bc2b8/superset-frontend/src/views/CRUD/welcome/Welcome.tsx#L137) and `ActivityData` comes from [`getRecentAcitivtyObjs`](https://github.com/apache/superset/blob/3e0681b4384d9c91a7b1f8654f4391cfab4bc2b8/superset-frontend/src/views/CRUD/welcome/Welcome.tsx#L94), which then calls [these API endpoints](https://github.com/apache/superset/blob/3e0681b4384d9c91a7b1f8654f4391cfab4bc2b8/superset-frontend/src/views/CRUD/utils.tsx#L98-115).
   
   




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (b33fe7f) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **decrease** coverage by `5.11%`.
   > The diff coverage is `69.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   - Coverage   77.14%   72.03%   -5.12%     
   ==========================================
     Files         865      865              
     Lines       44961    44950      -11     
     Branches     5415     5421       +6     
   ==========================================
   - Hits        34686    32379    -2307     
   - Misses      10152    12362    +2210     
   - Partials      123      209      +86     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `62.20% <69.04%> (+0.02%)` | :arrow_up: |
   | python | `80.39% <100.00%> (-0.42%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...-frontend/src/views/CRUD/welcome/ActivityTable.tsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9BY3Rpdml0eVRhYmxlLnRzeA==) | `72.36% <69.04%> (+6.85%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `75.39% <100.00%> (+0.01%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rset-frontend/src/filters/components/Time/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9UaW1lL3R5cGVzLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [214 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...d9fde12](https://codecov.io/gh/apache/superset/pull/13291?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 #13291: fix(home): missing key and inval dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (0c951fc) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **decrease** coverage by `5.37%`.
   > The diff coverage is `69.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   - Coverage   77.14%   71.77%   -5.38%     
   ==========================================
     Files         865      865              
     Lines       44961    44922      -39     
     Branches     5415     5421       +6     
   ==========================================
   - Hits        34686    32243    -2443     
   - Misses      10152    12470    +2318     
   - Partials      123      209      +86     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `62.20% <69.04%> (+0.02%)` | :arrow_up: |
   | python | `79.93% <100.00%> (-0.89%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...-frontend/src/views/CRUD/welcome/ActivityTable.tsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9BY3Rpdml0eVRhYmxlLnRzeA==) | `72.36% <69.04%> (+6.85%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <100.00%> (-0.43%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rset-frontend/src/filters/components/Time/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9UaW1lL3R5cGVzLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [238 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...b33fe7f](https://codecov.io/gh/apache/superset/pull/13291?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] yardz commented on a change in pull request #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;
+
+const getEntityTitle = (e: ActivityObject) => {
+  if ('dashboard_title' in e) return e.dashboard_title || UNTITLED;
+  if ('slice_name' in e) return e.slice_name || UNTITLED;
+  if ('label' in e) return e.label || UNTITLED;
+  return e.item_title || UNTITLED;
+};
+
+const getEntityIconName = (e: ActivityObject) => {

Review comment:
       Same thing here (and for the other functions)




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (d9fde12) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **increase** coverage by `2.82%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   + Coverage   77.14%   79.97%   +2.82%     
   ==========================================
     Files         865      298     -567     
     Lines       44961    24283   -20678     
     Branches     5415        0    -5415     
   ==========================================
   - Hits        34686    19420   -15266     
   + Misses      10152     4863    -5289     
   + Partials      123        0     -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.97% <100.00%> (-0.85%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `72.93% <100.00%> (-2.44%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `74.23% <0.00%> (-16.54%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `84.55% <0.00%> (-6.03%)` | :arrow_down: |
   | [superset/databases/commands/test\_connection.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3Rlc3RfY29ubmVjdGlvbi5weQ==) | `84.78% <0.00%> (-4.35%)` | :arrow_down: |
   | [superset/databases/api.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2FwaS5weQ==) | `88.30% <0.00%> (-3.63%)` | :arrow_down: |
   | ... and [577 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...d9fde12](https://codecov.io/gh/apache/superset/pull/13291?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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (b33fe7f) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **increase** coverage by `3.25%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   + Coverage   77.14%   80.39%   +3.25%     
   ==========================================
     Files         865      298     -567     
     Lines       44961    24285   -20676     
     Branches     5415        0    -5415     
   ==========================================
   - Hits        34686    19525   -15161     
   + Misses      10152     4760    -5392     
   + Partials      123        0     -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `80.39% <100.00%> (-0.42%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `75.39% <100.00%> (+0.01%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `74.23% <0.00%> (-16.54%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.62% <0.00%> (-6.42%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.57% <0.00%> (-0.49%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.55% <0.00%> (-0.28%)` | :arrow_down: |
   | [superset-frontend/src/explore/store.js](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvc3RvcmUuanM=) | | |
   | [...e/controlPanels/timeGrainSqlaAnimationOverrides.js](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29udHJvbFBhbmVscy90aW1lR3JhaW5TcWxhQW5pbWF0aW9uT3ZlcnJpZGVzLmpz) | | |
   | [...rontend/src/explore/components/PropertiesModal.tsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Qcm9wZXJ0aWVzTW9kYWwudHN4) | | |
   | ... and [562 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...d9fde12](https://codecov.io/gh/apache/superset/pull/13291?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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (b33fe7f) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **increase** coverage by `3.20%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   + Coverage   77.14%   80.35%   +3.20%     
   ==========================================
     Files         865      298     -567     
     Lines       44961    24285   -20676     
     Branches     5415        0    -5415     
   ==========================================
   - Hits        34686    19514   -15172     
   + Misses      10152     4771    -5381     
   + Partials      123        0     -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `80.35% <100.00%> (-0.47%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <100.00%> (-0.43%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `74.23% <0.00%> (-16.54%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.62% <0.00%> (-6.42%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `89.79% <0.00%> (-2.05%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `87.73% <0.00%> (-1.09%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.57% <0.00%> (-0.49%)` | :arrow_down: |
   | [superset/connectors/sqla/models.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL21vZGVscy5weQ==) | `90.44% <0.00%> (-0.14%)` | :arrow_down: |
   | ... and [565 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...d9fde12](https://codecov.io/gh/apache/superset/pull/13291?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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (29a538c) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **increase** coverage by `2.79%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   + Coverage   77.14%   79.93%   +2.79%     
   ==========================================
     Files         865      298     -567     
     Lines       44961    24285   -20676     
     Branches     5415        0    -5415     
   ==========================================
   - Hits        34686    19413   -15273     
   + Misses      10152     4872    -5280     
   + Partials      123        0     -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.93% <100.00%> (-0.88%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `71.82% <100.00%> (-3.56%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.69% <0.00%> (-24.88%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.95% <0.00%> (-6.12%)` | :arrow_down: |
   | [superset/views/database/forms.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvZm9ybXMucHk=) | `83.33% <0.00%> (-5.56%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.47% <0.00%> (-5.56%)` | :arrow_down: |
   | ... and [577 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...29a538c](https://codecov.io/gh/apache/superset/pull/13291?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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (b33fe7f) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **increase** coverage by `3.16%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   + Coverage   77.14%   80.31%   +3.16%     
   ==========================================
     Files         865      298     -567     
     Lines       44961    24283   -20678     
     Branches     5415        0    -5415     
   ==========================================
   - Hits        34686    19503   -15183     
   + Misses      10152     4780    -5372     
   + Partials      123        0     -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `80.31% <100.00%> (-0.50%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <100.00%> (-0.43%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `74.23% <0.00%> (-16.54%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.62% <0.00%> (-6.42%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/utils/celery.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2VsZXJ5LnB5) | `86.20% <0.00%> (-3.45%)` | :arrow_down: |
   | [superset/db\_engine\_specs/mysql.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL215c3FsLnB5) | `89.79% <0.00%> (-2.05%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | [superset/result\_set.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVzdWx0X3NldC5weQ==) | `96.69% <0.00%> (-1.66%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `84.84% <0.00%> (-1.23%)` | :arrow_down: |
   | ... and [569 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...b33fe7f](https://codecov.io/gh/apache/superset/pull/13291?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] yardz commented on a change in pull request #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -139,35 +194,30 @@ export default function ActivityTable({
     });
   }
 
-  const renderActivity = () => {
-    const getRecentRef = (e: ActivityObjects) => {
-      if (activeChild === 'Viewed') {
-        return e.item_url;
-      }
-      return e.sql ? `/superset/sqllab?savedQueryId=${e.id}` : e.url;
-    };
-    return activityData[activeChild].map((e: ActivityObjects) => (
-      <CardStyles
-        onClick={() => {
-          window.location.href = getRecentRef(e);
-        }}
-        key={e.id}
-      >
-        <ListViewCard
-          loading={loading}
-          cover={<></>}
-          url={e.sql ? `/superset/sqllab?savedQueryId=${e.id}` : e.url}
-          title={getFilterTitle(e)}
-          description={`Last Edited: ${moment(
-            e.changed_on_utc,
-            'MM/DD/YYYY HH:mm:ss',
-          )}`}
-          avatar={getIconName(e)}
-          actions={null}
-        />
-      </CardStyles>
-    ));
-  };
+  const renderActivity = () =>
+    activityData[activeChild].map((e: ActivityObject) => {
+      const url = getEntityUrl(e);
+      const lastActionOn = getEntityLastActionOn(e);
+      return (
+        <CardStyles
+          onClick={() => {
+            window.location.href = url;
+          }}
+          key={url}

Review comment:
       Ok




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/types/Chart.ts
##########
@@ -44,4 +45,7 @@ export type Slice = {
   slice_name: string;
   description: string | null;
   cache_timeout: number | null;
+  url?: string;
 };
+
+export default Chart;

Review comment:
       I think one has stricter typing following the backend API response; another is for temporary chart state on the client side (we should probably consolidate these two).




----------------------------------------------------------------
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 merged pull request #13291: fix(home): missing key and invalid dates in Recents cards

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


   


----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;
+
+const getEntityTitle = (e: ActivityObject) => {

Review comment:
       It's replicating the same logic as the deleted code. Just with some typing help.




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (0c951fc) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **decrease** coverage by `0.21%`.
   > The diff coverage is `69.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   - Coverage   77.14%   76.92%   -0.22%     
   ==========================================
     Files         865      865              
     Lines       44961    44980      +19     
     Branches     5415     5421       +6     
   ==========================================
   - Hits        34686    34603      -83     
   - Misses      10152    10254     +102     
     Partials      123      123              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `58.52% <19.51%> (-0.02%)` | :arrow_down: |
   | javascript | `62.20% <69.04%> (+0.02%)` | :arrow_up: |
   | python | `80.39% <100.00%> (-0.42%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...-frontend/src/views/CRUD/welcome/ActivityTable.tsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9BY3Rpdml0eVRhYmxlLnRzeA==) | `72.36% <69.04%> (+6.85%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `75.39% <100.00%> (+0.01%)` | :arrow_up: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `74.23% <0.00%> (-16.54%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.62% <0.00%> (-6.42%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `85.57% <0.00%> (-0.49%)` | :arrow_down: |
   | [superset/models/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvbW9kZWxzL2NvcmUucHk=) | `88.55% <0.00%> (-0.28%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...b33fe7f](https://codecov.io/gh/apache/superset/pull/13291?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] etr2460 commented on a change in pull request #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/types/Chart.ts
##########
@@ -44,4 +45,7 @@ export type Slice = {
   slice_name: string;
   description: string | null;
   cache_timeout: number | null;
+  url?: string;
 };
+
+export default Chart;

Review comment:
       Yikes, i don't even want to know why we have a `Slice` and a `Chart` type...

##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -139,35 +194,30 @@ export default function ActivityTable({
     });
   }
 
-  const renderActivity = () => {
-    const getRecentRef = (e: ActivityObjects) => {
-      if (activeChild === 'Viewed') {
-        return e.item_url;
-      }
-      return e.sql ? `/superset/sqllab?savedQueryId=${e.id}` : e.url;
-    };
-    return activityData[activeChild].map((e: ActivityObjects) => (
-      <CardStyles
-        onClick={() => {
-          window.location.href = getRecentRef(e);
-        }}
-        key={e.id}
-      >
-        <ListViewCard
-          loading={loading}
-          cover={<></>}
-          url={e.sql ? `/superset/sqllab?savedQueryId=${e.id}` : e.url}
-          title={getFilterTitle(e)}
-          description={`Last Edited: ${moment(
-            e.changed_on_utc,
-            'MM/DD/YYYY HH:mm:ss',
-          )}`}
-          avatar={getIconName(e)}
-          actions={null}
-        />
-      </CardStyles>
-    ));
-  };
+  const renderActivity = () =>
+    activityData[activeChild].map((e: ActivityObject) => {
+      const url = getEntityUrl(e);
+      const lastActionOn = getEntityLastActionOn(e);
+      return (
+        <CardStyles
+          onClick={() => {
+            window.location.href = url;
+          }}
+          key={url}

Review comment:
       is this guaranteed to be unique? The same item can't show up twice in the recent activity section?

##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;

Review comment:
       does this actually work? I would've guessed you'd need to put the actual strings in the `t()` functions

##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;
+
+const getEntityTitle = (e: ActivityObject) => {

Review comment:
       I know this is just a refactor, but `e` is a pretty bad variable name (i read it as `error` or `event` first, not `entity`). Can we rename throughout to `entity`?




----------------------------------------------------------------
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] yardz commented on a change in pull request #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -23,25 +23,43 @@ import { styled, t } from '@superset-ui/core';
 import Loading from 'src/components/Loading';
 import ListViewCard from 'src/components/ListViewCard';
 import SubMenu from 'src/components/Menu/SubMenu';
+import { Chart } from 'src/types/Chart';
+import { Dashboard, SavedQueryObject } from 'src/views/CRUD/types';
+import { mq, CardStyles } from 'src/views/CRUD/utils';
+
 import { ActivityData } from './Welcome';
-import { mq, CardStyles } from '../utils';
 import EmptyState from './EmptyState';
 
-interface ActivityObjects {
-  action?: string;
-  item_title?: string;
-  slice_name: string;
-  time: string;
-  changed_on_utc: string;
-  url: string;
-  sql: string;
-  dashboard_title: string;
-  label: string;
-  id: string;
-  table: object;
+/**
+ * Return result from /superset/recent_activity/{user_id}
+ */
+interface RecentActivity {
+  action: string;
+  item_type: 'slice' | 'dashboard';
   item_url: string;
+  item_title: string;
+  time: number;
+  time_delta_humanized?: string;
+}
+
+interface RecentSlice extends RecentActivity {
+  item_type: 'slice';
+}
+
+interface RecentDashboard extends RecentActivity {
+  item_type: 'dashboard';
 }
 
+/**
+ * Recent activity objects fetched by `getRecentAcitivtyObjs`.
+ */
+type ActivityObject =

Review comment:
       @ktmud Are you sure it's just these types?




----------------------------------------------------------------
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] yardz commented on a change in pull request #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;
+
+const getEntityTitle = (e: ActivityObject) => {

Review comment:
       @ktmud  Just one question. Are you sure these are the returns?
   As I don't know much about the application, I'm very cautious about typing
   If you're sure, I agree




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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






----------------------------------------------------------------
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 #13291: fix(home): missing key and inval dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (0c951fc) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **increase** coverage by `2.78%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   + Coverage   77.14%   79.93%   +2.78%     
   ==========================================
     Files         865      298     -567     
     Lines       44961    24257   -20704     
     Branches     5415        0    -5415     
   ==========================================
   - Hits        34686    19389   -15297     
   + Misses      10152     4868    -5284     
   + Partials      123        0     -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.93% <100.00%> (-0.89%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <100.00%> (-0.43%)` | :arrow_down: |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-85.72%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `32.65% <0.00%> (-59.19%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `60.34% <0.00%> (-22.42%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `74.23% <0.00%> (-16.54%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `81.62% <0.00%> (-6.42%)` | :arrow_down: |
   | [superset/databases/dao.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2Rhby5weQ==) | `94.11% <0.00%> (-5.89%)` | :arrow_down: |
   | [superset/databases/schemas.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL3NjaGVtYXMucHk=) | `93.58% <0.00%> (-5.89%)` | :arrow_down: |
   | ... and [586 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...b33fe7f](https://codecov.io/gh/apache/superset/pull/13291?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] etr2460 commented on a change in pull request #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;

Review comment:
       i was more wondering if the job that pulls all the strings to be translated is smart enough to know that these strings end up in a `t()` function




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;
+
+const getEntityTitle = (e: ActivityObject) => {
+  if ('dashboard_title' in e) return e.dashboard_title || UNTITLED;
+  if ('slice_name' in e) return e.slice_name || UNTITLED;
+  if ('label' in e) return e.label || UNTITLED;

Review comment:
       This fixes the case when saved queries don't have a title (label).
   
   ### Before
   
   ![Snip20210222_37](https://user-images.githubusercontent.com/335541/108794269-4a4c4f00-753a-11eb-9214-dcf94a3c172b.png)
   
   ### After
   
   ![Snip20210222_39](https://user-images.githubusercontent.com/335541/108794282-52a48a00-753a-11eb-98e6-e831ce93ecc8.png)
   




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;

Review comment:
       Yes, I did put it into `t()` later. Just making the translation keys constants because they are used in multiple statements. I can move them closer to the actual `t()` calls to reduce confusion.




----------------------------------------------------------------
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] junlincc commented on pull request #13291: fix(home): missing key and invalid dates in Recents cards

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


   @yardz Hey Bruno, Jesse opened a PR as alternative of #13225, please review. 🙏


----------------------------------------------------------------
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 #13291: fix(home): missing key and inval dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (0c951fc) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **decrease** coverage by `5.13%`.
   > The diff coverage is `69.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   - Coverage   77.14%   72.00%   -5.14%     
   ==========================================
     Files         865      865              
     Lines       44961    44950      -11     
     Branches     5415     5421       +6     
   ==========================================
   - Hits        34686    32368    -2318     
   - Misses      10152    12373    +2221     
   - Partials      123      209      +86     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `62.20% <69.04%> (+0.02%)` | :arrow_up: |
   | python | `80.35% <100.00%> (-0.47%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...-frontend/src/views/CRUD/welcome/ActivityTable.tsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9BY3Rpdml0eVRhYmxlLnRzeA==) | `72.36% <69.04%> (+6.85%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `74.94% <100.00%> (-0.43%)` | :arrow_down: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rset-frontend/src/filters/components/Time/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9UaW1lL3R5cGVzLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [217 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...b33fe7f](https://codecov.io/gh/apache/superset/pull/13291?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 #13291: fix(home): missing key and inval dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (0c951fc) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **decrease** coverage by `5.11%`.
   > The diff coverage is `69.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   - Coverage   77.14%   72.03%   -5.12%     
   ==========================================
     Files         865      865              
     Lines       44961    44950      -11     
     Branches     5415     5421       +6     
   ==========================================
   - Hits        34686    32379    -2307     
   - Misses      10152    12362    +2210     
   - Partials      123      209      +86     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `62.20% <69.04%> (+0.02%)` | :arrow_up: |
   | python | `80.39% <100.00%> (-0.42%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...-frontend/src/views/CRUD/welcome/ActivityTable.tsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9BY3Rpdml0eVRhYmxlLnRzeA==) | `72.36% <69.04%> (+6.85%)` | :arrow_up: |
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `75.39% <100.00%> (+0.01%)` | :arrow_up: |
   | [superset-frontend/src/SqlLab/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvQXBwLmpzeA==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/dashboard/App.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9BcHAuanN4) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/reducers/index.js](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvcmVkdWNlcnMvaW5kZXguanM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rset-frontend/src/filters/components/Time/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9UaW1lL3R5cGVzLnRz) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/containers/Dashboard.jsx](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZC5qc3g=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | ... and [214 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...b33fe7f](https://codecov.io/gh/apache/superset/pull/13291?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 #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -79,31 +97,68 @@ const ActivityContainer = styled.div`
   }
 `;
 
+const UNTITLED = t('[Untitled]');
+const UNKNOWN_TIME = t('Unknown');
+// translation keys for last action on
+const TRANS_LAST_VIEWED = `Last viewed %s`;
+const TRANS_LAST_MODIFIED = `Last modified %s`;
+
+const getEntityTitle = (e: ActivityObject) => {

Review comment:
       Sure! 




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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



##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -139,35 +194,30 @@ export default function ActivityTable({
     });
   }
 
-  const renderActivity = () => {
-    const getRecentRef = (e: ActivityObjects) => {
-      if (activeChild === 'Viewed') {
-        return e.item_url;
-      }
-      return e.sql ? `/superset/sqllab?savedQueryId=${e.id}` : e.url;
-    };
-    return activityData[activeChild].map((e: ActivityObjects) => (
-      <CardStyles
-        onClick={() => {
-          window.location.href = getRecentRef(e);
-        }}
-        key={e.id}
-      >
-        <ListViewCard
-          loading={loading}
-          cover={<></>}
-          url={e.sql ? `/superset/sqllab?savedQueryId=${e.id}` : e.url}
-          title={getFilterTitle(e)}
-          description={`Last Edited: ${moment(
-            e.changed_on_utc,
-            'MM/DD/YYYY HH:mm:ss',
-          )}`}
-          avatar={getIconName(e)}
-          actions={null}
-        />
-      </CardStyles>
-    ));
-  };
+  const renderActivity = () =>
+    activityData[activeChild].map((e: ActivityObject) => {
+      const url = getEntityUrl(e);
+      const lastActionOn = getEntityLastActionOn(e);
+      return (
+        <CardStyles
+          onClick={() => {
+            window.location.href = url;
+          }}
+          key={url}

Review comment:
       Yes, it's guaranteed.  The `recent_activity` API removes duplicates and results for other tabs are just regular filtered lists which has guaranteed unique items.




----------------------------------------------------------------
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 #13291: fix(home): missing key and invalid dates in Recents cards

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


   # [Codecov](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=h1) Report
   > Merging [#13291](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=desc) (29a538c) into [master](https://codecov.io/gh/apache/superset/commit/974f4476e51eefb315c356bfca75ff2fa1e83bb5?el=desc) (974f447) will **increase** coverage by `2.77%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13291/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #13291      +/-   ##
   ==========================================
   + Coverage   77.14%   79.91%   +2.77%     
   ==========================================
     Files         865      298     -567     
     Lines       44961    24257   -20704     
     Branches     5415        0    -5415     
   ==========================================
   - Hits        34686    19386   -15300     
   + Misses      10152     4871    -5281     
   + Partials      123        0     -123     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | cypress | `?` | |
   | javascript | `?` | |
   | python | `79.91% <100.00%> (-0.90%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/13291?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [superset/views/core.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvY29yZS5weQ==) | `71.82% <100.00%> (-3.56%)` | :arrow_down: |
   | [superset/sql\_validators/postgres.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvcG9zdGdyZXMucHk=) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
   | [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `62.69% <0.00%> (-24.88%)` | :arrow_down: |
   | [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `83.67% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/databases/commands/update.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `85.71% <0.00%> (-8.17%)` | :arrow_down: |
   | [superset/sql\_validators/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvc3FsX3ZhbGlkYXRvcnMvYmFzZS5weQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
   | [superset/db\_engine\_specs/sqlite.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3NxbGl0ZS5weQ==) | `90.62% <0.00%> (-6.25%)` | :arrow_down: |
   | [superset/db\_engine\_specs/base.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2Jhc2UucHk=) | `79.95% <0.00%> (-6.12%)` | :arrow_down: |
   | [superset/views/database/forms.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvZm9ybXMucHk=) | `83.33% <0.00%> (-5.56%)` | :arrow_down: |
   | [superset/db\_engine\_specs/presto.py](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL3ByZXN0by5weQ==) | `82.47% <0.00%> (-5.56%)` | :arrow_down: |
   | ... and [584 more](https://codecov.io/gh/apache/superset/pull/13291/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13291?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/13291?src=pr&el=footer). Last update [974f447...29a538c](https://codecov.io/gh/apache/superset/pull/13291?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