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(simpleList): rename isCurrent to isActive #186

Conversation

wise-king-sullyman
Copy link
Collaborator

Closes #133

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.

Looks good. It's done the same way in several areas but I'm wondering if we should provide a default message for renameProp. Otherwise only use renameProps (even if only a single rename in it like is done in chartVoronoiContainer-remove-allowTooltip) as it already provides default messages. Would remove duplicate or inconsistent verbiage.

Many of the places where singular renameProp is used is to provide a custom message on purpose - see accordion-remove-noBoxShadow for example. Might make sense to allow a message prop (even in renameProps) and allow that to override the default if necessary... but always provide the default.

Added a separate issue to address: #187

@wise-king-sullyman
Copy link
Collaborator Author

wise-king-sullyman commented Jan 3, 2023

@gitdallas agree, I think it would be beneficial to do one of those. Not sure what the better approach would be off the top of my head though.

Along a similar line of thinking, while I wrote this I debated throwing together a generator or something to do the standard 1 component, 1 prop name being changed codemod like we have here. I figure this format will be pretty common and can probably be at least 99% automated in most cases. WDYT?

@gitdallas
Copy link
Contributor

@wise-king-sullyman if i understand you correctly, that already exists. https://github.com/patternfly/pf-codemods/blob/master/generate.js

@wise-king-sullyman
Copy link
Collaborator Author

wise-king-sullyman commented Jan 4, 2023

@gitdallas that's similar, but not as specific. I whipped together a version of what I was thinking of here: #190

It would be for these basic single component 1:1 prop replacements specifically, which seem somewhat common. Though maybe it's a bit too specific to be all that useful.

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.

Just some conflicts to resolve but otherwise looks good! Would be worth placing the section in the README alphabetically as part of resolving those

@thatblindgeye thatblindgeye merged commit f352983 into patternfly:main Jan 9, 2023
@wise-king-sullyman wise-king-sullyman deleted the simpleList-remove-isCurrent branch January 9, 2023 14:02
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.

SimpleList: Replace prop isCurrent with isActive
3 participants