Open paulrobertlloyd opened 1 year ago
Thanks! Good timing, we are looking into these issues at the moment, great to get your input. I agree naming via config gives more flexibility and control, however some points naming via npm give us:
Any thoughts on those?
How about something like this:
Where
config.name
else package.name
with existing text transformation appliedpackage.name
, and something that can’t be altered by a plugin configSo, without any changes, MOJ Frontend would appear as
Frontend
@ministryofjustice/frontend
But if config.name
is provided:
Ministry of Justice Frontend
@ministryofjustice/frontend
With this approach, you wouldn’t need an organisation name in the config, either.
nice thanks! We'll continue the conversation in the team and update here. Feel free to add more ideas if you have them!
raised a ticket to discuss as a team: https://github.com/alphagov/govuk-prototype-kit/issues/2222
+1 to the suggestions above.
Some libraries might want to provide multiple links for documentation or other resources. For example, it might make sense to link from the GOV.UK Frontend plugin to both the Design System and Frontend Docs.
Context
The plugins list attempts to infer the origin of a plugin from its npm scope:
In this example we can see that:
@ministryofjustice
=> ‘Ministryofjustice’ (should be ‘Ministry of Justice’)@xgovuk
=> ‘X-GOV.UK’ (should be ‘X-GOVUK’)It should also be noted that while government departments will often change their names, npm organisation scopes may not be updated to match. Or they may use a shortened handle (DLHUC’s GitHub organisation name is
communities
, for example).Further still, package names might not be enough to identity a plugin, for example ‘Frontend’,
There is also no link to any documentation related to these plugins. In the above screenshot these would be:
Alternatives
Given that plugins need to include a
govuk-prototype-kit.config.json
file, allow plugin authors to explicitly declare values for plugin name, organisation and documentation.For example: