Page MenuHomePhabricator

[native] calculate snap points for connect farcaster bottom sheet
ClosedPublic

Authored by ginsu on Thu, Apr 4, 12:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 12:22 PM
Unknown Object (File)
Tue, Apr 16, 9:47 PM
Unknown Object (File)
Tue, Apr 16, 5:30 AM
Unknown Object (File)
Sat, Apr 13, 9:12 PM
Unknown Object (File)
Sat, Apr 13, 3:26 PM
Unknown Object (File)
Sat, Apr 13, 2:22 PM
Unknown Object (File)
Fri, Apr 12, 10:41 AM
Unknown Object (File)
Thu, Apr 11, 3:44 PM
Subscribers

Details

Summary

In order to correctly get our bottom sheet to snap up to the correct height we need to measure the height of the content of the connect farcaster bottom sheet. To get the correct height of the content, I used the built in element inspector and was able to get the height of each individual piece of the content

Linear task: https://linear.app/comm/issue/ENG-7523/determine-the-content-height-of-the-bottom-sheet

Depends on D11560

Test Plan

Please see the demo video below

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, inka.
ginsu added inline comments.
native/components/connect-farcaster-bottom-sheet.react.js
18 ↗(On Diff #38790)

Rather than just show the final sum, I thought it would be better to show the math in case we ever add to this bottom sheet or make changes to the content in the future

ginsu published this revision for review.Thu, Apr 4, 12:22 PM

will make sure ci passes before landing

atul added inline comments.
native/components/connect-farcaster-bottom-sheet.react.js
18 ↗(On Diff #38790)

Makes sense

Could also make separate variables like

const farcasterPromptHeight = 350
const marginBottomHeight = 40

and let the variable names do explaining vs the comment which you'll have to update every time the calculation changes?

This revision is now accepted and ready to land.Thu, Apr 4, 1:44 PM

address comments + rebase before landing