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(docs): Add custom content for sketchy preset demo #1236

Merged
merged 19 commits into from Jan 30, 2022

Conversation

atanasster
Copy link
Collaborator

issue #1128

sites:
before: https://theme-ui.com/presets/sketchy
now: https://theme-ui-draft.netlify.app/presets/sketchy

Copy link
Member

@hasparus hasparus left a comment

Choose a reason for hiding this comment

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

Hey atanasster! Thanks for the PR!

image

I think borders and buttons don't really make sense for most of the presets, because they don't have variants.

I wouldn't say that beerose's components.mdx was meant to be rendered with different presets.
image

@hasparus
Copy link
Member

hasparus commented Nov 5, 2020

Instead of one size fits all solutions like we have right now, I think we should allow presets to affect how their docs are displayed. We already have one size fits all right now.

I had mentioned a few ideas in the issue you linked.

Expected behavior

  • (minimum) Theme UI docs should dynamically fetch fonts for presets.
  • (would be nice) Theme UI docs could link to external preset's own docs with a Message at the top of the page?
  • (would be awesome) Presets could declare an MDX or JS file to be rendered in the docs?

@atanasster
Copy link
Collaborator Author

@hasparus thanks for the feedback, a few changes:

  • the JSON text area is now outside of the theme provider.
  • all the 'variants' components are now dynamically displayed depending on the theme:
    1. borders
    2. buttons
    3. badges
    4. alerts

example with borders variants: https://theme-ui-draft.netlify.app/presets/sketchy
example no borders variants: https://theme-ui-draft.netlify.app/presets/swiss

@lachlanjc lachlanjc linked an issue Dec 2, 2020 that may be closed by this pull request
@lachlanjc lachlanjc added the affects-docs Changes affect documentation, but not only documentation label Dec 2, 2020
@hasparus hasparus closed this Dec 14, 2020
@hasparus hasparus deleted the branch system-ui:develop December 14, 2020 08:53
@hasparus hasparus reopened this Dec 14, 2020
@vercel
Copy link

vercel bot commented Dec 14, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/systemui/theme-ui/AYuaxEn3bmGDR58un5znWb5Z4ee1
✅ Preview: https://theme-ui-git-fork-atanasster-preset-sketchy-sty-e43ba7-systemui.vercel.app

Copy link
Member

@lachlanjc lachlanjc left a comment

Choose a reason for hiding this comment

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

This is a great improvement! A few little things to go. Also, not sure if this is an issue with the preset or the docs, but two buttons aren't using the right font on iOS:

image

CHANGELOG.md Outdated Show resolved Hide resolved
packages/docs/src/components/components.mdx Outdated Show resolved Hide resolved
packages/docs/src/components/components.mdx Outdated Show resolved Hide resolved
packages/docs/src/components/components.mdx Outdated Show resolved Hide resolved
@lachlanjc
Copy link
Member

This is looking great! Are these borders supposed to look different though?
image

@lachlanjc
Copy link
Member

@hasparus Any issue with merging this as-is? I think it’s providing a better experience for the sketchy docs than we currently are:

Screenshot

Before: https://theme-ui.com/demo
After: https://theme-ui-ldlav21vx.vercel.app/demo

@lachlanjc lachlanjc changed the title Preset sketchy style guide feat(docs): Add custom content for sketchy preset demo Oct 27, 2021
@lachlanjc
Copy link
Member

@hasparus ping on opinions here?

@hasparus
Copy link
Member

🚀 PR was released in v0.14.0 🚀

@hasparus hasparus added the released This issue/pull request has been released. label Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes only affect the documentation released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preset sketchy docs don't show its fonts and components.
3 participants