Quickstart button: explicit launch wording#1677
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Any instance of the Button will now open in a new tab, and this change makes a lot of sense. The Button component is a fancy link component designed for external links, which should open in a new tab. I like the more explicit copy! I think "Basic template" works just as well if we want a shorter version. Since the header already says "Try Astro in your browser" I don't think we need the "launch". Either way, LGTM! |
|
Thanks, @Jutanium! I'm leaning towards keeping "Launch" for now to make it clear that the template will open and run, not just take you to a GitHub repo. |
|
|
||
| <span class:list={[`link pixel variant-${variant}`, className]} {style}> | ||
| <a {href}> | ||
| <a {href} target="_blank"> |
There was a problem hiding this comment.
In general I’d advise against opening in new windows. It enforces behaviour on users which they can’t easily opt out of and may not expect, whereas it is relatively simple to opt in to opening in a new tab/window if you want it.
This article is helpful in listing some more reasons to avoid this 😅
https://css-tricks.com/use-target_blank/
There was a problem hiding this comment.
Yeah, I know this is good practice in general. I just felt like the explicitness of the button ("Launch me!") made it seem like it was gonna be one of those links that opened in a new tab. (For some reason, I feel the same thing on Astro.new; I really expect that those are going to open in new windows, and I've had to train myself that they don't!)
I guess "not confusing myself" is not a good enough reason to do this? 😅
There was a problem hiding this comment.
Right, I think the overall advice in that article is don't change default behaviour. A user can use cmd/ctrl + click to open in a new tab (or right click etc) if that's what they want but they probably won't (and can't) preemptively make sure to open in the current tab if that's what they want.
There was a problem hiding this comment.
Gotcha, this makes sense, and matching Astro.new is probably a good thing.
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
|
Merging with the explicit wording. Reversion PRs are freeee..... |
In PRs no one asked for....
Experimenting with having the Quickstart button open in a new tab. (I never really liked that it took you away from Docs, especially since sometimes phrases like "Quick start" actually do take you to more docs, not away from docs, and launching an entirely different site.)
Therefore, also changed the wording of the button to be more in line with making it clear that the link was going to open our basic template. And, I think it's a more explicit comparison with "viewing all other templates."
The only downside, being slightly longer, is that on mobile the button and the text are not always going to fit all on one line anymore. In tablet view, (except for the very smallest version of tablet view) it is still all on one line. But, I still like the more explicit description of what the button is going to do, and that it no longer takes you away from docs. Open to thoughts on this!