Skip to content

VideoPress: rework the video details screen around a preview player - #51148

Closed
adampickering wants to merge 3 commits into
trunkfrom
try/videopress-edit-layout
Closed

VideoPress: rework the video details screen around a preview player#51148
adampickering wants to merge 3 commits into
trunkfrom
try/videopress-edit-layout

Conversation

@adampickering

@adampickering adampickering commented Aug 10, 2026

Copy link
Copy Markdown

What & why

The video details screen was a 660px column — the narrowest screen in the product, on the one screen people actually write on. This reworks it around a preview player (the YouTube Studio pattern): video + settings on the right, everything you author on a wide canvas.

Before After
Player 892×502 (half the page at 1080p) 380×214 preview
Scrollbars 2, no visual boundary 1
Thumbnail a label + one dropdown, no image poster + Upload / Select-from-video tiles
Subtitles "Manage" button below the fold + ⋮ item its own card on the canvas
Settings always expanded, overflowing rail collapsed cards showing their current value

What changed

  • Layout — same 1344px container as the rest of the dashboard. Canvas left; player, Video info, Privacy & sharing, Rating on the right. Stacks to one column below ~1100px, player first.
  • Collapsible settings — Privacy & sharing and Rating are CollapsibleCards. Headers show the current value; find-in-page still reaches collapsed content (hidden-until-found).
  • Thumbnail card — shows the actual poster (skeleton for private videos while the token loads) beside two action tiles.
  • Subtitles card — state line + full-label "Manage subtitles" button. The ⋮ entry stays.
  • Add to a post or page — now in the page header, can create a page too, and only renders when it can actually work (GUID + nonce).
  • Live title — the page heading tracks the Title field as you type. Typing doesn't save.
  • Rating a11y — screen readers announce "G", not the whole description sentence.

Where this is heading

This PR is a stepping stone, not the destination. Per the discussion with @mouraheyde: the longer-term direction is to build these screens on WPDS layout patterns, likely as a Library master-detail view (DataViews 17.3 is composable and the Library already holds selection state). That's a bigger change — it merges two routes and relocates Save/breadcrumb/header — so it's its own project. This PR fixes the screen people use today without blocking that path.

Known limitations (deliberate)

  • Breakpoint keys off viewport width, not content width — wrong on some sidebar/host combos (548px canvas on WP.com @1280). Fix is a container query; tracked as a follow-up.
  • Pre-existing: "R" rating silently fails to save (server accepts R-17, dashboard sends R).
  • Pre-existing: Chapters (N) count can disagree with what's written.
  • Pre-existing: the parent breadcrumb discards unsaved edits without confirming.

Does this pull request change what data or activity we track or use?

No.

Testing instructions

⚠️ Needs a WordPress.com-connected site — the edit screen only opens for VideoPress-hosted items.

  1. Jetpack → VideoPress → Library → open a video.
  2. Wide: canvas left, player + info + 2 collapsed cards right, one scrollbar. Narrow (<1100px): one column, player first.
  3. Expand Privacy & sharing, change it, collapse — header shows the new value. Ctrl+F "Allow downloads" while collapsed → card opens.
  4. Thumbnail: set from frame + from media library — both toast, neither enables Save. Private video shows a skeleton, never a broken image.
  5. Subtitles: "Manage subtitles" opens the caption manager; ⋮ entry still works.
  6. Live title: heading follows keystrokes; "Untitled" when cleared.
  7. Add to a post or page → New post / New page insert the block.
  8. Rating: G ↔ PG-13 round-trips (see known R bug).
  9. RTL: columns mirror cleanly.

The video details screen was a 660px column — the narrowest surface in the
product, on the one screen people write on. It now uses the same 1344px
container as the rest of the dashboard, split into a writing canvas and a
settings rail.

- Group the file name, title, description, chapters and thumbnail control
  into a single "Video details" card below the player. ThumbnailCard keeps
  only its read-outs and becomes VideoInfoCard.
- Move "Add to a post or page" into the page header, where it can now create
  a new page as well as a new post. It renders only when both a GUID and a
  content nonce are present, so its items can no longer open a blank editor.
- Show the in-progress title in the page heading as it is typed, falling back
  to "Untitled" so the page never loses its accessible name. Typing does not
  save.
- Split the rating options into a label and a description, so a screen reader
  announces "G" rather than the whole sentence as the option's name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CcAb177MwHKkw7D5RPrSvq
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the try/videopress-edit-layout branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack try/videopress-edit-layout

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

jp-launch-control Bot commented Aug 10, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 5 files.

File Coverage Δ% Δ Uncovered
projects/packages/videopress/src/dashboard/hooks/use-update-video-poster.ts 29/29 (100.00%) 0.00% 0 💚
projects/packages/videopress/src/dashboard/components/video-details/thumbnail-card.tsx 20/21 (95.24%) 0.12% -1 💚
projects/packages/videopress/src/dashboard/components/video-details/rating-card.tsx 2/2 (100.00%) 100.00% -2 💚
projects/packages/videopress/src/dashboard/components/video-details/privacy-sharing-card.tsx 4/6 (66.67%) 66.67% -3 💚
projects/packages/videopress/routes/video/stage.tsx 52/71 (73.24%) 4.82% -5 💚

4 files are newly checked for coverage.

File Coverage
projects/packages/videopress/src/dashboard/components/video-details/video-info-card.tsx 10/11 (90.91%) 💚
projects/packages/videopress/src/dashboard/components/add-to-content-menu/index.tsx 18/19 (94.74%) 💚
projects/packages/videopress/src/dashboard/components/video-details/subtitles-card.tsx 14/14 (100.00%) 💚
projects/packages/videopress/src/dashboard/components/video-details/thumbnail-tile.tsx 1/1 (100.00%) 💚

Full summary · PHP report · JS report

The player led the canvas at full width: 828x466 at a 1440 viewport and
892x502 at 1920, which is over half the visible page before a single field
has been read. The settings it pushed into the 380px rail did not fit --
roughly 900px of cards against a cap of 584px on a 1440x900 laptop -- so the
rail grew its own scrollbar, with no border, background or scroll shadow to
tell it apart from the page's. Two scrollbars, no boundary.

Both are the same problem. Swapping what each column holds fixes both: the
player becomes a 380x214 preview at the head of the right column, and every
control moves to the wide canvas. The right column is now ~346px, so the
height cap, the sticky positioning, the two viewport-chrome custom
properties and the flex-shrink guard all go with it. One scroll surface.

The canvas reads in the order someone works: what the video says, what it
looks like, who can see it.

* Thumbnail is a card of its own and shows the current poster next to the
  control that replaces it. It was a label and a single button, which is what
  it had been reduced to; the poster goes through usePosterUrl so a private
  video shows a skeleton until its playback token lands rather than a broken
  image.
* Subtitles is a card of its own. Both ways in were nearly invisible: a
  minimal small button reading "Manage" -- the full string was only in an
  aria-label -- at the foot of the second rail card, below the fold at common
  heights and absent without a GUID, plus an iconless item in an unlabelled
  kebab. The kebab keeps its entry.
* File name moves to Video info, next to the link, shortcode and upload
  date. It is a fact about the upload, derived from the source URL, not
  something a person writes next to the title.

The player is a grid sibling of both columns rather than a child of either,
placed by area, so the stacked layout below 1100px can lead with it while the
read-outs stay last. Row 2 is a flexible track: the canvas spans both rows,
and two intrinsic rows would distribute its excess height across them and
strand the read-outs halfway down the page.

Verified against the real components and the compiled stylesheet in a
headless harness at five viewports: player 380x214, right column 346px with
no inner scrollbar, no horizontal overflow, and player -> canvas -> read-outs
when stacked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CcAb177MwHKkw7D5RPrSvq
@adampickering adampickering changed the title VideoPress: group video details into one card and widen the screen VideoPress: rework the video details screen around a preview player Aug 11, 2026
@adampickering

Copy link
Copy Markdown
Author

Closing while I review this locally — reopening once I've been through it. Branch and commits are untouched.

…psibles

Four refinements from Adam's design pass on the preview-player layout:

* Privacy & sharing and Rating move under Video info in the right column.
  The split becomes authoring vs. configuring: the canvas holds what a
  person writes (title, description, chapters, thumbnail, subtitles), the
  column holds the video, the values that address it, and settings picked
  once from a fixed set.

* Both settings cards become CollapsibleCards, collapsed by default, with
  the current value (privacy level, rating) carried in the header via
  HeaderDescription. Expanded, the column ran 407px past the canvas beside
  it; collapsed, the two columns are within 4px. Collapsing is not lossy:
  CollapsibleCard.Content defaults to hidden-until-found, so find-in-page
  still reaches the controls, and the header summary reaches assistive
  tech as the trigger's accessible description.

* The thumbnail dropdown becomes a row of 16:9 tiles: current poster,
  Upload image, Select from video — the choice is visual, so a menu that
  hides both options behind a label was the wrong control. The design
  system has no media picker, upload tile or dashed container (the survey
  is documented in thumbnail-tile.tsx), so the tile borrows Button's
  unstyled variant for the interaction and paints the frame from WPDS
  tokens. thumbnail-update-button.tsx is removed.

* The Subtitles card stacks its state line above the button — it shared a
  row with it, which read as fragments ("None [Manage subtitles]") — with
  the copy softened to "No subtitles yet." and a Skeleton while the
  tracks query resolves.

Adds first-ever test coverage for the Privacy & sharing and Rating cards
(collapsed default, header value, expand-and-edit, find-in-page survival).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CcAb177MwHKkw7D5RPrSvq
@adampickering adampickering reopened this Aug 13, 2026
@adampickering
adampickering marked this pull request as ready for review August 13, 2026 00:59
@adampickering
adampickering requested a review from a team as a code owner August 13, 2026 00:59
@adampickering adampickering added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. labels Aug 13, 2026
@adampickering

Copy link
Copy Markdown
Author

Closing this — the work here is included in #51268, which rebuilds the first-run and upload experience around it. The video details screen changes from this PR are in that branch unchanged, plus the upload flow that now hands you to this screen.

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

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Package] VideoPress [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants