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

Use component wrapper in document list component #3933

Merged
merged 1 commit into from Mar 20, 2024

Conversation

AshGDS
Copy link
Contributor

@AshGDS AshGDS commented Mar 20, 2024

What

  • Use component wrapper in document list component

Why

  • I promised I would in the PR that added GA4 tracking to the component

Visual Changes

Document list yml examples will now have the uses component wrapper text

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3933 March 20, 2024 10:03 Inactive
@AshGDS AshGDS force-pushed the document-list-component-wrapper branch from f040713 to 62667c8 Compare March 20, 2024 10:07
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3933 March 20, 2024 10:07 Inactive
@AshGDS AshGDS marked this pull request as ready for review March 20, 2024 10:13
@AshGDS AshGDS requested a review from andysellick March 20, 2024 10:13
Copy link
Contributor

@andysellick andysellick left a comment

Choose a reason for hiding this comment

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

Nice. One small comment, but otherwise looks good.

Good job following up on this. Can you update https://docs.google.com/spreadsheets/d/1J-0IPyr2ycPuw1IWOIoX0o9Tk9nF35D0DJdsj_ylLQE/edit?pli=1#gid=1458513074 with this change? Thanks.

component_helper.add_class("gem-c-document-list--no-top-border") if local_assigns[:remove_top_border]
component_helper.add_class("gem-c-document-list--no-top-border-first-child") if local_assigns[:remove_top_border_from_first_child]
margin_bottom = shared_helper.get_margin_bottom
component_helper.add_class(margin_bottom) if margin_bottom
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this if margin_bottom check might be redundant because shared_helper.get_margin_bottom always returns a value, so I think these two lines could be written more simply as

component_helper.add_class(shared_helper.get_margin_bottom)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@andysellick Thanks, will update and then merge 👍

@AshGDS AshGDS force-pushed the document-list-component-wrapper branch from 62667c8 to 66a0c3e Compare March 20, 2024 14:05
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3933 March 20, 2024 14:05 Inactive
@AshGDS AshGDS merged commit 02a6623 into main Mar 20, 2024
12 checks passed
@AshGDS AshGDS deleted the document-list-component-wrapper branch March 20, 2024 14:09
@andysellick andysellick mentioned this pull request Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants