Page MenuHomePhabricator

[native] fix empty media gallery in thread settings
Needs RevisionPublic

Authored by ginsu on Thu, Jun 27, 12:28 AM.
Tags
None
Referenced Files
F2166146: D12581.diff
Tue, Jul 2, 3:32 AM
Unknown Object (File)
Mon, Jul 1, 4:47 PM
Unknown Object (File)
Sun, Jun 30, 5:24 PM
Unknown Object (File)
Thu, Jun 27, 11:33 PM
Unknown Object (File)
Thu, Jun 27, 7:22 PM
Unknown Object (File)
Thu, Jun 27, 12:42 AM
Unknown Object (File)
Thu, Jun 27, 12:42 AM
Unknown Object (File)
Thu, Jun 27, 12:39 AM
Subscribers

Details

Reviewers
inka
ashoat
Summary

We had a bug in our thread settings where we would show ui elements for the media gallery even if no items were present. This diff fixes that

Linear task: https://linear.app/comm/issue/ENG-3301/[native]-empty-media-gallery-looks-out-of-place

Test Plan

Please see the demo video below

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added a reviewer: inka.
ginsu added inline comments.
native/chat/settings/thread-settings-media-gallery.react.js
34

This is optional because we use this component in other places where we don't want the "See more" button.

ashoat requested changes to this revision.Mon, Jul 1, 11:48 AM

Taking over the review here to try and unblock this so @ginsu can finish up his work.

Merging header/footer

Normally we'd avoid merging the header and footer into ThreadSettingsMediaGallery. We intentionally keep these separated as their own items in the list to improve rendering performance. Virtualized lists work best when their items are as short as possible.

That said, since ThreadSettings doesn't have easy access to the list of media, and since the media is fetched on-demand, I think it's more trouble than its worth. So let's leave the diff as-is in this respect.

Footer was removed?

However, I do have one concern about the changes here: you appear to have removed the footer wholesale. Let's avoid regressing functionality, or at the very least justify why we're completely removing the footer, and include a before/after screenshot if the UI looks any different.

This revision now requires changes to proceed.Mon, Jul 1, 11:48 AM