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/11/05 20:23:10 UTC

[GitHub] [superset] Damans227 opened a new pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Damans227 opened a new pull request #17361:
URL: https://github.com/apache/superset/pull/17361






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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] edited a comment on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-962204251


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#17361](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0741443) into [master](https://codecov.io/gh/apache/superset/commit/f05a32eeb92f24326d8e85d3d597a279995a4d1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f05a32e) will **decrease** coverage by `0.11%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17361/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17361      +/-   ##
   ==========================================
   - Coverage   77.14%   77.02%   -0.12%     
   ==========================================
     Files        1036     1038       +2     
     Lines       55759    56011     +252     
     Branches     7628     7739     +111     
   ==========================================
   + Hits        43013    43142     +129     
   - Misses      12490    12611     +121     
   - Partials      256      258       +2     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.22% <0.00%> (-0.19%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/src/visualizations/TimeTable/FormattedNumber.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9Gb3JtYXR0ZWROdW1iZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...hboard/components/nativeFilters/FilterBar/state.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL3N0YXRlLnRz) | `82.81% <0.00%> (-4.69%)` | :arrow_down: |
   | [...ols/FilterControl/AdhocFilterEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXIvaW5kZXguanN4) | `66.10% <0.00%> (-3.35%)` | :arrow_down: |
   | [superset-frontend/src/chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0LmpzeA==) | `40.29% <0.00%> (-3.04%)` | :arrow_down: |
   | [...frontend/src/components/TimezoneSelector/index.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVGltZXpvbmVTZWxlY3Rvci9pbmRleC50c3g=) | `95.45% <0.00%> (-2.28%)` | :arrow_down: |
   | [...tend/src/common/hooks/apiResources/apiResources.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9ob29rcy9hcGlSZXNvdXJjZXMvYXBpUmVzb3VyY2VzLnRz) | `92.50% <0.00%> (-2.24%)` | :arrow_down: |
   | [.../src/dashboard/components/gridComponents/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0LmpzeA==) | `78.37% <0.00%> (-2.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/constants.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29uc3RhbnRzLnRz) | `95.74% <0.00%> (-1.63%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/actions/sliceEntities.js](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL3NsaWNlRW50aXRpZXMuanM=) | `11.76% <0.00%> (-1.14%)` | :arrow_down: |
   | [...t-frontend/src/dashboard/components/SliceAdder.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NsaWNlQWRkZXIuanN4) | `76.62% <0.00%> (-0.41%)` | :arrow_down: |
   | ... and [26 more](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f05a32e...0741443](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] Damans227 commented on a change in pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

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



##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,
+}: FormattedNumberProps) {
   if (format) {
-    return <span title={num}>{formatNumber(format, num)}</span>;
+    return (
+      <span title={num as string}>{formatNumber(format, num as number)}</span>

Review comment:
       @etr2460 
   
   > it looks like `formatNumber` might actually support strings already (according to the old code). could you check the function in superset-ui and see if that type needs to be changed?
   > 
   As per the[ superset-ui documentation for number-format](https://github.com/apache-superset/superset-ui/tree/master/packages/superset-ui-core/src/number-format), it looks like `formatNumber`  fallbacks to `d3.format` to handle the error for invalid format like `string`.
   
   However, changing: 
   
   `<span title={num as string}>{formatNumber(format, num as number)}</span>`
   
   to 
   
   `<span title={num as string}>{formatNumber(format, num)}</span>;`
   
   in the tsx file is throwing an error: 
   
   _Argument of type 'string | number' is not assignable to parameter of type 'number | null | undefined'.
     Type 'string' is not assignable to type 'number | null | undefined'._




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] edited a comment on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-962204251


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#17361](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (82df406) into [master](https://codecov.io/gh/apache/superset/commit/f05a32eeb92f24326d8e85d3d597a279995a4d1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f05a32e) will **decrease** coverage by `0.11%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 82df406 differs from pull request most recent head 0741443. Consider uploading reports for the commit 0741443 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17361/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17361      +/-   ##
   ==========================================
   - Coverage   77.14%   77.02%   -0.12%     
   ==========================================
     Files        1036     1038       +2     
     Lines       55759    56011     +252     
     Branches     7628     7739     +111     
   ==========================================
   + Hits        43013    43141     +128     
   - Misses      12490    12612     +122     
   - Partials      256      258       +2     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.22% <0.00%> (-0.20%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/src/visualizations/TimeTable/FormattedNumber.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9Gb3JtYXR0ZWROdW1iZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...hboard/components/nativeFilters/FilterBar/state.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL3N0YXRlLnRz) | `82.81% <0.00%> (-4.69%)` | :arrow_down: |
   | [...ols/FilterControl/AdhocFilterEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXIvaW5kZXguanN4) | `66.10% <0.00%> (-3.35%)` | :arrow_down: |
   | [superset-frontend/src/chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0LmpzeA==) | `40.29% <0.00%> (-3.04%)` | :arrow_down: |
   | [...frontend/src/components/TimezoneSelector/index.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVGltZXpvbmVTZWxlY3Rvci9pbmRleC50c3g=) | `95.45% <0.00%> (-2.28%)` | :arrow_down: |
   | [...tend/src/common/hooks/apiResources/apiResources.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9ob29rcy9hcGlSZXNvdXJjZXMvYXBpUmVzb3VyY2VzLnRz) | `92.50% <0.00%> (-2.24%)` | :arrow_down: |
   | [.../src/dashboard/components/gridComponents/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0LmpzeA==) | `78.37% <0.00%> (-2.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/constants.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29uc3RhbnRzLnRz) | `95.74% <0.00%> (-1.63%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/actions/sliceEntities.js](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL3NsaWNlRW50aXRpZXMuanM=) | `11.76% <0.00%> (-1.14%)` | :arrow_down: |
   | [...t-frontend/src/dashboard/components/SliceAdder.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NsaWNlQWRkZXIuanN4) | `76.62% <0.00%> (-0.41%)` | :arrow_down: |
   | ... and [25 more](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f05a32e...0741443](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] edited a comment on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-962204251


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#17361](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (841c03c) into [master](https://codecov.io/gh/apache/superset/commit/f05a32eeb92f24326d8e85d3d597a279995a4d1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f05a32e) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 841c03c differs from pull request most recent head 82df406. Consider uploading reports for the commit 82df406 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17361/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17361      +/-   ##
   ==========================================
   - Coverage   77.14%   77.13%   -0.01%     
   ==========================================
     Files        1036     1036              
     Lines       55759    55761       +2     
     Branches     7628     7631       +3     
   ==========================================
   + Hits        43013    43014       +1     
   - Misses      12490    12491       +1     
     Partials      256      256              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.41% <0.00%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/src/visualizations/TimeTable/FormattedNumber.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9Gb3JtYXR0ZWROdW1iZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...eFilters/FiltersConfigModal/FiltersConfigModal.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdNb2RhbC50c3g=) | `87.71% <0.00%> (+0.58%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f05a32e...82df406](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] pkdotson commented on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

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


   LGTM!


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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



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


[GitHub] [superset] michael-s-molina commented on a change in pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #17361:
URL: https://github.com/apache/superset/pull/17361#discussion_r750265296



##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,
+}: FormattedNumberProps) {
   if (format) {
-    return <span title={num}>{formatNumber(format, num)}</span>;
+    return (
+      <span title={num as string}>{formatNumber(format, num as number)}</span>

Review comment:
       @Damans227 @etr2460 Just to be sure here. The [superset-ui documentation for number-format](https://github.com/apache-superset/superset-ui/tree/master/packages/superset-ui-core/src/number-format) referenced above states the following:
   
   > It is powered by a registry to support registration of custom formatting, with fallback to d3.format and handle error for invalid format string.
   
   It's talking about the formatting string, which is the first parameter of the function, and not about invalid formats for the `num` (second parameter). Are you sure the value can be interpreted as strings?




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] edited a comment on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-962204251


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#17361](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a4f2fff) into [master](https://codecov.io/gh/apache/superset/commit/f05a32eeb92f24326d8e85d3d597a279995a4d1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f05a32e) will **decrease** coverage by `0.22%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17361/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17361      +/-   ##
   ==========================================
   - Coverage   77.14%   76.91%   -0.23%     
   ==========================================
     Files        1036     1039       +3     
     Lines       55759    56185     +426     
     Branches     7628     7794     +166     
   ==========================================
   + Hits        43013    43216     +203     
   - Misses      12490    12713     +223     
     Partials      256      256              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.04% <0.00%> (-0.38%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/src/visualizations/TimeTable/FormattedNumber.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9Gb3JtYXR0ZWROdW1iZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...ols/DndColumnSelectControl/utils/optionSelector.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL3V0aWxzL29wdGlvblNlbGVjdG9yLnRz) | `35.55% <0.00%> (-10.60%)` | :arrow_down: |
   | [superset-frontend/src/explore/constants.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29uc3RhbnRzLnRz) | `90.38% <0.00%> (-6.99%)` | :arrow_down: |
   | [...hboard/components/nativeFilters/FilterBar/state.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL3N0YXRlLnRz) | `82.81% <0.00%> (-4.69%)` | :arrow_down: |
   | [...ols/FilterControl/AdhocFilterEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXIvaW5kZXguanN4) | `64.91% <0.00%> (-4.54%)` | :arrow_down: |
   | [...ents/controls/DateFilterControl/utils/constants.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EYXRlRmlsdGVyQ29udHJvbC91dGlscy9jb25zdGFudHMudHM=) | `96.77% <0.00%> (-3.23%)` | :arrow_down: |
   | [...ols/DndColumnSelectControl/ColumnSelectPopover.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0NvbHVtblNlbGVjdFBvcG92ZXIudHN4) | `12.96% <0.00%> (-3.17%)` | :arrow_down: |
   | [superset-frontend/src/chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0LmpzeA==) | `40.29% <0.00%> (-3.04%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/actions/nativeFilters.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL25hdGl2ZUZpbHRlcnMudHM=) | `45.55% <0.00%> (-2.68%)` | :arrow_down: |
   | [...ColumnSelectControl/ColumnSelectPopoverTrigger.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0NvbHVtblNlbGVjdFBvcG92ZXJUcmlnZ2VyLnRzeA==) | `80.95% <0.00%> (-2.39%)` | :arrow_down: |
   | ... and [115 more](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f05a32e...a4f2fff](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] github-actions[bot] commented on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-975944707


   Ephemeral environment shutdown and build artifacts deleted.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] pkdotson commented on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

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


   /testenv up


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] commented on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-962204251


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#17361](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (841c03c) into [master](https://codecov.io/gh/apache/superset/commit/f05a32eeb92f24326d8e85d3d597a279995a4d1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f05a32e) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17361/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17361      +/-   ##
   ==========================================
   - Coverage   77.14%   77.13%   -0.01%     
   ==========================================
     Files        1036     1036              
     Lines       55759    55761       +2     
     Branches     7628     7631       +3     
   ==========================================
   + Hits        43013    43014       +1     
   - Misses      12490    12491       +1     
     Partials      256      256              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.41% <0.00%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/src/visualizations/TimeTable/FormattedNumber.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9Gb3JtYXR0ZWROdW1iZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...eFilters/FiltersConfigModal/FiltersConfigModal.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdNb2RhbC50c3g=) | `87.71% <0.00%> (+0.58%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f05a32e...841c03c](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] Damans227 commented on a change in pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

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



##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,
+}: FormattedNumberProps) {
   if (format) {
-    return <span title={num}>{formatNumber(format, num)}</span>;
+    return (
+      <span title={num as string}>{formatNumber(format, num as number)}</span>

Review comment:
       > it looks like `formatNumber` might actually support strings already (according to the old code). could you check the function in superset-ui and see if that type needs to be changed?
   
   Sure thing. 
   
   > also, for `title`, let's do `` title={`${num}`} `` instead asserting and overriding the type
   
   Will do. 
   
   

##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,

Review comment:
       Yea, that makes sense!




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] edited a comment on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-962204251


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#17361](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (82df406) into [master](https://codecov.io/gh/apache/superset/commit/f05a32eeb92f24326d8e85d3d597a279995a4d1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f05a32e) will **decrease** coverage by `0.11%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17361/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17361      +/-   ##
   ==========================================
   - Coverage   77.14%   77.02%   -0.12%     
   ==========================================
     Files        1036     1038       +2     
     Lines       55759    56011     +252     
     Branches     7628     7739     +111     
   ==========================================
   + Hits        43013    43141     +128     
   - Misses      12490    12612     +122     
   - Partials      256      258       +2     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.22% <0.00%> (-0.20%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/src/visualizations/TimeTable/FormattedNumber.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9Gb3JtYXR0ZWROdW1iZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...hboard/components/nativeFilters/FilterBar/state.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL3N0YXRlLnRz) | `82.81% <0.00%> (-4.69%)` | :arrow_down: |
   | [...ols/FilterControl/AdhocFilterEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXIvaW5kZXguanN4) | `66.10% <0.00%> (-3.35%)` | :arrow_down: |
   | [superset-frontend/src/chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0LmpzeA==) | `40.29% <0.00%> (-3.04%)` | :arrow_down: |
   | [...frontend/src/components/TimezoneSelector/index.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVGltZXpvbmVTZWxlY3Rvci9pbmRleC50c3g=) | `95.45% <0.00%> (-2.28%)` | :arrow_down: |
   | [...tend/src/common/hooks/apiResources/apiResources.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9ob29rcy9hcGlSZXNvdXJjZXMvYXBpUmVzb3VyY2VzLnRz) | `92.50% <0.00%> (-2.24%)` | :arrow_down: |
   | [.../src/dashboard/components/gridComponents/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0LmpzeA==) | `78.37% <0.00%> (-2.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/constants.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29uc3RhbnRzLnRz) | `95.74% <0.00%> (-1.63%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/actions/sliceEntities.js](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL3NsaWNlRW50aXRpZXMuanM=) | `11.76% <0.00%> (-1.14%)` | :arrow_down: |
   | [...t-frontend/src/dashboard/components/SliceAdder.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NsaWNlQWRkZXIuanN4) | `76.62% <0.00%> (-0.41%)` | :arrow_down: |
   | ... and [25 more](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f05a32e...82df406](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 #17361: chore: migrate FormattedNumber component from jsx to tsx

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



##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,
+}: FormattedNumberProps) {
   if (format) {
-    return <span title={num}>{formatNumber(format, num)}</span>;
+    return (
+      <span title={num as string}>{formatNumber(format, num as number)}</span>

Review comment:
       thanks for looking into this. Since `formatNumber(format, num)` has been working today already, and i'm a bit hesitant to `parseInt` the string in case we lose accuracy for very large numbers, I think it's ok to override typescript here. Once change I might make though is insead of doing `num as number` (which would imply that it's always a number, even when it isn't) I would add a `// @ts-expect-error formatNumber can actually accept strings, even though it's not typed as such` comment to bypass the TS error




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 #17361: chore: migrate FormattedNumber component from jsx to tsx

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



##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,
+}: FormattedNumberProps) {
   if (format) {
-    return <span title={num}>{formatNumber(format, num)}</span>;
+    return (
+      <span title={num as string}>{formatNumber(format, num as number)}</span>

Review comment:
       @michael-s-molina @Damans227 so this uses d3-format under the hood, which is untyped, but as far as i can tell does support strings (see where it converts it here):
   https://github.com/d3/d3-format/blob/main/src/locale.js#L74
   
   But more importantly than that, before we allowed all strings through here, so i don't think adding a `parseInt` is correct since that could change the behavior. coercing the type with an `as number` also doesn't feel right since we don't know it's a number. That's why i recommended the options above




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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[bot] edited a comment on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-962204251


   # [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#17361](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0741443) into [master](https://codecov.io/gh/apache/superset/commit/f05a32eeb92f24326d8e85d3d597a279995a4d1d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f05a32e) will **decrease** coverage by `0.11%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 0741443 differs from pull request most recent head a4f2fff. Consider uploading reports for the commit a4f2fff to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/17361/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #17361      +/-   ##
   ==========================================
   - Coverage   77.14%   77.02%   -0.12%     
   ==========================================
     Files        1036     1038       +2     
     Lines       55759    56011     +252     
     Branches     7628     7739     +111     
   ==========================================
   + Hits        43013    43142     +129     
   - Misses      12490    12611     +121     
   - Partials      256      258       +2     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.22% <0.00%> (-0.19%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/src/visualizations/TimeTable/FormattedNumber.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9Gb3JtYXR0ZWROdW1iZXIudHN4) | `0.00% <0.00%> (ø)` | |
   | [...hboard/components/nativeFilters/FilterBar/state.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL3N0YXRlLnRz) | `82.81% <0.00%> (-4.69%)` | :arrow_down: |
   | [...ols/FilterControl/AdhocFilterEditPopover/index.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9GaWx0ZXJDb250cm9sL0FkaG9jRmlsdGVyRWRpdFBvcG92ZXIvaW5kZXguanN4) | `66.10% <0.00%> (-3.35%)` | :arrow_down: |
   | [superset-frontend/src/chart/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NoYXJ0L0NoYXJ0LmpzeA==) | `40.29% <0.00%> (-3.04%)` | :arrow_down: |
   | [...frontend/src/components/TimezoneSelector/index.tsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvVGltZXpvbmVTZWxlY3Rvci9pbmRleC50c3g=) | `95.45% <0.00%> (-2.28%)` | :arrow_down: |
   | [...tend/src/common/hooks/apiResources/apiResources.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbW1vbi9ob29rcy9hcGlSZXNvdXJjZXMvYXBpUmVzb3VyY2VzLnRz) | `92.50% <0.00%> (-2.24%)` | :arrow_down: |
   | [.../src/dashboard/components/gridComponents/Chart.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL2dyaWRDb21wb25lbnRzL0NoYXJ0LmpzeA==) | `78.37% <0.00%> (-2.00%)` | :arrow_down: |
   | [superset-frontend/src/explore/constants.ts](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29uc3RhbnRzLnRz) | `95.74% <0.00%> (-1.63%)` | :arrow_down: |
   | [...et-frontend/src/dashboard/actions/sliceEntities.js](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL3NsaWNlRW50aXRpZXMuanM=) | `11.76% <0.00%> (-1.14%)` | :arrow_down: |
   | [...t-frontend/src/dashboard/components/SliceAdder.jsx](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL1NsaWNlQWRkZXIuanN4) | `76.62% <0.00%> (-0.41%)` | :arrow_down: |
   | ... and [26 more](https://codecov.io/gh/apache/superset/pull/17361/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f05a32e...a4f2fff](https://codecov.io/gh/apache/superset/pull/17361?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 #17361: chore: migrate FormattedNumber component from jsx to tsx

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



##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,
+}: FormattedNumberProps) {
   if (format) {
-    return <span title={num}>{formatNumber(format, num)}</span>;
+    return (
+      <span title={num as string}>{formatNumber(format, num as number)}</span>

Review comment:
       it looks like `formatNumber` might actually support strings already (according to the old code). could you check the function in superset-ui and see if that type needs to be changed?
   
   also, for `title`, let's do ```title={`${num}`}``` instead asserting and overriding the type

##########
File path: superset-frontend/src/visualizations/TimeTable/FormattedNumber.tsx
##########
@@ -17,27 +17,23 @@
  * under the License.
  */
 import React from 'react';
-import PropTypes from 'prop-types';
 import { formatNumber } from '@superset-ui/core';
 
-const propTypes = {
-  num: PropTypes.number,
-  format: PropTypes.string,
-};
-
-const defaultProps = {
-  num: 0,
-  format: undefined,
-};
+interface FormattedNumberProps {
+  num?: string | number;
+  format?: string;
+}
 
-function FormattedNumber({ num, format }) {
+function FormattedNumber({
+  num = 0,
+  format = undefined,

Review comment:
       this will be undefined by default, no need to set the default prop there




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] Damans227 commented on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

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






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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] pkdotson merged pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

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


   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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] github-actions[bot] commented on pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #17361:
URL: https://github.com/apache/superset/pull/17361#issuecomment-967700720


   @pkdotson Ephemeral environment spinning up at http://34.221.117.162:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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 pull request #17361: chore: migrate FormattedNumber component from jsx to tsx

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


   @pkdotson did you want to test anything here before we merge them?


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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