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

De-dupe with the fully qualified function name #315

Merged
merged 8 commits into from May 8, 2023

Conversation

pmecho
Copy link
Contributor

@pmecho pmecho commented Apr 5, 2023

This adds the fully qualified name (package + class name + function name) to the de-duplication strategy to support showkase components with the same group/component name/style name. This is useful when creating custom browsers where additional categorization is made via the new tags or extraMetadata fields that were added with #309.

@pmecho pmecho requested a review from vinaygaba April 5, 2023 01:05
if (it.componentIndex != null) {
"${it.showkaseName}_${it.showkaseGroup}_${it.showkaseStyleName}_${it.componentIndex}"
"${it.fqPrefix}_${it.showkaseName}_${it.showkaseGroup}_${it.showkaseStyleName}_${it.componentIndex}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

we already do the ${it.packageName}_${it.enclosingClassName}_${it.elementName} dedpuing above. Why do we need to do it again here 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vinaygaba If I don't include it here as well it will remove ones that only differ by tags or extraMetadata. I tried to change this to do them in one distinctBy step but that messed up where a @Preview annotation has the same group/style as the @ShowkaseComposable annotation so I left it as two steps.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see!

Copy link
Collaborator

@vinaygaba vinaygaba left a comment

Choose a reason for hiding this comment

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

LGTM

@vinaygaba vinaygaba merged commit 4a09e3f into master May 8, 2023
6 checks passed
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.

None yet

2 participants