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 preview of components to documentation website #175

Merged
merged 18 commits into from
Dec 8, 2023

Conversation

frankieroberto
Copy link
Contributor

@frankieroberto frankieroberto commented Dec 1, 2023

This lets you see what each component looks like, as well as the code to generate it, in a similar way to the GOV.UK Design System website and GOV.UK Component for Ruby on Rails website.

Screenshots

Before

Screenshot 2023-12-01 at 12 50 59

After

Screenshot 2023-12-01 at 12 50 30

Copy link
Contributor

@paulrobertlloyd paulrobertlloyd 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 God’s work @frankieroberto! Thanks for taking it on. Left a few initial comments, will wait until these and the other todo items are done before taking a closer look.

P.S. Guess we’re gunna need a homepage illustration, huh? 😊

docs/eleventy.config.js Outdated Show resolved Hide resolved
docs/examples/masthead.njk Outdated Show resolved Hide resolved
docs/examples/autocomplete.njk Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Show resolved Hide resolved
@@ -0,0 +1,30 @@
{
Copy link
Contributor

@paulrobertlloyd paulrobertlloyd Dec 1, 2023

Choose a reason for hiding this comment

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

Do we need a separate package.json for the docs? On the other projects we add dev dependencies and scripts for building/previewing the docs to the package.json in the root. Probably simpler.

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, the current GitHub Actions workflow will look for a npm run build in that package to deploy the site to GitHub pages.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was assuming we’d have a separate package.json and update the build script. I think they need to be separate as a package can’t depend on itself?

docs/index.md Outdated Show resolved Hide resolved
docs/eleventy.config.js Outdated Show resolved Hide resolved
@paulrobertlloyd paulrobertlloyd added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 1, 2023
@paulrobertlloyd
Copy link
Contributor

As to resizing iframes, I think the GOV.UK docs use https://github.com/davidjbradshaw/iframe-resizer

@frankieroberto
Copy link
Contributor Author

@paulrobertlloyd thanks for the first look. I've addressed most of the comments, but still need to figure out why the autocomplete isn't working (any ideas?) and how to get iframe-resizer working (can't immediately see how to add javascript to the govuk-eleventy-plugin).

@paulrobertlloyd paulrobertlloyd force-pushed the add-previews-of-components-to-docs-site branch from f92a74b to 82f1856 Compare December 8, 2023 15:14
@paulrobertlloyd paulrobertlloyd force-pushed the add-previews-of-components-to-docs-site branch from 3eab317 to 3734c10 Compare December 8, 2023 19:51
@frankieroberto frankieroberto marked this pull request as ready for review December 8, 2023 19:52
@frankieroberto frankieroberto changed the title Draft: Add preview of components to documentation website Add preview of components to documentation website Dec 8, 2023
@paulrobertlloyd paulrobertlloyd force-pushed the add-previews-of-components-to-docs-site branch from 3734c10 to 12a7d1e Compare December 8, 2023 19:57
Copy link
Contributor

@paulrobertlloyd paulrobertlloyd left a comment

Choose a reason for hiding this comment

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

Done with my fiddling, and got it working with one package.json and so similar set up to its sister project repos.

Feel free to squash and merge!

@frankieroberto frankieroberto merged commit 9bc42ed into main Dec 8, 2023
2 checks passed
@frankieroberto frankieroberto deleted the add-previews-of-components-to-docs-site branch December 8, 2023 20:50
paulrobertlloyd added a commit that referenced this pull request Dec 8, 2023
This lets you see what each component looks like, as well as the code to generate it.

---------

Co-authored-by: Paul Robert Lloyd <[email protected]>
@paulrobertlloyd paulrobertlloyd added this to the v3.0 milestone Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include a preview of the components with the documentation website
2 participants