Page MenuHomePhabricator

[web] Fit video tag to wrapper
ClosedPublic

Authored by patryk on Jul 18 2023, 1:40 AM.
Tags
None
Referenced Files
F4114678: D8525.diff
Tue, Feb 18, 2:52 AM
Unknown Object (File)
Thu, Feb 13, 4:12 PM
Unknown Object (File)
Thu, Feb 13, 4:12 PM
Unknown Object (File)
Thu, Feb 13, 10:34 AM
Unknown Object (File)
Tue, Feb 11, 5:02 PM
Unknown Object (File)
Sun, Jan 26, 10:22 AM
Unknown Object (File)
Jan 8 2025, 10:31 PM
Unknown Object (File)
Jan 8 2025, 10:31 PM
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
Branch
arcpatch-D8483
Lint
No Lint Coverage
Unit
No Test Coverage

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

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.