Page MenuHomePhabricator

[web] Fit video tag to wrapper
ClosedPublic

Authored by patryk on Jul 18 2023, 1:40 AM.
Tags
None
Referenced Files
F3367508: D8525.diff
Mon, Nov 25, 2:57 PM
Unknown Object (File)
Sun, Nov 24, 3:45 AM
Unknown Object (File)
Sat, Nov 23, 12:50 PM
Unknown Object (File)
Fri, Nov 1, 6:52 AM
Unknown Object (File)
Fri, Nov 1, 6:52 AM
Unknown Object (File)
Fri, Nov 1, 6:52 AM
Unknown Object (File)
Fri, Nov 1, 6:51 AM
Unknown Object (File)
Fri, Nov 1, 3:47 AM
Subscribers

Details

Summary

This diff solves the video tag fit problem. We could observe small gap between the wrapper and video tag:

funny-video-bug.png (257×490 px, 33 KB)

Now video tags fit the wrapper:
solved.png (468×892 px, 83 KB)

Linear task: ENG-4401

Test Plan

The best way to test this is to set background-color: red to wrapper tag using built-in inspection tool in your favorite browser and check if video tag covers wrapper completely.

Tested in Firefox, Chrome, and Safari.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

patryk held this revision as a draft.
patryk edited the test plan for this revision. (Show Details)
patryk added reviewers: bartek, tomek, inka, kamil.
patryk attached a referenced file: F642220: solved.png. (Show Details)
patryk added inline comments.
web/media/media.css
25 ↗(On Diff #28766)

It might be weird that this works, but I found out that setting display: flex solves the issue. I'm inheriting the property because we set display: inline-flex in span.multimedia. I've tried to use object-fit: fill, but doesn't seem to work.

This property doesn't affect other tags (because we inherit display property).

Did you check if this doesn't break images? Since you changed a selector that influences span.multimedia > .multimediaImage > img

It doesn't (note: we don't support uploading videos on web right now, that's why there is only an image in chat input bar):

Note to video: I tested this on chat with encrypted and unencrypted multimedia.

This revision is now accepted and ready to land.Jul 21 2023, 3:10 AM
patryk edited the test plan for this revision. (Show Details)

Rebase

This revision was landed with ongoing or failed builds.Aug 2 2023, 12:07 PM
This revision was automatically updated to reflect the committed changes.