Skip to content

Fix sideways drag in the album editor and video thumbnails - #34

Merged
MakarandMane merged 1 commit into
mainfrom
fix-media-drag
Nov 15, 2026
Merged

MakarandMane merged 1 commit into
mainfrom
fix-media-drag

Conversation

@MakarandMane

Copy link
Copy Markdown
Member

Fixes the two problems found while testing v1.0.1 on a staging site, before submitting to WordPress.org.

#32 Dragging photos sideways in the album editor doesn't reorder them

  • assets/css/stackfolio-admin.css: the media list uses floated tiles instead of flexbox. jQuery UI sortable only sorts sideways when items float. With flexbox it treated the list as vertical and ignored left/right drags.

#33 Uploaded videos without a poster look like a copy of the album cover

  • includes/class-stackfolio-album.php: only the video's own image is used as its poster. Without one, the player shows the video directly, and the thumbnail strip shows a new neutral icon, assets/images/video-thumb.svg.

Testing on staging (WordPress Playground, WordPress 7.1, PHP 8.3, Elementor, WP_DEBUG on)

On v1.0.1 from the release zip:

  • Migration from Album Station: 3 albums, categories, videos and the API key moved; an unrelated album post left alone.
  • YouTube playlist, with the YouTube API mocked: correct request (key and playlist ID); private and deleted videos skipped; videos before photos as migrated; video plays; result cached (1 API call across reloads).
  • Uploaded MP4: recorded H.264 MP4 uploaded, added through the media picker, plays in the lightbox with controls and inline playback.
  • Album editing: media picker, remove, save.
  • Block: filters, lightbox, Escape returns focus.
  • Shortcode and legacy [feature_album].
  • Elementor: legacy as-gallery page, editor re-render, new widget.
  • Mobile 375px: one column, no horizontal scroll, lightbox fits.
  • Uninstall: settings removed, albums kept.
  • Debug log: no StackFolio notices or warnings.

On this branch (exact package copy):

  • A sideways drag now reorders (13,14,15,22 → 22,13,14,15) and saves.
  • The video shows directly with the neutral thumbnail and plays.
  • Debug log clean.
  • PHPCS, PHPStan, unit tests and CSS lint pass locally.

What happens on merge

The zip changes, so this releases v1.0.2, the version to submit.

Closes #32
Closes #33

Fixes the two problems found while testing v1.0.1 on a staging site, before submitting to WordPress.org.

## #32 Dragging photos sideways in the album editor doesn't reorder them
- `assets/css/stackfolio-admin.css`: the media list uses floated tiles instead of flexbox. jQuery UI sortable only sorts sideways when items float. With flexbox it treated the list as vertical and ignored left/right drags.

## #33 Uploaded videos without a poster look like a copy of the album cover
- `includes/class-stackfolio-album.php`: only the video's own image is used as its poster. Without one, the player shows the video directly, and the thumbnail strip shows a new neutral icon, `assets/images/video-thumb.svg`.

## Testing on staging (WordPress Playground, WordPress 7.1, PHP 8.3, Elementor, WP_DEBUG on)
On v1.0.1 from the release zip:
- **Migration from Album Station:** 3 albums, categories, videos and the API key moved; an unrelated `album` post left alone.
- **YouTube playlist, with the YouTube API mocked:** correct request (key and playlist ID); private and deleted videos skipped; videos before photos as migrated; video plays; result cached (1 API call across reloads).
- **Uploaded MP4:** recorded H.264 MP4 uploaded, added through the media picker, plays in the lightbox with controls and inline playback.
- **Album editing:** media picker, remove, save.
- **Block:** filters, lightbox, Escape returns focus.
- **Shortcode** and legacy `[feature_album]`.
- **Elementor:** legacy `as-gallery` page, editor re-render, new widget.
- **Mobile 375px:** one column, no horizontal scroll, lightbox fits.
- **Uninstall:** settings removed, albums kept.
- **Debug log:** no StackFolio notices or warnings.

On this branch (exact package copy):
- A sideways drag now reorders (`13,14,15,22` → `22,13,14,15`) and saves.
- The video shows directly with the neutral thumbnail and plays.
- Debug log clean.
- PHPCS, PHPStan, unit tests and CSS lint pass locally.

## What happens on merge
The zip changes, so this releases **v1.0.2**, the version to submit.

Closes #32
Closes #33
@MakarandMane
MakarandMane merged commit 7dc49cb into main Nov 15, 2026
13 checks passed
@MakarandMane
MakarandMane deleted the fix-media-drag branch November 15, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uploaded videos without a poster look like a copy of the album cover Dragging photos sideways in the album editor doesn't reorder them

1 participant