Skip to content

Improve docs and examples for Table column widths - #3854

Open
SriHV wants to merge 10 commits into
mainfrom
enhancement/add-width-to-the-columns
Open

Improve docs and examples for Table column widths#3854
SriHV wants to merge 10 commits into
mainfrom
enhancement/add-width-to-the-columns

Conversation

@SriHV

@SriHV SriHV commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What is the context of this PR?

ONSDESYS-806

As per the ticket, we need to add column width parameter. As we already have the parameter around setting width of the table. We don't need to create a new one.

This PR updates the documentation of the width and example of table with numeric cells for better understanding of column width.

How to review this PR

Check that description about width is understandable.

Checklist

This needs to be completed by the person raising the PR.

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

@SriHV
SriHV requested a review from a team as a code owner June 17, 2026 15:02
@SriHV SriHV self-assigned this Jun 17, 2026
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment Jun 24, 2026 2:35pm

@SriHV SriHV added the Documentation Documentation content or feature for the design system website label Jun 17, 2026
andy-mair-ons
andy-mair-ons previously approved these changes Jun 18, 2026

@andy-mair-ons andy-mair-ons left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread package.json Outdated
"remark-cli": "12.0.0",
"remark-lint": "9.1.2",
"remark-preset-lint-recommended": "6.1.3",
"serve": "^14.2.6",

@sveltifier sveltifier Jun 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we shouldn't include changes to the packages / lockfile in a documentation PR. I would make a separate PR, but there's a solution to this in the next branch anyway, and it avoids taking an unnecessary dependency.

npx http-server backstop_data/html_report -p 8080 - View the results of the yarn visual tests in your browser. Using http-server rather than simply opening the file ensures the associated JavaScript runs.

So let's remove these changes here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sveltifier I think we might need @SriHV's changes here, because that method was is longer working for me since the upgrade to node 24. The images aren't saved so when I view the diffs I can see the number of failures, but not the changes. So we might need to just separate out the changes here to a new branch.

@helenb helenb Jul 7, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sveltifier @SriHV just wondering if there is any update on getting the fixes for running the VR test locally that are in this PR merged? Could we separate them out to another branch? I think I should probably remove the changes I made to the readme in the next branch.

@sveltifier sveltifier changed the title Update Documentation around column width Improve documentation for Table column widths Jun 22, 2026
@sveltifier sveltifier changed the title Improve documentation for Table column widths Improve docs and examples for Table column widths Jun 22, 2026
| ariaSort | string | false | Set to “ascending” or “descending” to set the default order of a table column when the page loads when setting `variants` to “sortable”. Defaults to “none”. |
| value | string | true | The content for the `th` cell |
| numeric | boolean | false | Set to “true” if all the cells in the column contain numbers. This aligns the content to the right so numbers can easily be compared. |
| widthPercentage | integer | false | Sets the `width` attribute (as a percentage) on the `th`, which controls the width of the whole column. Any column left without one sizes automatically to its content. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure what this means:

Any column left without one sizes automatically to its content.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

...is this just describing normal HTML table behaviour? If so I think we should remove this, as it implies to me that we do something additional to normal HTML behaviour.

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

Labels

Documentation Documentation content or feature for the design system website

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants