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
F3348643: D12581.diff
Fri, Nov 22, 3:37 PM
Unknown Object (File)
Sun, Nov 10, 3:53 PM
Unknown Object (File)
Sun, Nov 10, 1:53 PM
Unknown Object (File)
Sun, Nov 10, 10:14 AM
Unknown Object (File)
Fri, Nov 8, 10:39 PM
Unknown Object (File)
Fri, Nov 8, 7:14 AM
Unknown Object (File)
Fri, Nov 8, 7:14 AM
Unknown Object (File)
Oct 15 2024, 1:34 AM
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.