Skip to content

Quickstart button: explicit launch wording#1677

Merged
sarah11918 merged 5 commits into
mainfrom
quickstart-button
Oct 10, 2022
Merged

Quickstart button: explicit launch wording#1677
sarah11918 merged 5 commits into
mainfrom
quickstart-button

Conversation

@sarah11918
Copy link
Copy Markdown
Member

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!

@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 2, 2022

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit e8c90e9
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/63444219e33efe0008026212
😎 Deploy Preview https://deploy-preview-1677--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sarah11918 sarah11918 added site improvement Some thing that improves the website functionality - ask @delucis for help! hacktoberfest-accepted Mark a PR as accepted to contribute towards Hacktoberfest labels Oct 2, 2022
@Jutanium
Copy link
Copy Markdown
Contributor

Jutanium commented Oct 4, 2022

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!

@sarah11918
Copy link
Copy Markdown
Member Author

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.

Comment thread src/pages/en/getting-started.md Outdated
Comment thread src/components/Button.astro Outdated

<span class:list={[`link pixel variant-${variant}`, className]} {style}>
<a {href}>
<a {href} target="_blank">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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? 😅

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@Jutanium Jutanium Oct 5, 2022

Choose a reason for hiding this comment

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

Gotcha, this makes sense, and matching Astro.new is probably a good thing.

Comment thread src/components/Button.astro Outdated
@sarah11918
Copy link
Copy Markdown
Member Author

Merging with the explicit wording. Reversion PRs are freeee.....

@sarah11918 sarah11918 changed the title Quickstart button: launch in new window Quickstart button: explicit launch wording Oct 10, 2022
@sarah11918 sarah11918 merged commit d1bb883 into main Oct 10, 2022
@sarah11918 sarah11918 deleted the quickstart-button branch October 10, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Mark a PR as accepted to contribute towards Hacktoberfest site improvement Some thing that improves the website functionality - ask @delucis for help!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants