Page MenuHomePhabricator

[web] Fit video tag to wrapper
ClosedPublic

Authored by patryk on Jul 18 2023, 1:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 5:50 PM
Unknown Object (File)
Thu, Sep 26, 9:28 AM
Unknown Object (File)
Tue, Sep 24, 4:22 AM
Unknown Object (File)
Tue, Sep 24, 2:41 AM
Unknown Object (File)
Mon, Sep 23, 3:59 AM
Unknown Object (File)
Sun, Sep 22, 2:28 PM
Unknown Object (File)
Sun, Sep 22, 2:13 PM
Unknown Object (File)
Sun, Sep 22, 11:11 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.