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

Document List - Change parameter naming convention #97

Closed
1 of 2 tasks
MagdalenaLarge opened this issue Jul 11, 2024 · 0 comments · Fixed by ONSdigital/design-system#3299
Closed
1 of 2 tasks

Comments

@MagdalenaLarge
Copy link

MagdalenaLarge commented Jul 11, 2024

As Software Engineer
I want to have a consistent way of naming parameters
So that the user of the Design System can easier navigate our components

Description
We have inconsistent approach to naming parameters.
When dealing with a component that has a link with some text and a href we don't use the same name conventions

Naming convention for links in components

  • If the link is set at the top level of the component and there are no other parameters we should be using url and text
  • If the link is set at the top level and the are other parameters at the same level then we need to prefix url and text eg : postTextboxLinkText postTextboxLinkUrl.
  • If the link is set inside a parameter object then we should only use text and url.
    For Document List we currently have

Document:

  • title
  • url

Type:

  • text
  • url

Acceptance criteria

  • Naming convention to this component has been agreed within Dev team.
  • Naming convention has been applied to the component.

Visualisation/Input from UCD
How should the components look like?

Linked User stories/epics
Outcome of the spike

Technical details (optional)

  • Replace title and url with a title object that contains a text and url params

  • Update Metadata section params list e.g. "Type" should be "Object"

    MVP (optional)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants