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)
Change History (18)
This ticket was mentioned in PR #316 on WordPress/wordpress.org by @sabernhardt.
3 years ago
#2
- Removes
max-widthfrom 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: 415pxmedia query.
#3
@
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
@
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?
#5
@
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.
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
:afterflex filler is hidden inside the query, since a grid doesn't need it. - Archive lists unchanged: the rule is scoped to
.four-col, so theul.archive.video-listlists (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:
- 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).
- At 600px, "Latest Videos" shows three columns filling the row (no 80px gap on the right).
- At 319px, the secondary videos stack as before. "Latest Videos" is one column at full content width.
- 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).
- 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
added screenshot