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

🚀 feat(stepper): add custom color for stepper #672

Closed
wants to merge 29 commits into from

Conversation

Falkaniere
Copy link
Contributor

JIRA Issue

Description 📄

We add a prop for Stepper receive a custom color.

Platforms 📲

  • Web
  • Mobile

Type of change 🔍

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested? 🧪

  • use a stepper component with color prop.

  • Unit Test

  • Snapshot Test

Checklist: 🔍

  • My code follows the contribution guide of this project Contributing Guide
  • Layout matches design prototype: FIGMA
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Screenshots 📸

Girl in a jacket

@Falkaniere Falkaniere self-assigned this Jul 20, 2023
@Falkaniere Falkaniere marked this pull request as ready for review July 20, 2023 21:22
Falkaniere and others added 9 commits July 25, 2023 15:20
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
return (
<Wrapper>
{labels.map((label, index) => (
<DotWrapper key={label}>
Copy link
Contributor

@MicaelRodrigues MicaelRodrigues Jul 26, 2023

Choose a reason for hiding this comment

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

I know it's rare, but assuming labels are always unique may be a problem, so i would review the component key here.

Suggested change
<DotWrapper key={label}>
<DotWrapper key={`${index}_$({label}`}>

Comment on lines +66 to +67
/** Must be a color from yoga colors. */
secondary: bool,
Copy link
Contributor

@MicaelRodrigues MicaelRodrigues Jul 26, 2023

Choose a reason for hiding this comment

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

Exactly as described in the prop comment, i think this should be a yoga color string, so the component is more flexible :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was talking with @matheushdsbr about this option, the initial approach was to receive a string that could be any yoga color, but after we talk about we decided to keep the component more unflexible. What do you think about it @matheushdsbr ?

Falkaniere and others added 15 commits July 26, 2023 11:00
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
@Falkaniere Falkaniere force-pushed the feat/customColor-stpper-component branch from b0a37a3 to 389e445 Compare July 26, 2023 21:26
Falkaniere and others added 3 commits July 28, 2023 09:45
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
`,
return css`
width: 95px;
margin-top: 10px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
margin-top: 10px;
margin-top: 10px;

font-size: ${stepper.label.font.size}px;
text-align: center;
`,
return css`
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
return css`
return css`

return css`
width: 95px;
margin-top: 10px;
margin-left: -40px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
margin-left: -40px;
margin-left: -40px;

color: ${active
? stepper.label.color[state]
: stepper.label.color.inactive};
font-size: ${stepper.label.font.size}px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
font-size: ${stepper.label.font.size}px;
font-size: ${stepper.label.font.size}px;

width: 95px;
margin-top: 10px;
margin-left: -40px;
color: ${active
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
color: ${active
color: ${active

margin-left: -40px;
color: ${active
? stepper.label.color[state]
: stepper.label.color.inactive};
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Replace ········ with ······

Suggested change
: stepper.label.color.inactive};
: stepper.label.color.inactive};

);

const Label = styled(Text.Bold)(
({
active,
secondary,
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Insert ··

Suggested change
secondary,
secondary,

width: 95px;
margin-top: 10px;
margin-left: -40px;
}) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Insert ··

Suggested change
}) => {
}) => {

margin-top: 10px;
margin-left: -40px;
color: ${active
? stepper.label.color[state]
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Replace ······ with ········

Suggested change
? stepper.label.color[state]
? stepper.label.color[state]

margin-top: 10px;
margin-left: -40px;
color: ${active
? stepper.label.color[state]
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
? stepper.label.color[state]
? stepper.label.color[state]

margin-left: -40px;
color: ${active
? stepper.label.color[state]
: stepper.label.color.inactive};
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Insert ··

Suggested change
: stepper.label.color.inactive};
: stepper.label.color.inactive};

? stepper.label.color[state]
: stepper.label.color.inactive};
font-size: ${stepper.label.font.size}px;
text-align: center;
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
text-align: center;
text-align: center;

width: 95px;
margin-top: 10px;
margin-left: -40px;
}) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
}) => {
}) => {

text-align: center;
`,
return css`
width: 95px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Delete ··

Suggested change
width: 95px;
width: 95px;

: stepper.label.color.inactive};
font-size: ${stepper.label.font.size}px;
text-align: center;
`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Replace ···· with ··

Suggested change
`;
`;

@Falkaniere Falkaniere closed this Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants