Skip to content

Conversation

@jenny-s51
Copy link
Contributor

Closes #203

Copy link
Contributor

@gitdallas gitdallas left a comment

Choose a reason for hiding this comment

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

just a couple little things

const renames = {
Tabs: {
hasSecondaryBorderBottom: "",
hasBorderBottom: "hasNoBorderBottom",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this codemod just rename the hasBorderBottom prop? @gitdallas would this be similar to your comment on the isSVG PR? Just wondering if simply renaming it might cause issues i.e. if someone has passed in hasBorderBottom={false} to remove the borders, would this then update things so that it becomes hasNoBorderBottom={false} and have borders rendered.

Copy link
Contributor

Choose a reason for hiding this comment

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

good catch/point, the boolean value should be flipped. I think we can still do a code fix like below, wdyt? @thatblindgeye

hasBorderBottom => ""
hasBorderBottom={true} => ""
hasBorderBottom={false} => hasNoBorderBottom
hasBorderBottom={someVar} => hasNoBorderBottom{!someVar}

Copy link
Collaborator

Choose a reason for hiding this comment

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

That sounds good to me! I imagine that'd cover the basic use cases of it.

Copy link
Contributor

@gitdallas gitdallas Jan 11, 2023

Choose a reason for hiding this comment

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

started a slack convo regarding these more complex cases in patternfly#pf-devs but for example, the someVar could also be more complex so perhaps may need to be wrapped in () in case it is something like someVar || someOtherVar ... also trying to get a feel for if we should even be taking on these complex situations vs alerting the consumer and asking them to do it themselves.

@jenny-s51 jenny-s51 force-pushed the tabsBorderBottomProps branch 3 times, most recently from 91b8e0c to 636f7f8 Compare January 11, 2023 20:55
Copy link
Contributor Author

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Great catch @thatblindgeye, this is certainly a good start to a larger discussion regarding other instances like this @gitdallas

I've updated this PR with changes that emulate what we did for the renaming of hasBodyPadding within the v4 Wizard component.

Copy link
Contributor

@gitdallas gitdallas left a comment

Choose a reason for hiding this comment

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

this looks good and i've learned some from it. i wonder if we should also consider they might pass a variable or expression other than just true or false.

do you think the below change would handle that well?

@gitdallas gitdallas self-requested a review January 12, 2023 15:08
Copy link
Collaborator

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

🎉 Looks nice! Just needs the conflicts resolved again

@jenny-s51 jenny-s51 force-pushed the tabsBorderBottomProps branch from f50c88d to 7b39e0f Compare January 16, 2023 20:08
PR feedback, update output values

update rule

update readme

add rule

fix error msg

fix error msg

Dallas var names rule logic

Co-authored-by: Dallas <dallas.nicol@gmail.com>

PR feedback from Dallas, adding var names test
@jenny-s51 jenny-s51 force-pushed the tabsBorderBottomProps branch from 7b39e0f to df7dedc Compare January 16, 2023 20:16
@gitdallas gitdallas merged commit 2b9c1cc into main Jan 16, 2023
@jenny-s51 jenny-s51 deleted the tabsBorderBottomProps branch January 16, 2023 20:38
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.

Tabs - border bottom prop updates

5 participants