Page MenuHomePhabricator

[native] fix empty media gallery in thread settings
ClosedPublic

Authored by ginsu on Jun 27 2024, 12:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 9:52 AM
Unknown Object (File)
Tue, Dec 3, 5:43 PM
Unknown Object (File)
Tue, Nov 26, 12:04 PM
Unknown Object (File)
Mon, Nov 25, 3:48 PM
Unknown Object (File)
Nov 22 2024, 8:01 PM
Unknown Object (File)
Nov 22 2024, 7:57 PM
Unknown Object (File)
Nov 22 2024, 7:38 PM
Unknown Object (File)
Nov 22 2024, 3:37 PM
Subscribers

Details

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 ↗(On Diff #41743)

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.Jul 1 2024, 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.Jul 1 2024, 11:48 AM
native/chat/settings/thread-settings-media-gallery.react.js
37 ↗(On Diff #42090)

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

This revision is now accepted and ready to land.Jul 8 2024, 12:08 PM
This revision was landed with ongoing or failed builds.Jul 8 2024, 12:56 PM
This revision was automatically updated to reflect the committed changes.