Page MenuHomePhorge

Support size=thumb parameter for embedded video files in Remarkup
Needs ReviewPublic

Authored by aklapper on Thu, Jun 12, 12:28.

Details

Summary

When embedding a video in a task description via Remarkup's {F1} it takes up to 95% of the width which is often unwanted.
Should support the same {F1,size=thumb} parameter which embedded image files already support.

In case of image files the resulting width for TRANSFORM_PREVIEW is hardcoded to 220px in PhabricatorFileThumbnailTransform.php::generateTransforms().
That feels subjectively small for video thumbs so arbitrarily bikeshed to hardcoded 400px instead.

Closes T16042

Test Plan

Upload a video file; put {F1,size=thumb} and {F1} into a task comment; resize viewport width.

Diff Detail

Repository
rP Phorge
Branch
T16042embedVideoWidth (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2095
Build 2095: arc lint + arc unit

Event Timeline

mainframe98 subscribed.
mainframe98 added inline comments.
src/applications/files/markup/PhabricatorEmbedFileRemarkupRule.php
327

If $options['size'] can be optional on line 315, then this line shouldn't access it unconditionally.

This revision now requires changes to proceed.Thu, Jun 12, 17:06

Uhm thanks! That was left from playing with the corresponding image code. As we already have a proper HTML tag class I'm not even sure what that size parameter is good for