-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Internal link component [Issue #1737] #1753
Conversation
Tried to commit a design alternative but not sure it worked... Bearing in mind, we want to make sure it's clear to users that they're navigating to another page within the current site but we don't want the design to dominate the glossary entries. Regarding the copy length... I'm against imposing strict character limits or truncation. Instead we may just need to be very careful to craft as short a description as we can that is still helpful. I can definitely help with this. |
Co-Authored-By: ryancreatescopy <ryancordell@virginmedia.com>
On mobile screens, large links without wrap-points are forcing layout to be too wide for screen. This shortens the link names being rendered to only include the last folder name of the path (ie. `/en/developers/docs/accounts/#types-of-account` will only show `/accounts/` on mobile)
Screenshots as of b458d28@samajammin @ryancreatescopy This may be ready for review if you're comfortable with the length of the descriptions being used (this could always be addressed later in another PR) |
Just want to throw some alternatives into the mix. Do you think we need to actually show a page description? Or should the title be descriptive enough for these purposes? Have we overthought this and perhaps it'd just be simpler to do emoji + title + arrow... Just wanted to raise these before we decide and merge something... |
@ryancreatescopy Hm... The description also adds some complexity in terms of the manual trimming required, and it's static so if the MD file it links to changes, the link will no longer match. And alternative here would be what we kinda already discussed, which would be truncating the description maybe to one line and add an ellipsis (...) at the end? That being said, I think my honest favorite of the options so far would be that last one: I think the one with two icons gives a feeling like each line links to something different... and I kinda like including the path with the name, it very clearly feels like an internal link that won't take them too far. |
I tend to agree, I think adding a description w/ every link is a bit unnecessary, especially if it's something that must be added manually. IMO I think linking to the page w/ ("More on [topic]...") is sufficient. I don't think displaying the path adds much value, given that we already clearly delineate internal vs external links w/ the arrow icon. |
@samajammin Would you suggest using this option then? ...or just ditching the component idea entirely and leaving the regular text links as they were? |
Either works for me, happy to differ to you & @ryancreatescopy. |
That means you @ryancreatescopy ! haha (I prefer the look of the component... "buttons" always seem so much more enticing to click hah) |
@samajammin @wackerow let's go with the page emoji and arrow option. I think this makes them more noticeable and would also work really well in the developer docs. To help advertise related pages, e.g. on the consensus mehanisms page. I'd imaging using DocLink component to advertise PoS and PoW pages. |
Removed `Description` prop. condensed component into page-curl emoji, a title and a right arrow, clickable as a link. Intented to be reusable elsewhere on website (uses theming, and no margins cooked in by default). Updated glossary index to remove all "description" arguments.
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.
Looks great! Thanks again @wackerow!
@wackerow one minor issue I'm noticing - it appears the entire card is not clickable. See video: Ideally the entire component would have the hover effect & link when someone mouses over it. |
@samajammin Got it, good catch... I'll fix this in a separate PR 👍 |
Description
First draft: This adds a component, currently called
DocLink
that takes propsto
,title
anddescription
and renders astyled(Link)
container with the title/description.Screenshots with light/dark mode, and link hover-over
(View Netlify for this PR: /en/glossary/)
To discuss/decide/do
Note- This was created as a branch off dev prior to the other glossary update PRs #1724 and #1725 being merged.
Labeled this as draft til we sort out above details, and figured after the other glossary PRs merge in I can fix any conflicts that this causes, and fix any terms missing here. Wanted to get something up for you guys to be able to review though, let me know what you think.
Related Issue
#1737