Skip to content
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

Add copy CLI command buttons to templates #75

Merged
merged 22 commits into from
Nov 22, 2024
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented Nov 21, 2024

This PR adds a “Copy CLI command” button to each template on astro.new to make it easier to run create astro for a specific template (instead of opening in a web IDE).

Closes #70
Closes DX-1474

Looks like this:

card component with a screenshot, large title text, a small source code link with GitHub icon, a small copy CLI command butonn with clipboard icon, and a large blue-purple Open in StackBlitz button

(The first relevant commit is f19fb40 — the others are still left over from #74)

Tested in Chrome, Firefox & Safari on macOS, and Firefox Android.

Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for astro-new ready!

Name Link
🔨 Latest commit 26a4256
🔍 Latest deploy log https://app.netlify.com/sites/astro-new/deploys/674077746b1ea4000882ddce
😎 Deploy Preview https://deploy-preview-75--astro-new.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 configuration.

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Works for me @delucis ! I tried the copy button on a handful of the repos, including some of the other tabs, and the command worked every time for me! 💪

@HiDeoo
Copy link
Member

HiDeoo commented Nov 21, 2024

Won't have time to make a full suggestion before T&D, but wanted to mention that the announcement is not great at the moment, e.g. this demo using VoiceOver with a duplicated label and the useless image.

demo.mp4

@delucis
Copy link
Member Author

delucis commented Nov 21, 2024

Won't have time to make a full suggestion before T&D, but wanted to mention that the announcement is not great at the moment, e.g. this demo using VoiceOver with a duplicated label and the useless image.

Thank you! Was different for me when testing with VoiceOver in Chrome, but I did change some small details since then, so maybe it changed.

@delucis
Copy link
Member Author

delucis commented Nov 21, 2024

OK, at least added aria-hidden="true" to the icons. I confirmed this was an issue in Firefox (not in Chrome for me) with the useless “image” announcement. I’d forgotten astro-icon doesn’t do that by default.

Other icon usage on the site needs this too, but I see a few other a11y issues like that, so will tackle that in a separate PR.

Edit: #77 addresses many accessibility issues, including icons in the accessibility tree.

@delucis delucis merged commit ef07e53 into main Nov 22, 2024
5 checks passed
@delucis delucis deleted the chris/template-copy branch November 22, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add create astro --template commands to dropdown
3 participants