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

@actions/core: Add support for full width tables and column width #1766

Open
estruyf opened this issue Jul 3, 2024 · 0 comments
Open

@actions/core: Add support for full width tables and column width #1766

estruyf opened this issue Jul 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@estruyf
Copy link

estruyf commented Jul 3, 2024

Describe the enhancement

With the core.summary.addTable, we can already add a table to the job summary, but we have no control over how the outcome of the table would be. It would be useful to be able to tell if it should be a full width table and defining the column widths would make it perfect.

Code Snippet

// Define full width on the table
core.summary.addTable(tableRows, { fullWidth: true });

// Define the width on the table rows/headers
const tableRows = [
	[
		{ data: "title", header: true, width: "20%" },
		{ data: "description", header: true, width: "60%" },
		{ data: "outcome", header: true, width: "20%" },
	]
]

Additional information

For more context, I use the https://www.npmjs.com/package/@estruyf/github-actions-reporter dependency in my Playwright tests to report the test outcomes. Right now, each of the test result tables has its own width, depending on the text inserted into it.

image

@estruyf estruyf added the enhancement New feature or request label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant