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

Update parameter names in document list component #3299

Conversation

precious-onyenaucheya-ons
Copy link
Contributor

@precious-onyenaucheya-ons precious-onyenaucheya-ons commented Aug 16, 2024

What is the context of this PR?

97

As per the ticket's technical notes, the following parameters have been renamed:

  1. type has been renamed to object.
  2. The title and url parameters have been combined into a single object (named title) with text and url properties.
    Additionally, the _macro-options.md file has been updated.

BREAKING CHANGES

  • Description of change::

    1. type has been renamed to object within the metadata object.
    2. The title and url parameters have been combined into an object named title, which now contains text and url.
  • Reason for change: This update helps to standardise the parameter names within the project.

  • Migration steps:

    1. Locate all instances of type parameter and replace with object.
    2. Locate all instances where url and title were separate parameters.
    3. Restructure title to include both text and url
    Click for example
        OLD
        {{
            onsDocumentList({
                 "url": '#0',
                "title": 'ONS launches Integrated Data Service to boost government collaboration on data sharing',
                "metadata": {
                    "type": {
                        "text": 'Press releases',
                        "ref": 'Ref 008052'
                    },
            })
        }}
    
        NEW
        {{
            onsDocumentList({
                 "title": {
                  "text": 'ONS launches Integrated Data Service to boost government collaboration on data sharing',
                  "url": '#0'
              },
              "metadata": {
                  "object": {
                      "text": 'Press releases',
                      "ref": 'Ref 008052'
                  },
            })
        }}
    

How to review this PR

Check that all the references to the parameters have been updated
Check that all the visual tests pass

  • I have selected the correct Assignee
  • I have linked the correct Issue

@precious-onyenaucheya-ons precious-onyenaucheya-ons added Do not merge Don't merge this PR until this label is removed Breaking changes This PR contains at least one breaking change Tech improvements Tech debt, cleanup, code standardisation etc. labels Aug 16, 2024
@precious-onyenaucheya-ons precious-onyenaucheya-ons requested a review from a team August 16, 2024 13:30
Copy link

netlify bot commented Aug 16, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit 4f2f4f5
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/66bf549681ea8200080e4e7c
😎 Deploy Preview https://deploy-preview-3299--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@alessioventuriniAND alessioventuriniAND changed the base branch from main to major-release September 3, 2024 08:47
@alessioventuriniAND alessioventuriniAND removed the Do not merge Don't merge this PR until this label is removed label Sep 5, 2024
@alessioventuriniAND alessioventuriniAND merged commit 195bd75 into major-release Sep 5, 2024
10 of 15 checks passed
@alessioventuriniAND alessioventuriniAND deleted the enhancement/97/change-document-list-parameter-naming-convention branch September 5, 2024 10:34
This was referenced Sep 10, 2024
rmccar pushed a commit that referenced this pull request Oct 9, 2024
* Standardise setting heading level across components #3111

* Update param names to camel case naming standard #3188

* Renamed utility class from ons-grid--flex to ons-grid-flex #3268

* Removed metadata component #3275

* Remove call to action component and all references #3143

* Update parameter from UnreadLink to UnreadLinkUrl in Message component #3290

* Update parameter subject from text to object type in Message list component #3291

* Add option for additional logo in footer #3227

* Update parameter from link to text in Footer Component #3294

* Update parameter name from url to src in Image Component #3293

* Update parameter names from LogoImage and LogoURL to image and url a in header component #3292

* Update parameter name from url to linkUrl in feedback component #3295

* Rename summary component parameters #3224

* Refactor timeline macro for compatibility with Jinja2 templates #3180

* Update parameter names in document list component #3299

* Update param name settingsLinkTextURL to settingsLinkURL in Cookies Banner component #3300

* Update parameter names in card component #3303

* Update parameter from linkText to text in external link component #3304

* Update param name from title to text in section navigation component #3305

* Update parameter from linkText to videoLinkText in Video Component #3306

* Update parameter from manualLink to manualLinkUrl in Address Input component #3307

* Ensure list item custom attributes are always set on list item #3336

* Rename items summary param for compatibility with Jinja #3382

* Update DS components to ensure compatibility with Jinja #3380

* Rename html OGL Link param to current naming standard #3379

* Format migration guide #3377

* Introduction of new spacing grid #3285
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking changes This PR contains at least one breaking change Tech improvements Tech debt, cleanup, code standardisation etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document List - Change parameter naming convention
4 participants