Skip to content

Added max-width to DataView columns #70983

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

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export const data: SpaceObject[] = [
{
id: 1,
title: 'Moon',
description: "Earth's satellite",
description:
'The Moon is Earth’s only natural satellite, orbiting at an average distance of 384,400 kilometers with a synchronous rotation that leads to fixed lunar phases as seen from Earth. Its cratered surface and subtle glow define night skies, inspiring exploration missions and influencing tides and biological rhythms worldwide.',
image: 'https://live.staticflickr.com/7398/9458193857_e1256123e3_z.jpg',
type: 'Satellite',
isPlanet: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
td,
th {
padding: $grid-unit-15;
white-space: nowrap;
max-width: 60ch;

&.dataviews-view-table__actions-column {
text-align: right;
Expand Down
6 changes: 4 additions & 2 deletions packages/dataviews/src/test/filter-and-sort-data-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ describe( 'filters', () => {
fields
);
expect( result ).toHaveLength( 2 );
expect( result[ 0 ].description ).toBe( "Earth's satellite" );
expect( result[ 0 ].description ).toBe(
'The Moon is Earth’s only natural satellite, orbiting at an average distance of 384,400 kilometers with a synchronous rotation that leads to fixed lunar phases as seen from Earth. Its cratered surface and subtle glow define night skies, inspiring exploration missions and influencing tides and biological rhythms worldwide.'
);
} );

it( 'should perform case-insensitive and accent-insensitive search', () => {
Expand Down Expand Up @@ -422,7 +424,7 @@ describe( 'filters', () => {
fields
);
expect( result.map( ( r ) => r.description ) ).toEqual( [
"Earth's satellite",
'The Moon is Earth’s only natural satellite, orbiting at an average distance of 384,400 kilometers with a synchronous rotation that leads to fixed lunar phases as seen from Earth. Its cratered surface and subtle glow define night skies, inspiring exploration missions and influencing tides and biological rhythms worldwide.',
'Moon of Jupiter',
'Moon of Jupiter',
'La planète Vénus',
Expand Down
Loading