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

Throw an error if a showcase image does not have the required dimensions #2573

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

delucis
Copy link
Member

@delucis delucis commented Nov 4, 2024

Description

  • This PR adds a validation to our showcase card component to ensure passed images have the expected dimensions.
  • We often get images submitted that do not have the required dimensions and contributors don’t get any feedback about this until we review the PR. The aim here is that they will get local dev errors if previewing the site, or failing that, CI failures when they open the PR. It will also help PR reviewers spot the issue more easily.
  • There is currently one image that has the wrong dimensions. Will resize it in a subsequent commit so we can see this fail once in this PR.

Copy link

changeset-bot bot commented Nov 4, 2024

⚠️ No Changeset found

Latest commit: c6b320e

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@github-actions github-actions bot added the 📚 docs Documentation website changes label Nov 4, 2024
Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit c6b320e
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/6728ce57828b980008653b6d
😎 Deploy Preview https://deploy-preview-2573--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Nov 4, 2024

size-limit report 📦

Path Size
/index.html 6.15 KB (-0.02% 🔽)
/_astro/*.js 22.37 KB (0%)
/_astro/*.css 13.73 KB (0%)

Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

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

Beautiful 🤩

image

@delucis delucis merged commit c82587f into main Nov 4, 2024
15 checks passed
@delucis delucis deleted the chris/showcase-error branch November 4, 2024 18:17
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Nov 6, 2024
* main: (82 commits)
  i18n(ja): Update site-search.mdx (withastro#2577)
  i18n(ja): Update pages.mdx (withastro#2576)
  i18n(fr): Update `reference/plugins.mdx` from withastro#2549 (withastro#2574)
  [ci] format
  docs: update showcase-sites.astro (withastro#2562)
  Throw an error if a showcase image does not have the required dimensions (withastro#2573)
  i18n(ja): Update frontmatter.md (withastro#2566)
  Fixes import name typo in Customize icons example (withastro#2572)
  [ci] release (withastro#2570)
  Prettier ignore a malformed YAML test file (withastro#2571)
  Add YAML support to the FS translation system (withastro#2565)
  i18n(ja): Update reference/icons.mdx (withastro#2564)
  i18n(ja): Update overrides.md (withastro#2567)
  i18n(zh-cn): Update `plugins.mdx` (withastro#2568)
  i18n(ja): Update customization.mdx (withastro#2560)
  i18n(ja): Update css-and-tailwind.mdx (withastro#2559)
  i18n(ru): update `icons.mdx` and `overrides.md` (withastro#2558)
  i18n(ru): update `i18n.mdx` and `overriding-components.mdx` (withastro#2557)
  i18n(ko-KR): update `plugins.mdx` (withastro#2556)
  i18n(ru): update `plugins.mdx` (withastro#2555)
  ...
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Nov 11, 2024
* main: (27 commits)
  i18n(ko-KR): update `site-search.mdx`
  [ci] release (withastro#2590)
  Support passing more options to the DocSearch component (withastro#2589)
  [ci] release (withastro#2587)
  Add changeset for withastro#2252 (withastro#2588)
  [ci] format
  Update dev dependencies (withastro#2582)
  Build performance optimizations for projects with large sidebars (withastro#2252)
  Fix a11y CI workflow (withastro#2503)
  Update `astro-expressive-code` to v0.38 (withastro#2551)
  Added social icon for Nostr (withastro#2579)
  [ci] format
  docs(showcase): add docs.reactbricks.com to showcase (withastro#2586)
  i18n(ja): Update site-search.mdx (withastro#2577)
  i18n(ja): Update pages.mdx (withastro#2576)
  i18n(fr): Update `reference/plugins.mdx` from withastro#2549 (withastro#2574)
  [ci] format
  docs: update showcase-sites.astro (withastro#2562)
  Throw an error if a showcase image does not have the required dimensions (withastro#2573)
  i18n(ja): Update frontmatter.md (withastro#2566)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 docs Documentation website changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants