Making WordPress.org

Opened 5 years ago

Closed 2 weeks ago

#6244 closed defect (bug) (fixed)

In WPTV Category page video group layout should be full width in mobile

Reported by: multidots1896 Owned by: obenland
Priority: normal Milestone:
Component: WordPress.tv Keywords: has-patch has-screenshots
Cc:

Description

In WPTV Category page video group layout should be full width in mobile below media screen 415px.
Url:
​https://wordpress.tv/category/how-to/

Attachments (4)

wptv-screenshot.png​ (571.1 KB ) - added by multidots1896 5 years ago.
added screenshot
6244.patch​ (700 bytes ) - added by multidots1896 5 years ago.
added patch
howto-videos-414px.png​ (227.8 KB ) - added by sabernhardt 7 weeks ago.
secondary videos in one narrow column, at 414 pixels wide
howto-videos-415px.png​ (262.2 KB ) - added by sabernhardt 7 weeks ago.
secondary video thumbnail images next to their text, at 415 pixels wide

Download all attachments as: .zip

Change History (18)

@multidots1896
5 years ago

added patch

#1 @dd32
5 years ago

#6279 was marked as a duplicate.

This ticket was mentioned in ​PR #316 on ​WordPress/wordpress.org by ​@sabernhardt.


3 years ago
#2

  • Removes max-width from the list item.
  • Sets the thumbnail image to 100% width and auto height to start (without a media query).
  • Moves the image's exact dimensions inside the min-width: 415px media query.

https://meta.trac.wordpress.org/ticket/6244

#3 @sabernhardt
3 years ago

6244.patch​ could work for visitors whose screens are less than 415 pixels wide, though the design would break at exactly 415 pixels. I think the max-width can be removed, and the image could have 100% width for the base style but exact dimensions starting at the 415px breakpoint. I made a pull request to try that approach.

#4 @timse201
7 weeks ago

  • Resolution → fixed
  • Status new → closed

The design has changed. There are now 2 columns on small screens. Is it OK to close it?

@sabernhardt
7 weeks ago

secondary videos in one narrow column, at 414 pixels wide

@sabernhardt
7 weeks ago

secondary video thumbnail images next to their text, at 415 pixels wide

#5 @sabernhardt
7 weeks ago

  • Resolution fixed → worksforme

When the screen is narrower than 415 pixels, items in the .secondary-videos section are still in one column that is only 130 pixels wide. This is not ideal, but stretching the thumbnail images to the same width as the main video could give them too much prominence.

Note: Decreasing the CSS breakpoint from 415px to 300px or 320px could be a simpler option.

Version 1, edited 7 weeks ago by sabernhardt (previous) (next) (diff)

#6 @timse201
7 weeks ago

  • Resolution worksforme
  • Status closed → reopened

This ticket was mentioned in ​PR #1148 on ​WordPress/wordpress.org by ​@obenland.


2 weeks ago
#7

Fixes https://meta.trac.wordpress.org/ticket/6244
Fixes https://meta.trac.wordpress.org/ticket/6629

Both are CSS-only fixes in wptv2/style.css. The live /_static/ CSS matches the repo file.

#6244: hero secondary videos

Below 415px, the .wptv-hero .secondary-videos items stack into a single 130px column (left/width 10/130 at 360px and 400px), leaving most of the hero empty.

This lowers the side-by-side breakpoint from min-width: 415px to min-width: 320px, the simpler option from https://meta.trac.wordpress.org/ticket/6244#comment:5.

I didn't port ​https://github.com/WordPress/wordpress.org/pull/316 (full-width thumbnails below 415px), because of the concern in that comment. Each secondary thumbnail would be as wide as the main video, so five of them would outweigh the featured video and make the hero several screens long. With the lower breakpoint, the secondary videos keep the layout they already have at 415px and up: a 130×75 thumbnail with the title and event beside it. At 320px the text column is 150px wide, and at 360px it's 190px, so titles still wrap comfortably. Only viewports narrower than 320px still get the stacked layout.

#6629: "Latest Videos" gap

The secondary-videos half of #6629 is the same issue as #6244 and is fixed above. The other half is the .video-list grids ("Latest Videos" on category, event, home and WordCamp.tv pages). Their items are a fixed 170px (160px flex-basis plus 5px padding on each side), so the row leaves an empty gap on the right: 50px at 400px, 80px at 600px.

Below 940px, .video-list.four-col now uses grid-template-columns: repeat( auto-fill, minmax( 170px, 1fr ) ):

  • Same column count: the 170px minimum gives the same number of columns as today at every width. The columns just stretch to fill the row, for example 2 × 195px at 400px and 3 × ~197px at 600px.
  • Last row: a grid keeps the last row aligned with the columns above it, which growing flex items wouldn't. The :after flex filler is hidden inside the query, since a grid doesn't need it.
  • Archive lists unchanged: the rule is scoped to .four-col, so the ul.archive.video-list lists (search and tag archives) are untouched.
  • Desktop unchanged: at 940px and up, none of these rules apply.

Testing

No unit tests: CSS-only layout change, and the theme has no test suite. Manual testing:

  1. Open ​https://wordpress.tv/category/how-to/ and ​https://wordpress.tv/category/wordpress-related-events/ with the browser at 360px and 400px wide.
    • The hero's secondary videos show the 130×75 thumbnail on the left with the title and event to its right, not a narrow centered column.
    • "Latest Videos" shows two columns that reach the right edge of the content (at 400px, both items end at 395px and the gap is gone).
  2. At 600px, "Latest Videos" shows three columns filling the row (no 80px gap on the right).
  3. At 319px, the secondary videos stack as before. "Latest Videos" is one column at full content width.
  4. At 940px and wider, the category page, ​https://wordpress.tv/ and ​https://wordpress.tv/category/wordcamptv/ look the same as on production (four 170px items per row, secondary videos to the right of the main video).
  5. A search or tag archive (for example ​https://wordpress.tv/?s=gutenberg) is unchanged at every width.

🤖 Generated with ​Claude Code

​@obenland commented on ​PR #1148:


2 weeks ago
#8

@propsbot add theminaldiwan

​@obenland commented on ​PR #1148:


2 weeks ago
#9

@propsbot add sabernhardt

​@obenland commented on ​PR #1148:


2 weeks ago
#10

@propsbot add timse201

​@obenland commented on ​PR #1148:


2 weeks ago
#11

@propsbot add UpadalaVipul

​@obenland commented on ​PR #1148:


2 weeks ago
#12

@propsbot add viralsampat90

​@obenland commented on ​PR #1148:


2 weeks ago
#13

@propsbot add sumitsinghwp

#14 @obenland
2 weeks ago

  • Owner set to obenland
  • Resolution → fixed
  • Status reopened → closed

In 15474:

WordPress.tv: Fill the row with video lists on small screens

Props obenland, upadalavipul, multidots1896, sabernhardt, timse201, viralsampat, sumitsingh.
Closes ​https://github.com/WordPress/wordpress.org/pull/1148.
Fixes #6244, #6629.

Note: See TracTickets for help on using tickets.