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

feat(examples): New basics template #12472

Merged
merged 12 commits into from
Nov 22, 2024
Merged

feat(examples): New basics template #12472

merged 12 commits into from
Nov 22, 2024

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Nov 18, 2024

Changes

This updates the design of the basics template for Astro 5. It aims to provide a mix between the old basics and minimal templates, so that it's easy for someone to take the basics, remove a few things easily and get minimal.

Looks like this
image

Testing

Tested manually

Docs

N/A. Docs doesn't seem to describe this template as far as I can tell.

@github-actions github-actions bot added pkg: example Related to an example package (scope) pkg: astro Related to the core `astro` package (scope) labels Nov 18, 2024
Copy link

changeset-bot bot commented Nov 18, 2024

⚠️ No Changeset found

Latest commit: 4effcbf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -4,5 +4,3 @@
export { default as Code } from './Code.astro';
// @ts-ignore
export { default as Debug } from './Debug.astro';
// @ts-ignore
export { default as Welcome } from './Welcome.astro';
Copy link
Member Author

Choose a reason for hiding this comment

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

It moved it back into the template for multiple reasons:

  • You can't import from astro:components a component that has styles defined the "Astro way", you cause styles to leak everywhere
  • Inside Astro, you could check out the code, but not modify it, which feels like pedagogically it was a downgrade

Copy link
Member

@bluwy bluwy Nov 21, 2024

Choose a reason for hiding this comment

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

FWIW (and perhaps you already know) for no1, I think is:inline can be used to avoid that, unless I miss something that requires processing the styles.

@Princesseuh Princesseuh marked this pull request as ready for review November 20, 2024 14:00
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Ugh. Forgot to hit send on a couple of comments. May well be out of date now…

examples/basics/src/components/Welcome.astro Outdated Show resolved Hide resolved
examples/basics/src/components/Welcome.astro Outdated Show resolved Hide resolved
Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Spotted a few issues, but it’s looking great @Princesseuh!

examples/basics/src/assets/astro.svg Outdated Show resolved Hide resolved
examples/basics/src/components/Welcome.astro Show resolved Hide resolved
examples/basics/src/components/Welcome.astro Outdated Show resolved Hide resolved
@Princesseuh Princesseuh requested a review from delucis November 20, 2024 18:49
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Tested on Safari and looks great!

@kyr0
Copy link
Contributor

kyr0 commented Nov 22, 2024

Beautiful! :)

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Looks really pretty! Tested by opening this branch with StackBlitz in various browsers and testing it out.

Looked as expected in Safari and Firefox on macOS and in Firefox Android. Even on FF Android I didn’t see the issues I usually associate with heavy blurs (probably helped by the fact stuff doesn’t really have to scroll in this template).

On smaller screens (like my phone), the “What’s new in Astro 5.0” card can cover the CTA buttons, but I don’t know how much that matters (screenshot below). The buttons themselves look great on mobile now! 🙌

new basics template in a very small viewport so that UI elements overlap

@Princesseuh Princesseuh merged commit a326c2f into next Nov 22, 2024
14 checks passed
@Princesseuh Princesseuh deleted the feat/new-basics branch November 22, 2024 21:47
@delucis delucis mentioned this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants