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

Moving component descriptions into <Lede> removes descriptions from /components page #10364

Closed
yurm04 opened this issue Sep 7, 2023 · 1 comment · Fixed by #10377
Closed
Assignees

Comments

@yurm04
Copy link
Contributor

yurm04 commented Sep 7, 2023

Removing description from the component page metadata and using it directly in the <Lede>, we lose all the information on the /components root page. Imo it makes the page a bit inconsistent with the other ones that include descriptions on the grid (i.e., patterns page). This is not the intended outcome and we will need to re-add the descriptions to the /components url

Originally posted by @laurkim in #10214 (review)

Issue
Screenshot 2023-09-07 at 2 51 06 PM

Original
Screenshot 2023-09-07 at 2 51 27 PM

@jesstelford
Copy link
Contributor

I'm wondering if the long descriptions are the correct ones to show on the preview cards?

I've seen this in other places too; the long description doesn't show enough information before it's truncated, effectively making it useless 🤔 There's also the issue with markdown; the description can contain arbitrary markdown which is why it's been pushed into the content instead of the frontmatter, but I think it makese more sense to have plain text in the preview cards.

We've already got a mechanism/types for setting a specific seoDescription in the frontmatter which will override the description frontmatter or firstParagraph auto generated value. Should we perhaps add a shortDescription option also?

That'd be a lot of work to write a short description for every component, so in the mean time I'll look at leveraging the seoDescription to get it showing on the preview cards.

@jesstelford jesstelford self-assigned this Sep 7, 2023
yurm04 pushed a commit that referenced this issue Sep 8, 2023
Fixes #10364

Removing more unnecessary route handlers now that we have generic MDX
rendering on `pages/[...slug]` 🎉

Also picked up a couple little fixes (as seperate commits in this PR)
along the way.

`/components`
<img width="581" alt="Screenshot 2023-09-08 at 4 34 23 pm"
src="https://github.com/Shopify/polaris/assets/612020/849e5832-e49e-422d-8d1b-b2811fe98de9">

`/components/<category>`
<img width="586" alt="Screenshot 2023-09-08 at 4 34 43 pm"
src="https://github.com/Shopify/polaris/assets/612020/c741dfcf-6b8a-4f15-82aa-d51c612b47f3">
@yurm04 yurm04 closed this as completed Sep 11, 2023
sophschneider pushed a commit that referenced this issue Sep 19, 2023
Fixes #10364

Removing more unnecessary route handlers now that we have generic MDX
rendering on `pages/[...slug]` 🎉

Also picked up a couple little fixes (as seperate commits in this PR)
along the way.

`/components`
<img width="581" alt="Screenshot 2023-09-08 at 4 34 23 pm"
src="https://github.com/Shopify/polaris/assets/612020/849e5832-e49e-422d-8d1b-b2811fe98de9">

`/components/<category>`
<img width="586" alt="Screenshot 2023-09-08 at 4 34 43 pm"
src="https://github.com/Shopify/polaris/assets/612020/c741dfcf-6b8a-4f15-82aa-d51c612b47f3">
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this issue Apr 22, 2024
…#10377)

Fixes Shopify#10364

Removing more unnecessary route handlers now that we have generic MDX
rendering on `pages/[...slug]` 🎉

Also picked up a couple little fixes (as seperate commits in this PR)
along the way.

`/components`
<img width="581" alt="Screenshot 2023-09-08 at 4 34 23 pm"
src="https://github.com/Shopify/polaris/assets/612020/849e5832-e49e-422d-8d1b-b2811fe98de9">

`/components/<category>`
<img width="586" alt="Screenshot 2023-09-08 at 4 34 43 pm"
src="https://github.com/Shopify/polaris/assets/612020/c741dfcf-6b8a-4f15-82aa-d51c612b47f3">
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 a pull request may close this issue.

2 participants