Page MenuHomePhabricator

[native] Added highlight effect to arrow background
ClosedPublic

Authored by przemek on Oct 27 2022, 6:52 AM.
Tags
None
Referenced Files
F3251708: D5491.diff
Fri, Nov 15, 5:50 PM
Unknown Object (File)
Wed, Oct 23, 11:46 AM
Unknown Object (File)
Wed, Oct 23, 1:10 AM
Unknown Object (File)
Wed, Oct 23, 12:44 AM
Unknown Object (File)
Wed, Oct 23, 12:03 AM
Unknown Object (File)
Tue, Oct 22, 11:21 PM
Unknown Object (File)
Tue, Oct 22, 10:41 PM
Unknown Object (File)
Tue, Oct 22, 9:59 PM

Details

Summary

Solving this: https://linear.app/comm/issue/ENG-2045/add-highlight-effect-to-arrow-background-when-finger-is-on-thread-row

Reorganised SidebarListModal, ChatThreadListSidebar and SidebarItem, so that
SidebarItem doesn't hold button anymore, but rather is wrapped inside it.
Changed arrows SVG, so instead of short and long ones we have arrows extending in both ways and
short arrows that don't extend downwards, so they can finish list of thread sidebars.

Test Plan

Build app in iOS and Android simulator.
Performed extensive visual testing if component is rendered correctly.

Diff Detail

Repository
rCOMM Comm
Branch
fix/row-highlight
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested changes to this revision.Oct 27 2022, 7:27 AM
ginsu added a subscriber: ginsu.

The highlight effect looks great! However, we want to make sure that when the user swipes on a thread, the arrows don't break. Here is the Figma doc for more context

This revision now requires changes to proceed.Oct 27 2022, 7:27 AM

Right, put SwipeableThread inside of Button now, so it is handled properly

przemek attached a referenced file: Unknown Object (File). (Show Details)Oct 27 2022, 9:15 AM

The result looks great!
@kamil please review and add me after accepting.

nice, looks good! thank you for fixing that swipe effect

This revision is now accepted and ready to land.Oct 28 2022, 6:57 AM
kamil added 1 blocking reviewer(s): tomek.
This revision now requires review to proceed.Nov 2 2022, 3:45 AM
tomek requested changes to this revision.Nov 2 2022, 10:04 AM
tomek added inline comments.
native/chat/chat-thread-list-sidebar.react.js
97

This is the default value

native/chat/sidebar-list-modal.react.js
85

We should use callback here

99

We don't need to depend on the whole value when we use only a part of it

This revision now requires changes to proceed.Nov 2 2022, 10:04 AM
przemek marked 2 inline comments as done.

Responded to inline comments. Tries to properly use useCallback resulted in creating extra small component Item added in sidebar-item.react.js.
Spotted a visual bug Swipeable row's height was smaller then height of wrapping component (you can observed it in video above when I swipe threads - green and red buttons do not fill entire height). It should be fixed now.

przemek marked an inline comment as done.
przemek added inline comments.
native/chat/chat-thread-list-sidebar.react.js
97

Didn't know it. Deleted all explicit display: 'flex' from those components

tomek added inline comments.
native/chat/sidebar-list-modal.react.js
118 ↗(On Diff #18049)

There's no need now to accept inexact props - we can specify what we actually need and let renderItem provide only these. In this case, instead of providing a row, we need just item.

This revision is now accepted and ready to land.Nov 4 2022, 6:07 AM