-
Notifications
You must be signed in to change notification settings - Fork 15
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
[Fix] Move LanguageMenu to core #490
Conversation
And to help possible future changes to naming of class names.
export interface LanguageMenuLinkLanguageProps extends LanguageMenuLinkProps { | ||
export interface LanguageMenuItemProps extends LanguageMenuItemBaseProps { |
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.
It seems that GitHub shows wrong files in the compare, because of the folder structure change and rename. Also same case with the LanguageMenuLink
file below.
LanguageMenuItemLanguage, | ||
LanguageMenuItemLanguageProps, | ||
LanguageMenuLinkLanguage, | ||
LanguageMenuLinkLanguageProps, |
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.
These are no longer exported as those can be used directly from LanguageMenuItem, LanguageMenuItemProps
and LanguageMenuLink, LanguageMenuLinkProps
.
export type LanguageMenuPopoverItemsProps = | ||
| LanguageMenuItemBaseProps | ||
| LanguageMenuLinkPropsWithType; | ||
type OptionalLanguageMenuPopoverProps = { |
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.
This could probably be written as Partial, but should not make any difference if left as is.
Looks good! This component could be simplified further, because it supports unnecessary use cases like custom props and components as pros instead of using composition. These improvements should be implemented later on as a separate PR, but I decided to comment here anyways. |
Tested with all Mac OS setups (SSR test project, CRA-TS, Styleguidist and DS-site) using Brave, Safari, Firefox and Edge with VO on. Seems to be working as expected. |
Description
This PR is continuing the job done in #488.
Motivation and Context
Removing the components levels abstraction will remove unwanted complexity. This will possibly increase the speed of making changes or new features.
How Has This Been Tested?
Locally in styleguidist and in CRA-TS project.
Release notes
Breaking changes
LanguageMenuItemLanguage, LanguageMenuItemLanguageProps, LanguageMenuLinkLanguage, LanguageMenuLinkLanguageProps
removed. UseLanguageMenuItem, LanguageMenuItemProps, LanguageMenuLink, LanguageMenuLinkProps
instead.languageItem, LinkLanguage
removed fromLanguageMenu
. UseLanguageMenuItem
orLanguageMenuLink
instead.