-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat(Menu): updated markup for MenuItemAction #590
Conversation
There was a problem hiding this 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" && |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
8ed6f61
to
25b2448
Compare
Closes #589