Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small logic cleanups #3449

Merged
merged 2 commits into from
Apr 9, 2024
Merged

Small logic cleanups #3449

merged 2 commits into from
Apr 9, 2024

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented Apr 8, 2024

Tl;dr we don't want to pass nested callbacks into the Dialog close(cb) callback. I added a error log for this, but it's something that we need to be aware of going forward.

Copy link

github-actions bot commented Apr 8, 2024

Old size New size Diff
6.36 MB 6.36 MB 1.9 KB (0.03%)

* remove a few things

* oops

* stop swallowing the error

* queue callbacks

* oops

* log error if caught

* no need to be nullable

* move isClosing=true up

* reset `isClosing` and `closeCallbacks` on close completion and open

* run queued callbacks on `open` if there are any pending

* rm unnecessary ref and check

* ensure order of calls is always correct

* call `snapToIndex()` on open

* add tester to storybook
@haileyok
Copy link
Contributor

haileyok commented Apr 9, 2024

Merged change in from #3451. Review discussion was in that PR.

Comment on lines +130 to +131
* Note: The dialog will close automatically when the action is pressed, you
* should NOT close the dialog as a side effect of this method.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still seems relevant, will leave

@pfrazee pfrazee merged commit c96bc92 into main Apr 9, 2024
6 checks passed
@pfrazee pfrazee deleted the dialogs-cleanup branch April 9, 2024 22:08
estrattonbailey added a commit that referenced this pull request Apr 12, 2024
* origin/main: (455 commits)
  Use getSuggestions endpoint behind the gate (#3499)
  Added `new_profile_scroll_component` to `Gate` type (#3487)
  Fix useGate lint rule (#3486)
  Make bio area scrollable on iOS (#2931)
  Improve Android haptic, offer toggle for haptics in the app (#3482)
  Search - only enable queries once tab is active (#3471)
  [Statsig] Mark Testflight as staging tier (#3470)
  [Statsig] Typecheck gates (#3467)
  Bump to 1.77 (#3468)
  Search - extra tabs (#3408)
  notify slack on production builds (#3461)
  notify slack on production builds (#3460)
  1.76 release preparations (#3459)
  Update zh-CN translation (#3433)
  Italian Localization (#3388)
  [Statsig] Send prev route name (#3456)
  [Statsig] Instrument feed display (#3455)
  Small logic cleanups (#3449)
  Use ALF for the embed consent modal (#3336)
  Onboarding tweaks (#3447)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants