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

[Link] Refinement #14162

Merged
merged 3 commits into from Jan 13, 2019
Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jan 12, 2019

I think that we can announce the release of this component in the next v3.9.0 release.

@oliviertassinari oliviertassinari added new feature New feature or request component: link This is the name of the generic UI component, not the React module! labels Jan 12, 2019
@@ -206,6 +206,7 @@ class AppFrame extends React.Component {
color="inherit"
aria-label="Edit docs colors"
component={Link}
naked
Copy link
Member Author

Choose a reason for hiding this comment

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

Remove the dependency on the CSS injection order.

capture d ecran 2019-01-12 a 13 14 20

* The target of the link. You can read about this property on the
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes)
*/
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Didn't we decide anyway that we don't validate DOM attributes?

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you mean by we don't validate DOM attributes? Oh yeah. We don't need to document it. It's making the component lighter :).

Copy link
Member

Choose a reason for hiding this comment

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

What I mean by this is that we don't validate props that we simply forward.

target is valid DOM attribute for a elements just not button. So the validation was correct for the default case but not if component="button" was used. The validator mentioned this explicitly "Attribute target not allowed on element button at this point.".

Oh and we need to remove the default value for target: https://github.com/mui-org/material-ui/blob/dfff366df7b83b26b2ab6cc169e51184742d043b/packages/material-ui/src/Link/Link.js#L143

@oliviertassinari oliviertassinari added this to the v3.9.0 milestone Jan 12, 2019
docs/src/pages/style/links/links.md Outdated Show resolved Hide resolved
docs/src/pages/style/links/links.md Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari merged commit c9cdd08 into mui:master Jan 13, 2019
@oliviertassinari oliviertassinari deleted the link-refinement branch January 13, 2019 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: link This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants