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(Menu): updated markup for MenuItemAction #590

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

thatblindgeye
Copy link
Collaborator

Closes #589

Copy link
Contributor

@adamviktora adamviktora left a comment

Choose a reason for hiding this comment

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

LPTM (looks perfect to me)!

(one comment bellow, but probably not something we should worry about)

if (
node.specifiers.find(
(specifier) =>
specifier.type === "ImportSpecifier" &&
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking about what if someone imports Patternfly and uses it this way:

import * as PF from '@patternfly/react-core';

<PF.MenuItemAction></PF.MenuItemAction>

I hope nobody does it, I checked the getFromPackage helper and we don't handle this ImportNamespaceSpecifier there either. So if we don't know of any team who would do it, we don't have to worry about it, it would bring too many complications.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah that's an interesting point! I don't think we had any consumers bring this to our attention during the v5 release (@wise-king-sullyman do you recall if we did?), but worth keeping an eye out for with v6 alpha and beta releases

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's in the same realm as the root problem behind #541, IMO it is probably worth us properly handling all of those import cases, but I don't think ironing those edge cases out is worth holding up the alpha release of the mods.

I think TS will be a big help with these kinds of problems, typing getFromPackage made it pretty obvious that we aren't logically setup for all of the potential import declarations.

@wise-king-sullyman wise-king-sullyman merged commit 2fa045b into patternfly:main Feb 28, 2024
0 of 2 checks passed
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.

Menu - updated markup on MenuItemAction
3 participants