Skip to content

ColorPicker style prop deprecation #2444

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 8 commits into from
Feb 9, 2023

Conversation

adids1221
Copy link
Contributor

Description

ColorPicker style prop deprecation.

Changelog

ColorPicker style prop deprecation.

super(props);

if (props.style) {
LogService.warn('UILib ColorPicker style prop is deprecated.');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
LogService.warn('UILib ColorPicker style prop is deprecated.');
LogService.warn('UILib ColorPicker style prop is deprecated. Please stop using it.');

Copy link
Collaborator

Choose a reason for hiding this comment

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

You should also tell the user what to do, otherwise, they will ask if there is another prop that replaces it etc.


state = {
show: false
};

static defaultProps = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We keep the statics up after the static displayName

@adids1221 adids1221 requested a review from Inbal-Tish February 2, 2023 08:58
@adids1221 adids1221 requested a review from Inbal-Tish February 2, 2023 09:58
{"name": "style", "type": "ViewStyle", "description": "Component's style"},
{"name": "testID", "type": "string", "description": "The test id for e2e tests"}
{"name": "testID", "type": "string", "description": "The test id for e2e tests"},
{"name": "backgroundColor", "type": "string", "description": "Give the ColorPicker a background color"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change "Give the ColorPicker a background color" to "The ColorPicker's/Component's background color"

@adids1221 adids1221 requested a review from Inbal-Tish February 6, 2023 11:36
@@ -38,7 +38,8 @@
{"name": "containerWidth", "type": "number", "description": "The container margins"},
{"name": "containerStyle", "type": "ViewStyle", "description": "Component's container style"},
{"name": "style", "type": "ViewStyle", "description": "Component's style"},
{"name": "testID", "type": "string", "description": "The test id for e2e tests"}
{"name": "testID", "type": "string", "description": "The test id for e2e tests"},
{"name": "backgroundColor", "type": "string", "description": "The ColorPalette background color"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
{"name": "backgroundColor", "type": "string", "description": "The ColorPalette background color"}
{"name": "backgroundColor", "type": "string", "description": "The ColorPalette's background color"}

@@ -54,7 +54,7 @@ interface Props {
style?: StyleProp<ViewStyle>;
testID?: string;
/**
* Give the ColorPalette a background color
* Give the ColorPalette background color
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* Give the ColorPalette background color
* The ColorPicker's background color

super(props);

if (props.style) {
LogService.warn(`UILib ColorPicker style prop is deprecated, please pass instead the 'backgroundColor' prop.`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
LogService.warn(`UILib ColorPicker style prop is deprecated, please pass instead the 'backgroundColor' prop.`);
LogService.warn(`UILib ColorPicker's 'style' prop is deprecated. You can use the 'backgroundColor' prop instead`);

@Inbal-Tish Inbal-Tish merged commit 88e7e8d into master Feb 9, 2023
@adids1221 adids1221 deleted the infra/ColorPicker_style_deprecation branch March 6, 2023 09:04
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