Skip to content

Typescript/feature highlight #1338

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

Merged
merged 13 commits into from
Jun 9, 2021
Merged

Typescript/feature highlight #1338

merged 13 commits into from
Jun 9, 2021

Conversation

mendyEdri
Copy link
Contributor

Description

Migrate FeatureHighlight component into typescript.

Changelog

Migrate FeatureHighlight component into typescript.

@mendyEdri mendyEdri requested review from M-i-k-e-l and Inbal-Tish and removed request for M-i-k-e-l June 6, 2021 07:50
*/
pageControlProps: PropTypes.shape(PageControl.propTypes)
};
static propTypes = {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you leave the propTypes static object?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -298,7 +332,7 @@ class FeatureHighlight extends BaseComponent {
titleStyle
]}
numberOfLines={titleNumberOfLines}
pointerEvents="none"
pointerEvents
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand the meaning of this change. pointerEvets prop is not a boolean so why did you drop the value ("none")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It becomes boolean from out modifiers, and some how react-native haven't export this prop with a type,
so I changed it back and added @ts-expect-error

@@ -219,8 +252,8 @@ class FeatureHighlight extends BaseComponent {
}

getContentPosition() {
const {highlightFrame, minimumRectSize, innerPadding} = this.props;
const {top, height} = this.targetPosition;
const {highlightFrame, minimumRectSize = {height: 0}, innerPadding = 0} = this.props;
Copy link
Collaborator

Choose a reason for hiding this comment

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

minimumRectSize is of type ReactSize, is setting only the height as default enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, since it's only used the height in line 262

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I know. I just thought it might give you a type error...

@mendyEdri mendyEdri requested a review from Inbal-Tish June 8, 2021 14:31
@Inbal-Tish
Copy link
Collaborator

@mendyEdri Resolve conflicts and merge please.

@mendyEdri mendyEdri merged commit 05b9bc9 into master Jun 9, 2021
@mendyEdri mendyEdri deleted the typescript/FeatureHighlight branch June 10, 2021 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants