-
Notifications
You must be signed in to change notification settings - Fork 50
Unify "Link/LinkTo::Standalone" component (04) #227
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
Unify "Link/LinkTo::Standalone" component (04) #227
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d41acff to
abd2aac
Compare
c679647 to
506ef09
Compare
6adf95c to
95f9a5c
Compare
92b39ce to
8c8e2ce
Compare
|
@alex-ju @MelSumner @Dhaulagiri can you review also this one? thanks |
…ency with other tests
|
Assuming the 'Interactive' component makes its way in, I agree these two shall be merged. Couldn't spot anything off in the code. |
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 think we should consider not removing components until we're sure of the unified interactive component approach. WDYT?
OK for me. In any case, this PR is branched from the |
📌 Summary
Now that we have a single
interactiveelement that handles both the normal<a>links and the<LinkTo>links, there's no reason why we should keep separate the "standalone" link in two distinct components, we can use the same method (@hrefvs@route) to detect which one is needed, using the underlyingHds::Interactivecomponent that does all the work for us.This will also simplify the adoption of the component in the consumers codebases, and its documentation.
Notice: even if under the hood it's using the
Hds::Interactivecomponent, thisHds::Link::Standalonecan’t be used as a button, because there’s an assertion thrown if nor@routenor@hrefare passed as arguments.🛠️ Detailed description
In this PR I have:
LinkTo::Standalonecomponent from the codebaseLink::Standaloneto use the newinteractivegeneric componentLink::StandaloneandLinkTo::Standaloneuse cases👀 How to review
👉 Review by files changed
Reviewer's checklist:
💬 Please consider using conventional comments when reviewing this PR.