Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Migrate UndoRedoKeyListeners to typescript #30654

Conversation

EnxDev
Copy link
Contributor

@EnxDev EnxDev commented Oct 19, 2024

SUMMARY

Migrate UndoRedoKeyListeners to typescript

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N.A

TESTING INSTRUCTIONS

All tests should pass

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 70.80%. Comparing base (76d897e) to head (9d18a7e).
Report is 866 commits behind head on master.

Files with missing lines Patch % Lines
...gin-chart-echarts/src/Timeseries/transformProps.ts 0.00% 1 Missing ⚠️
superset/sql_lab.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #30654       +/-   ##
===========================================
+ Coverage   60.48%   70.80%   +10.31%     
===========================================
  Files        1931     1984       +53     
  Lines       76236    80042     +3806     
  Branches     8568     9156      +588     
===========================================
+ Hits        46114    56675    +10561     
+ Misses      28017    21133     -6884     
- Partials     2105     2234      +129     
Flag Coverage Δ
hive 48.96% <50.00%> (-0.21%) ⬇️
javascript 58.58% <66.66%> (+0.87%) ⬆️
mysql 76.73% <50.00%> (?)
postgres 76.86% <50.00%> (?)
presto 53.43% <50.00%> (-0.37%) ⬇️
python 83.92% <50.00%> (+20.43%) ⬆️
sqlite 76.31% <50.00%> (?)
unit 60.93% <0.00%> (+3.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@geido
Copy link
Member

geido commented Oct 22, 2024

/testenv up

Copy link
Contributor

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

const propTypes = {
onUndo: PropTypes.func.isRequired,
onRedo: PropTypes.func.isRequired,
type UndoRedoKeyListenersProps = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's a ts type helper Pick designed for situations just like this one. We could use it here like this:

type UndoRedoKeyListenersProps = Pick<HeaderProps, 'onUndo' | 'onRedo'>;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But your code is fine as well, so let me know if you'd rather keep it as it is and I'll merge the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's a ts type helper Pick designed for situations just like this one. We could use it here like this:


type UndoRedoKeyListenersProps = Pick<HeaderProps, 'onUndo' | 'onRedo'>;

I preferred to create a specific type, thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But your code is fine as well, so let me know if you'd rather keep it as it is and I'll merge the PR

If you’d like, I can modify it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, merged 🙂

@kgabryje kgabryje merged commit ec2d330 into apache:master Oct 24, 2024
35 of 36 checks passed
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants