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 contribution docs on adding component configuration options #3387

Merged
merged 7 commits into from Apr 18, 2024

Conversation

querkmachine
Copy link
Member

I noticed yesterday that, although we've seemingly settled on a method of adding configuration options (including localisation strings) to components, we had only documented how to use the ones we added from an end user's perspective.

Here's some scratchy documentation on how to add new configuration options and guidelines for naming them.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3387 March 16, 2023 15:32 Inactive
@querkmachine querkmachine changed the title First draft of docs on adding component configuration options Add contribution docs on adding component configuration options Mar 16, 2023
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3387 March 21, 2023 10:54 Inactive
@colinrotherham
Copy link
Contributor

@querkmachine
Copy link
Member Author

The documentation here has since fallen out of date with subsequent changes to JavaScript architecture.

As I wasn't involved in those updates and don't particularly have knowledge of what they are, I'm encouraging someone more familiar to update this in my stead. If it doesn't get picked up in a reasonable amount of time, I'll likely close this off instead.

@github-actions
Copy link

github-actions bot commented Oct 24, 2023

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.24 KiB
dist/govuk-frontend-development.min.js 42.21 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 87.21 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 81.95 KiB
packages/govuk-frontend/dist/govuk/all.mjs 4.17 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.23 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.2 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 77.67 KiB 40.19 KiB
accordion.mjs 22.71 KiB 12.85 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for 78b0795

@colinrotherham
Copy link
Contributor

@querkmachine I've given it a rapid work-in-progress refresh, something along these lines?

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

That's a neat piece of doc! 🙌🏻 I'd be keen to merge it as it is and add some extra information around typing the configuration in a separate PR (as we probably need to think if the info fits here or in a more generic using-types piece of docs).

@colinrotherham @querkmachine Do you think there's anything holding it from being merged? If not, let's press that green button 😊

@colinrotherham
Copy link
Contributor

@romaricpascal Just a double check over my quick edits?

Aware that lots of the examples given will fail due to missing JSDoc though, should we include it?

Will also need a big update once we fix how components set up their options after #4230

@querkmachine
Copy link
Member Author

@romaricpascal It's been a while so I'm definitely not sure of how accurate parts of it are at this point, but better to have something that we can iterate upon rather than sitting on it for much longer.

@querkmachine querkmachine force-pushed the contribution-docs-component-config branch from f408dc7 to 78b0795 Compare April 15, 2024 16:37
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3387 April 15, 2024 16:38 Inactive
@querkmachine
Copy link
Member Author

Going to merge this on the basis that having something to iterate upon is probably better than letting this languish and grow outdated again.

@querkmachine querkmachine merged commit 1871898 into main Apr 18, 2024
45 checks passed
@querkmachine querkmachine deleted the contribution-docs-component-config branch April 18, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🏁
Development

Successfully merging this pull request may close these issues.

None yet

5 participants