Closed vaporwavie closed 2 months ago
@beatrizmilhomem, and @davicostalf... Can you take a look at this? Did you see this same behavior on other Admin applications?
@davicostalf I still haven't seen other scenarios like this. Maybe a tertiary button would work in this scenario 🤔
@renatamottam you explored using the tertiary button, right?
I still haven't seen other scenarios like this.
Neither did I.
I did some testing, we can compare it here:
Some potential improvements using this Anchor
component:
max-width
for labels with text-ellipsis
at the endI agree the custom link works better here!
@vaporwavie Me, @davicostalf, and @matheusps discussed the issue, and our conclusion was that it doesn't make sense to create a new component or even a variation of the Link
component right now since there are no other application scenarios. But the proposal hasn't been discarded, and it could be interesting to start doing studies about that.
Problem
Currently, Shoreline offers
Link
, which is an agnostic hyperlink handler. It's fantastic and does the job well. My proposal would be also offering a opinionated version calledAnchor
, which would not only be wrapped aroundLink
, but also provide a built-in layout, while allowing the user to customize it even more.Solution
I've wrote a prototype for this Anchor component here. It uses the same design system seen on Faststore Webops, which had its layout recently refined to adequate the same styling seen on Shoreline.
Usage examples
You can also see below how it works on Webops:
https://github.com/user-attachments/assets/2aa942dc-c559-4ad5-b16a-d7aefe0b7c30
Dependencies
no deps
References
This was made together with @renatamottam to guarantee that we'd have the best possible outcome following the provided design system.