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

Fix applications tables column alignment #2988

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

yndajas
Copy link
Member

@yndajas yndajas commented Jun 27, 2024

Trello

In #2341, the table component from govuk_publishing_components was copied over and customised

In #2664, we migrated the applications tables to use this. In the process, we lost the custom classes on the first two columns, which set the widths to 1/4 and 1/3 respectively. This was noted as "acceptable" in the PR body in exchange for improved consistency and other benefits from using the component

However, since we have a custom version of the table component, it's very easy for us to support custom classes. This was in fact done in the same PR that copies the component into the Signon codebase, adding custom class support for the outer table element in 4f09fbc

This adds support for custom classes in the headers, which is then used to restore the old classes and therefore consistent column widths between tables (irrespective of content width)

In #2341, it was suggested that we might try to get the customisations merged upstream - it might be worth exploring that with both this and earlier changes as a separate piece of work

Note: this makes existing row alignment issues more apparent in some circumstances. These are fixed separately in #2984

Screenshots

Before

image

After

image

This application is owned by the publishing platform team. Please let us know in #govuk-publishing-platform when you raise any PRs.

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

In #2341, the table component from `govuk_publishing_components` was
copied over and customised

In #2664, we migrated the applications tables to use this. In the
process, we lost the custom classes on the first two columns, which set
the widths to 1/4 and 1/3 respectively. This was noted as "acceptable"
in the PR body in exchange for improved consistency and other benefits
from using the component

However, since we have a custom version of the table component, it's
very easy for us to support custom classes. This was in fact done in the
same PR that copies the component into the Signon codebase, adding
custom class support for the outer table element in 4f09fbc

This adds support for custom classes in the headers, which is then used
to restore the old classes and therefore consistent column widths
between tables (irrespective of content width)

In #2341, it was suggested that we might try to get the customisations
merged upstream - it might be worth exploring that with both this and
earlier changes as a separate piece of work

#2341: #2341
#2664: #2664
yndajas added a commit that referenced this pull request Jun 27, 2024
This contains changes from #2988
which should go away once that's merged
yndajas added a commit that referenced this pull request Jun 27, 2024
This contains changes from #2988
which should go away once that's merged
yndajas added a commit that referenced this pull request Jun 28, 2024
This should fall out if #2988 is
merged before this
yndajas added a commit that referenced this pull request Jun 28, 2024
This should fall out if #2988 is
merged before this
Copy link
Contributor

@callumknights callumknights left a comment

Choose a reason for hiding this comment

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

Thanks for the note about the row alignment issues 👍

yndajas added a commit that referenced this pull request Jun 28, 2024
This should fall out if #2988 is
merged before this
@yndajas yndajas merged commit 7145e07 into main Jun 28, 2024
16 checks passed
@yndajas yndajas deleted the fix-applications-table-column-alignment branch June 28, 2024 15:31
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.

2 participants