Commit Graph

758 Commits (9e1eb1f9f17cc4077e3f4c2f5f935f7aadffeffd)

Author SHA1 Message Date
Hailey 0012c6d40f
Add events to signup for captcha results (#4712) 2024-07-01 15:11:04 -07:00
Hailey 91c4aa7c2d
Handle pressing all go.bsky.app links in-app w/ resolution (#4680) 2024-06-27 19:35:20 -07:00
Hailey 0ab6d54093
Add some events to landing screen (#4664) 2024-06-26 19:00:35 -07:00
Hailey 878b0476dd
Better starterpack embed (#4659) 2024-06-26 17:24:33 -07:00
Hailey b23f112689
Remove starterpack gate (#4645) 2024-06-25 17:02:43 -07:00
Paul Frazee ed940c637e
Set up the global 'joined this week' (#4625) 2024-06-24 16:03:32 -07:00
Hailey 873d91d466
use granular permission of for media perm request (#4609) 2024-06-24 11:14:40 -07:00
Hailey f089f45781
Starter Packs (#4332)
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
2024-06-21 21:38:04 -07:00
dan 1715afd80e
[Statsig] Send Discover aggregate interactions (#4599) 2024-06-22 03:54:47 +03:00
dan 7db8dd8980
Add debug feedContext label (#4598) 2024-06-22 02:11:39 +03:00
Paul Frazee 80197556f1
Rework "Who can reply" to blend more nicely into the UI (#4578)
* Rework WhoCanReply controls in threads to blend more nicely

* Fix layout

* Fix post control hitslops

* Move dialog content to separate component

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-06-19 18:39:45 -07:00
Samuel Newman 3dc34be929
GIF previews in notifications (#4447)
* gifs in notifications

* remove try/catch

* Limit try/catch scope

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-06-19 03:09:06 +03:00
Eric Bailey 32b4063185
Verify email reminders (#4510)
* Clarify intent

* Increase email reminder period to once per day

* Fallback

* Snooze immediately after account creation, prevent showing right after signup

* Fix e2e test exports

* Remove redundant check

* Better simple date generation

* Replace in DateField

* Use non-string comparison

* Revert change to unrelated code

* Also parse

* Remove side effect
2024-06-18 17:21:34 -05:00
Paul Frazee d6ce16d15a
Implement thread locking (#4545)
* Add the ability to edit threadgates

* Fix bottom border on mobile

* Refresh thread after threadgate edit
2024-06-18 12:07:56 -07:00
Eric Bailey 983d85384b
Force callers of `getTimeAgo` to pass in the value for "now" (#4560)
* Remove icky hook for now

* Force callers of getTimeAgo to pass in the 'now' value

* Update usage in Newskie dialog
2024-06-18 21:50:07 +03:00
Samuel Newman 5f5d845053
Server-side thread mutes (#4518)
* update atproto/api

* move thread mutes to server side

* rm log

* move muted threads provider to inside did key

* use map instead of object
2024-06-18 21:48:34 +03:00
Eric Bailey 443beda741
Add `useGetTimeAgo` and utils (#4556)
* Create a testable version of ago() and re-enable the disabled test (#4364)

* Enable the test of ago()

* Use test cases

This puts the input and the expected values next to each other.

* Create dateDiff function

This is a copy of ago(), but with the ability to specify the second date instead of using Date.now().

* Let ago() use dateDiff()

* Move constants close to usage

* Test dateDiff instead of ago

This makes it possible to test the dates without being forced to rely on what the current date is.

The commented out tests do not yet pass. This is fixed in later commits.

* Update dateDiff and enable the remaining tests

* Split up tests, use date-fns as helpers

* Remove old test

* Add long format

* Add hook

* Migrate to hooks

* Delete old code

* Or equal to

* Update comment

---------

Co-authored-by: Jan Aagaard <jan@aagaard.net>
2024-06-18 10:55:02 -05:00
Eric Bailey 332524b7de
Add `native_pwi_disabled` feature gate experiment (#4507)
* Add native_pwi_disabled feature gate experiment

* Use const
2024-06-17 13:21:09 -05:00
Samuel Newman bdeac28d74
Try/catch URL parsing of referrer (#4511) 2024-06-13 15:06:22 -07:00
Hailey d9066a6beb
add `document.referrer` to statsig custom (#4509)
* add referrer to statsig custom

dont include referrer if hostname is bsky.app

save

add `document.referrer` to statsig custom

* add a hostname field

* account for ssr

* account for ssr
2024-06-13 23:31:19 +02:00
Eric Bailey bb0a6a4b6c
Add KnownFollowers component to standard profile header (#4420)
* Add KnownFollowers component to standard profile header

* Prep for known followers screen

* Add known followers screen

* Tighten space

* Add pressed state

* Edit title

* Vertically center

* Don't show if no known followers

* Bump sdk

* Use actual followers.length to show

* Updates to show logic, space

* Prevent fresh data from applying to cached screens

* Tighten space

* Better label

* Oxford comma

* Fix count logic

* Add bskyweb route

* Useless ternary

* Minor spacing tweak

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2024-06-11 15:42:28 -07:00
Eric Bailey 4b6609d48b
Move feeds screen into common navigator, handle usages (#4365)
* Move feeds screen into common navigator, handle usages

* Add link to Feeds from home screen (#4366)

* Add link to feeds to home screen header

* Center logo

* Replace icons

* Tweak spacing

* Tweak spacing

* Swap icon, sizing

* Buttonize, size

* Make menu same alignment on all screens

* Remove FeedsTab support, enable drawer swipe on MessagesTab

* Add note

* Vertically align header

* Swap in Pin

* Use hashtag icon

* Remove png

* Fix reference

* Ensure alignment with home and other screens
2024-06-11 11:08:06 -07:00
Hailey fac5f6cdac
register the push token after request has been approved on android (#4481)
* register the push token after request has been approved on android

* use a `0` string for badge count

* Revert "use a `0` string for badge count"

This reverts commit efac39861817f4237c58211f68ef266d919b4d40.

* temporary fix
2024-06-11 10:28:48 -07:00
Hailey c73ad43a80
stop using `addPushTokenListener` (#4467)
* stop using push token listener

* cleanup the hack

* add a comment

* remove test code

* Fix patch

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-06-11 03:16:21 +02:00
Hailey 5dd195bcb7
Check `canAskAgain` for notification permissions (#4460) 2024-06-10 12:14:00 -07:00
dan 620ab88713
Ungate mobile web notification badge (#4459) 2024-06-10 18:17:26 +02:00
Francesco Lodovici b688da8d58
Fix (#4430): Use separate hooks for shell mode animated styles (#4451)
* Fix (#4430): Use separate hooks for shell mode animated styles

* Consolidate in one file

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-06-10 17:19:28 +02:00
Hailey 480a40862f
Use the proper logic on iOS to increment the badge (#4233) 2024-06-07 15:15:33 -07:00
Hailey 492c271a06
add `legacy` to picker for Android (#4377)
* add `legacy` to picker

* add for the other callsite
2024-06-05 16:27:57 -07:00
Hailey 42477d8bbb
add notification count badge mobile web (#4375)
* add notification count badge mobile web

* rename var

* add gate to types

* implement gate

* nit

* Fix condition order, narrow types

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-06-05 18:13:42 +01:00
Eric Bailey 3e1f076891
[🙅] Disambiguation of the deactivation (#4267)
* Disambiguation of the deactivation

* Snapshot crackle pop

* Change log context

* [🙅] Add status to session state (#4269)

* Add status to session state

* [🙅] Add new deactivated screen (#4270)

* Add new deactivated screen

* Update copy, handle logout

* Remove icons, adjust padding

* [🙅] Add deactivate account dialog (#4290)

* Deactivate dialog

(cherry picked from commit 33940e2dfe0d710c0665a7f68b198b46f54db4a2)

* Factor out dialog, add to delete modal too

(cherry picked from commit 47d70f6b74e7d2ea7330fd172499fe91ba41062d)

* Update copy, icon

(cherry picked from commit e6efabbe78c3f3d9f0f8fb0a06a6a1c4fbfb70a9)

* Update copy

(cherry picked from commit abb0ce26f6747ab0548f6f12df0dee3c64464852)

* Sizing tweaks

(cherry picked from commit fc716d5716873f0fddef56496fc48af0614b2e55)

* Add a11y label
2024-06-04 02:10:43 +01:00
Eric Bailey de93e8de74
[🐴] Post embeds polish (#4339)
* Handle message cleanup

* Handle last message in chat list

* Memoize lastMessage
2024-06-04 02:07:01 +01:00
Thomas Dickerson bd4703ca1e
Support for Flickr album and group pool embeds (#3936)
* Support for Flickr album and group pool embeds

* Oops, forgot to add flickr to the persisted externalEmbeds schema

* Need a bigint since our id can have more than 52 bits...

* Remove unexpected trailing / from test data to match the expected behavior

* nits

---------

Co-authored-by: Hailey <me@haileyok.com>
2024-06-03 17:29:45 -07:00
Samuel Newman cd3b502b34
[🐴] Option to share via chat in post dropdown (#4231)
* add send via chat button to post dropdown

(cherry picked from commit d8458c0bc344f993266f7bc7e325d47e40619648)

* let usePostQuery take uris with DIDs

(cherry picked from commit 16b577ce749fd07e1d5f8461e8ca71c5b874a936)

* add embed preview in composer

(cherry picked from commit 795ceb98d55b6a3ab5b83187a582f9656d71db69)

* rm log

(cherry picked from commit 374d6b8869459f08d8442a3a47d67149e8d9ddd4)

* remove params properly, or at least as close to

(cherry picked from commit c20e0062c2ca4d9c2b28324eee5e713a1a3ab251)

* show images in preview

(cherry picked from commit 5bb617a3ce00f67bfc79784b2f81ef8dcb5bfc25)

* Register embed immediately

(cherry picked from commit ee120d5438a2c91c8980288665576d6a29b4c7e7)

* Add hover to match embeds

(cherry picked from commit 5297a5b06e499f46a9f6da510124610005db2448)

* Update post dropdown copy

(cherry picked from commit bc7e9f6a4303926a53c5c889f1f1b136faf20491)

* Embed preview style tweaks

(cherry picked from commit 9e3ccb0f25ac2f3ce6af538bb29112a3e96e01b1)

* use hydrated posts from API and just use postembed component

(cherry picked from commit cc0b84db87ca812d76cc69f46170ae84cfdde4ef)

* fix type error

(cherry picked from commit 9c49b940e1248e8a7c3b64190c5cb20750043619)

* undo needless export

(cherry picked from commit 1186701c997c50c0b29a809637cb9bc061b8c0a0)

* fix overflow

(cherry picked from commit 8868d5075062d0199c8ef6946fabde27e46ea378)

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-31 11:10:00 -05:00
Samuel Newman 8eb3cebb36
[🐴] send record via link in text (Record DMs - base PR) (#4227)
* send record via link in text

* re-trim text after removing link
2024-05-31 10:41:06 -05:00
Samuel Newman 455937dd0f
Use new icons on notifications screen (#4299)
* use new icons on notif screen

* replace placeholder icon too

* cull unused legacy icons
2024-05-31 13:13:01 +01:00
Samuel Newman 8569e2e389
Add follow button to feed item avatar (#3560)
* add follow button to feed item avatar

* remove confirmation

* add confirmation (just system alert)

* Shrink the avi follow indicator a smidge

* gate the follow button

* remove from your own posts

* add to post thread item

* hide the follow button locally to component

* Use native dropdown

* Add follow btn to notifications and search

* UI tweaks

* Hide on PWI

* Add toast for confirmation

* Check gate last

* compiler

* Rm unused

* Use names

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-31 05:05:52 +01:00
Hailey 8e2c21a882
Don't log downsample warning when unnecessary (#4291)
* fix log

use process.env

ensure the log happens regardless of `isDownsampledSession`

fix log

* oops, revert test
2024-05-31 01:52:56 +01:00
dan d6275e98c2
[Statsig] Sample noisy events (#4288)
* Sample state:background and state:foreground

* Sample feed events

* Add DEV protection against forgetting to add events to the list
2024-05-30 16:32:59 +01:00
Paul Frazee 5fe1e171f0
Improve the visual clarity of labels on profiles and posts (#4262)
* Update PostAlerts rendering to show the avi of the labeler rather than the display name; also add size variations

* Update ProfileHeaderAlerts to match PostAlerts behavior
2024-05-30 05:33:18 +01:00
Hailey eb6f44853d
adjust notifications experiment by removing `canAskAgain` (#4271)
* adjust notifications experiment by removing `canAskAgain`

* move to `StepFinished` for after onboarding
2024-05-30 02:42:12 +01:00
Samuel Newman 33de856c32
match web version exports (#4257) 2024-05-29 12:00:15 +03:00
dan ff6a044f66
Bump more Expo libs (#4251)
* Bump more Expo libs

* Use legacy camera API

* fix `expo-notifications` patch

* bump `menu`

* change patch name

* patch reanimated

* Revert "patch reanimated"

This reverts commit dad822d8ea04c71a609784114d60f2e67b78290b.

* Use nightly reanimated

* Revert "Use nightly reanimated"

This reverts commit 6687c7182883feb889cbf2c67dd14890e06bc501.

* Revert "Revert "patch reanimated""

This reverts commit c30abd6732f559ca04dc59698411e1058800d63e.

---------

Co-authored-by: Hailey <me@haileyok.com>
2024-05-29 05:02:49 +01:00
Hailey 8f8af476cc
Bump `react-navigation` (#4216)
* bump and rm patch

* fix types

* use `Home` default

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-29 02:38:52 +01:00
Hailey 888bec7b4f
Upgrade to Expo 51 and React Native 0.74 (#3980)
* upgrade packages

* remove `expo-image-picker` patch

* remove old expo-updates patch

* rename rn patch

* downgrade crop picker

* bump `ExpoGifView` `SDWebImage` version

* apply config changes

* update build docs for apple silicon

* update build docs for apple silicon

* update expo-updates patch

* add back patch readme

* bump `expo-dev-client`

* bump `babel-preset`

* update `babel.config.js`

* update `react-native-paste-input` patch

* remove old ota updates hook

* update types

* update types

* downgrade pager-view

* update animated ref type

* fix web-only type

* update `react-native-bottom-sheet` `BottomSheetTextInput`

* add `expo-application` to jest mocks

* remove reanimated patch

* update notifications patch

* update reanimated path

* fix import

* update yarn.lock

* use `ItemT` instead of `any`

* expo bump

* Revert logic change, fix types

* Fix JSON file

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-29 02:15:35 +01:00
dan adbbded003
Remove old onboarding (#4224)
* Hardcode onboarding_v2 to true, rm dead code

* Rm initialState, use initialStateReduced

* Rm dead code

* Drop *reduced prefix in code

* Prettier
2024-05-28 16:56:06 +01:00
dan 9bd411c151
Replace getAgent() with reading agent (#4243)
* Replace getAgent() with agent

* Replace {agent} with agent
2024-05-28 16:37:51 +01:00
Samuel Newman dc9d80d2a8
[🐴] update convo list from message bus (#4189)
* update convo list from message bus

* don't increase unread count if you're the sender

* add refetch interval back

* Fix deleted message state copy

* only enable if `hasSession`

* Fix logged out handling

* increase refetch interval to 60s

* request 10s interval when message screen active

* use useAppState hook for convo resume/background

* Combine forces

* fix useFocusEffect logic

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-24 13:59:28 -05:00
Hailey 85782aeb93
[🐴] Don't submit the message on return press when on a phone (web input) (#4203)
move this to the `onKeyDown` prop

Revert "do the same for tablets"

This reverts commit 47c709e2734f2acf34f89dd5aca42a75a2b56270.

do the same for tablets

don't submit message if the device is a phone on web

move `onTouchStart` to `browser.ts` globals
2024-05-23 19:45:50 -07:00
Hailey af20229b41
Add `bundleDate`, `bundleIdentifier` to `StatsigUser` (#4199)
* record event for fetched ota update

* Revert "record event for fetched ota update"

This reverts commit 4b49efe036c0c9605eabf1d5715586d093d60e9e.

* add `bundleDate` to `StatsigUser`

* include `bundleIdentifier` too

* move to `custom`
2024-05-23 19:52:36 +01:00
Samuel Newman b093e0b673
[🐴] better error message for "Bad token scope" error (#4194)
* better error message for "Bad token scope" error

* log -> sign
2024-05-23 18:05:30 +01:00
Hailey d051614342
implement a safari hack for ime (#4186)
remove debug logs

use a better hack

implement a safari hack

extract `isSafari` and `isFirefox` to a global variable
2024-05-23 16:45:24 +01:00
dan e6e7027d01
Cleanup gates (#4170)
* Unlaunch disable_poll_on_discover_v2

* Rm unused gates

* Unlaunch autoexpand_suggestions_on_profile_follow_v2

* Launch disable_min_shell_on_foregrounding_v3
2024-05-22 18:19:07 +01:00
dan d6625c29d1
[Statsig] Sample router events (#4143) 2024-05-20 20:28:12 -07:00
Samuel Newman 4a7436886d
remove DMs gate (#4112) 2024-05-20 19:29:22 -05:00
Eric Bailey a7b0242cc8
[🐴] Empty chat prompt (#4132)
* Add empty chat pill

* Tweak padding

* move to `components`, place inside `KeyboardStickyView`

* cleanup unused vars

* add a new animation type

* (unrelated) add haptic to long press

* adjust shrink and pop

---------

Co-authored-by: Hailey <me@haileyok.com>
2024-05-20 16:56:44 -07:00
dan 4fa92d7a49
[Statsig] Fix exposure logging for reduced onboarding (#4131)
* Add dangerouslyDisableExposureLogging option

* Rename onboarding gate to v2

* Disable exposure logging for onboarding in PostFeed query
2024-05-21 00:17:57 +01:00
Hailey 516eb69637
[🐴] Add new chat metrics (#4130)
* remove a comment

* add types for event, add log to profile button

* add `chat:open`

* add to chat list items

* fix types

* oops

* oops 2.0
2024-05-20 15:26:05 -07:00
Eric Bailey d0bfe703d9
[🐴] Switch back to encouraging users to report messages (#4117)
* Swap prompt back in

* Remove unused convoAccount affordances
2024-05-20 13:49:20 -05:00
Hailey 2eaecfcaa4
[🐴] Reset screen when pressing a DM notification while already in the conversation screen (#4091)
* add a small comment

* reset if current screen
2024-05-18 12:23:24 -07:00
Hailey d2c81c9d3d
Disable badge incrementing for DMs (#4088)
* disable badge increments for dms

* revert decrementing in js for dms

* reset badge on read notifications

* remove some other code

* prevent duplicate notification events
2024-05-17 16:05:32 -07:00
Eric Bailey 8b3bfb3cf7
Make generic convo report dialog (#4085) 2024-05-17 17:56:58 -05:00
Hailey d02e0884c4
[🐴] Block Info (#4068)
* get the damn thing in there 😮‍💨

* more cleanup and little fixes

another nit

nit

small annoyance

add a comment

only use `scrollTo` when necessary

remove now unnecessary styles

* move padding out

* add unblock function

* rm need for moderationpts

* ?

* ??

* extract leaveconvoprompt

* move `setHasScrolled` to `onContentSizeChanged`

* account for block footer

* wrap up

nit

make sure recipient is loaded before showing

refactor to hide chat input

typo squigglie

add report dialog

finalize delete

implement custom animation

add configurable replace animation

add leave convo to block options

* correct functionality for report

* moev component to another file

* maybe...

* fix chat item

* improve

* remove unused gtmobile

* nit

* more cleanup

* more cleanup

* fix merge

* fix header

* few more changes

* nit

* remove old
2024-05-17 16:21:15 -05:00
Hailey 5e312d5f3a
[🐴] Don't always show notification for everything (#4083)
* don't always show a notification

* nit
2024-05-17 09:23:46 -07:00
Hailey 5e8650a204
[🐴] Decrement app badge when opening unread chat (#4040)
* decrement badge count for chats

* handle decrement in `useMarkAsRead`

* remove async

* oops
2024-05-16 12:15:35 -07:00
Hailey ef0ce951e7
[🐴] Only scroll down one "screen" in height when foregrounding (#4027)
* maintain position after foreground

* one possibility

* don't overscroll when content size changes.

* ignore the rule on 1 item

* fix

* [🐴] Pill for additional unreads when coming from background (#4043)

* create a pill with some animatons

* add some basic styles to the pill

* make the animations reusable

* bit better styling

* rm logs

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>

* import

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
2024-05-16 10:40:12 -07:00
Eric Bailey 98af0e8678
Handle failed resumeSession case when switching accounts (#4047) 2024-05-16 10:46:20 -05:00
Hailey bf7b66d5c1
Add push notification extensions (#4005)
* add wav

* add sound to config

* add extension to `updateExtensions.sh`

* add ios source files

* add a build extension

* add a new module

* use correct type on ios

* update the build plugin

* add android handler

* create a patch for expo-notifications

* basic android implementation

* add entitlements for notifications extension

* add some generic logic for ios

* add age check logic

* add extension to app config

* remove dash

* move directory

* rename again

* update privacy manifest

* add prefs storage ios

* better types

* create interface for setting and getting prefs

* add notifications prefs for android

* add functions to module

* add types to js

* add prefs context

* add web stub

* wrap the app

* fix types

* more preferences for ios

* add a test toggle

* swap vars

* update patch

* fix patch error

* fix typo

* sigh

* sigh

* get stored prefs on launch

* anotehr type

* simplify

* about finished

* comment

* adjust plugin

* use supported file types

* update NSE

* futureproof ios

* futureproof android

* update sound file name

* handle initialization

* more cleanup

* update js types

* strict js types

* set the notification channel

* rm

* add silent channel

* add mute logic

* update patch

* podfile

* adjust channels

* fix android channel

* update readme

* oreo or higher

* nit

* don't use getValue

* nit
2024-05-15 11:49:07 -07:00
Samuel Newman ebc7571368
reword subtitle (#4017) 2024-05-14 21:18:54 +01:00
Paul Frazee 107760d551
Add better onboard testing (#4007) 2024-05-13 20:23:31 -07:00
Hailey fd704bfd44
add a `Login` notifications request (#4006) 2024-05-13 19:51:12 -07:00
Eric Bailey 95514e3af7
[Reduced Onboarding] Fix forward/backward nav with profile step (#3997)
* WIP

* Fix forward-backward to profile step

* [Reduced Onboarding] Add avatar metric (#3999)

* Add prop to finished event

* Fix type

* Use separate event
2024-05-13 16:54:12 -05:00
Samuel Newman 5d92ac2ce3
dont send message if >1000 graphemes (#3995) 2024-05-13 22:36:56 +01:00
Paul Frazee 27bb73c701
New onboarding tests (#3996)
* Add onboarding test

* Add onboarding avatar-creator test

* Update profile screen edit test
2024-05-13 14:20:27 -07:00
Hailey 8e1541e0a5
actually register token on permissions change (#3990)
* actually register token on permissions change

* actually register token on permissions change

* get updated permissions every time

* remove all usages of `usePermissions`

* skip perms check on granted result from request
2024-05-13 11:11:35 -07:00
Hailey d3406c89cf
Move request for notifications permissions to `HomeReadyScreen` (#3977)
* cleanup the current logic

* add statsig logs

* implement requests for permissions where needed

* oops

* let `addPushTokenListener` handle the token registration

* place new log event type with the other `notifications` type

* place registration next to handler

* more organization

* only call `gate()` if permission is not yet granted

* be more specific to prevent gate pollution

* nit

* make `token` non-optional in `registerToken`

* remove `prevDid`, move `registerPushToken` into `useEffect`

* keep it outside actually

* nit
2024-05-13 09:19:35 -07:00
Hailey 5cd4ac3a34
get a little more accurate with month length (#3981)
* get a little more accurate with month length

* create some wiggle room, create some specific tests

* update more tests
2024-05-13 08:39:34 -07:00
Hailey 73d094c67e
Delete the entire temporary directory instead of just the temp file, also use `cacheDirectory` over `documentDirectory` (#3985)
* lint

* remove extra arg
2024-05-13 02:10:29 -07:00
Matthieu Sieben 00a57df5b1
Fix "Download CAR file" on mobile (#3816)
* download CAR file using AtpAgent instead of building URL

* add loader icon on download car button

* actually save to disk on android

* style nits

* bottom margin nit

* localize toast

* remove fallback so back button works correctly

* keep throwing an error if mime type isn't used

* be more explicit with toasts

* send errors to sentry when encountered

---------

Co-authored-by: Hailey <me@haileyok.com>
2024-05-12 14:18:42 -07:00
dan 4458b03173
FeedFeedback fixes (#3968)
* Lower seen threshold to 1.5s

* Send feedContext for replies

* Use a simpler and more reliable feedContext fallback

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2024-05-12 10:30:00 -07:00
Paul Frazee 6f5b551bda
Add shutdown message to for you feed (#3776) 2024-05-11 05:57:21 +01:00
Eric Bailey 4e37e2f59b
[Reduced Onboarding] Add profile step (#3933)
* Onboarding avatar creator or upload (#2860)

* add screen to onboarding flow

* update base

* add icon

* fix icon

* fix after merge

* create flatlist

* add emoji list

* add state context, pressables

* select/update

* add camera icon

* add photo selection button

* image selection

* cleanup

* add most needed icons

* fix icon naming

* add icons

* export path strings for emoji

* canvas drawing for web

* types

* move breakpoints to individual steps

* create canvas

* canvas working 🎉

* update state

* it works!

* working on both platforms

* remove comments

* remove log

* remove unused web canvas

* animate picture selection/removal

* compress images on web correctly

* add times icon

* scrollable horizontal flatlist on web

* prefetch

* adjustments

* add more assets

* remove unused smiles

* add all the icons

* adjust color options

* animate grow/shrink selections

* change layout on tablet/desktop

* better web layout

* fix path

* adjust web layout

* organize

* organize imports and cleanup styles

* make generated images smaller

* implement design changes

use row for buttons on web

use RNGH FlatList

random color at start

improve logic

update dialog for web

update dialog style on mobile

some more progress

create dialog

simplify context

start implementing design

* rm change

* cleanup imports

* trigger a pr label

* Formatting

---------

Co-authored-by: Eric Bailey <git@esb.lol>
(cherry picked from commit 087186e3867b0eefb11a056b0b644f5585fa16bd)

* UI tweaks

* Revert layout change

* Gate avi upload

* Support returning to profile step

* Add Statsig

---------

Co-authored-by: Hailey <me@haileyok.com>
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-11 05:37:23 +01:00
Eric Bailey 08979f37e7
Movable following feed (#3593)
* Handle home algo with backwards compat

* Remove todo, fix pwi view

* Simplify filter logic

* Handle edge case

* Handle home algo in FeedSourceCard

* Fix handling of pinned feed if home algo is disabled

* Handle home algo on ProfileFeed screen

* Rename

* Fix pinned feeds key

* Improve perf of pinned feeds with primary algo

* Update statsig API

* Revert unneeded changes

* Support following feed as well

* Better formatting

* Clarify primary algo usage

* Better comment

* Handle saved feed screen edge case

* Restore Feeds sparkle, fix line height

* Move gate call down

* Filter out primary algo from feeds page

* Filter dupe from Feeds screen

* Simplify logic

* Missing following handling

* Hide primary feed setting outside exp

* Revert testing change

* Migrate usePinnedFeedInfos

* Migrate FeedSourceCard

* Migrate Feeds screen

* Migrate SavedFeeds screen

* Handle timeline in feed infos

* Finish migrating ProfileFeed, FeedSourceCard

* Migrate ProfileList

* Finalize mutation hooks

* Allow unsaving lists

* Handle following feed on Feeds screen

* Handle following on SavedFeeds

* Get rid of deprecated interface usages

* Handle no pinned feeds

* Handle no feeds on Feeds screen

* Reuse component on SavedFeeds screen

* Handle no following feed

* Remove primary algo references

* Migrate to new plural APIs

* Remove unused event

* Prevent duplicate keys

* Make handling much more clear

* Dedupe useHeaderOffset

* Filter unknown feed types at source

* Use just following

* Immprove key handling

* Resume from last tab

* Bump sdk

* Revert Gemfile

* Additional protection in FeedSourceCard

* Fix ProfileList save/unsave handling

* Translate

* Translate

* Match existing handling post-signup

* Ensure onboarding results in correct selected feeds

* Some testing tweaks on create/onboarding

* Revert primary algo consderations

* Remove comment

* Handle default feed setting

* Rm unnecessary type cast

* Remove premature gate check

* Remove nullable check in onPageSelecting, assume the pager checks bounds

* Use null for default selected feed

* Rm unrelated change

* Remove the concept of __key__

I don't think this concept is consistent.

It's introduced on FeedSourceInfo which is used both by pinned feeds and by useFeedSourceInfoQuery. Pinned feeds use the pinning ID there. But there is no pinning ID for useFeedSourceInfoQuery. So this means this field is sometimes one thing and sometimes some other thing. That is a decent sign that it shouldn't be on that type at all.

It's not used anywhere except the desktop feed enumeration. It seems reasonable to assume there that we wouldn't want to show the same feed URL twice. (And if it does occur in the array twice, IMO we should solve that at the API level and dedupe it on read or next write.) So I think we should just use the URL in that place. (I used the descriptor, which is equivalent.)

* Dedupe pinned feeds by URL on read

* Filter timeline out of mergefeed sources

* Put FeedDescriptor into FeedSourceInfo

* Group saved info with feed for pins

This removes a loop within a loop within a loop.

* Fix Feeds link on native

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-11 04:39:21 +01:00
Samuel Newman ab21aafc28
[🐴] Report message dialog (#3941)
* message report dialog

* report chat prompt

* typo

* 100% height sheet on android

* messages-specific report options

* restore unwanted sexual content

* chat -> conversation
2024-05-10 17:52:21 +01:00
Hailey e729647c02
[🐴] Adjust messages list styles (#3945)
* some initial tweaks

* tweaks

* more tweaks

* tweak chat header

* properly align placeholders

* tweak web header

* one more...

* remove extra loading states from chat

* limit line count for display name

* Tweaks styles (#3949)

* Adjust sizing

* Consistent font size

* Adjust header

* oops

* fix accessibility in list

* don't use `identifier` for notifications, use `dates` instead

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-10 08:09:00 -07:00
Samuel Newman becc708c61
[🐴] Rich text in messages (#3926)
* add facets to message

* richtext messages

* undo richtexttag changes

* whoops, don't redetect facets

* dont set color directly

* shorten links and filter invalid facets

* fix link shortening

* pass in underline style
2024-05-09 21:08:56 +01:00
Hailey 17e3b946cb
Handle push notifications for DMs (#3895)
* add some better handling for notifications

prep merge

move `useNotificationsListener` into shell

progress

better structure

only show messages notifications while using app if it is the current account

progress

only emit on native

current chat emitter

only show alerts for the current chat

type

add logs

setup handlers

* remove event emitter

* just needs cleanup

* oops

* remove unnecessary `queryClient` param

* few fixes

* cleanup

* nit

* remove folds

* remove comment

* simplify if

* add back invalidate

* comment out other navigations for now

* rename type

* handle various navigation cases

* push to conversation from notification

* update badge in all cases except `chat-message`

* ensure no duplicate notifications

* rm unused `animationOnReplace`

* revert to using `goBack` in the conversation header

* add todo comment
2024-05-09 10:04:05 -07:00
Eric Bailey 1341845537
Add gate, a:a swap onboarding state (#3930) 2024-05-09 11:34:36 -05:00
dan 0910525e2e
[Session] Code cleanup (#3854)
* Split utils into files

* Move reducer to another file

* Write types explicitly

* Remove unnnecessary check

* Move things around a bit

* Move more stuff into agent factories

* Move more stuff into agent

* Fix gates await

* Clarify comments

* Enforce more via types

* Nit

* initSession -> resumeSession

* Protect against races

* Make agent opaque to reducer

* Check using plain condition
2024-05-08 03:30:55 +01:00
Samuel Newman 7d72dfb1cb
[GIFs] Restore default alt text (#3893)
* restore default alt text

* factor out gif alt logic + enable require alt text setting

* rm console.log

* don't prefill input + esc handling

* typo

* Nits

* shorten user alt prefix

* Remove unnecessary condition, rename for clarity

* Add comment

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-07 20:05:40 +01:00
Hailey 790a9c4fad
fix bad bool check in action (#3885)
* fix bad bool check in action

* add `fetch-depth` so we can get the commit hash

* `.env` should be in `.easignore` 🙃
2024-05-06 20:13:12 -07:00
Paul Frazee 901feba6db
Replace pluralize by plural by @tkusano (#3882)
* Replace pluralize with plural or Plural
* Replace all pluralize (defined by src/lib/strings/helpers.ts) with plural or Plural (defined by @lingui/macro) to make some UI elements translatable.
* Delete pluralize() and related test.

* Import @formatjs polyfill libraries for plural on ios and android

- ios and andorid: import `@formtjs/intl-locale` and `@formatjs/intl-pluralrules` to polyfill `Intl.Locale` and `Intl.PluralRules` which are used in `plural()` and '<Plural />'.
- update `plural` use in notification messages for better translation.

* Rewrite to pass lint

* Add Catalan plural polyfill

* more replacement

* import zh plural data for zh-CN

* Refactor feed header components (#2964)

* Move home-related files to view/com/home

* Add HomeHeader in front of FeedTabBar

* Move isDekstop check outside FeedsTabBar

* Remove PWI logic from tabbar

* Separate platform-specific layout from shared logic

* Rename Home Feed Prefs to Following Feed Prefs (#2965)

* use `useOpenLink` hook for links in ALF (#2975)

* use `useOpenLink` hook for links in ALF

* web only for `outline`

* increase timeout to 15s (#2958)

* Normalize relative day (#2874)

* fix: normalize relative date

* chore: add comments

* refactor: skip flooring normalized diff

* refactor: let -> const

* fix: get own copy of date to prevent mutating

* refactor: rounding does the same trick

* Add handle validation to create account UI (#2959)

* show uiState errors in the box as well

simplify copy

update ui for only letters and numbers

add ui validation to handle selection

* simplify names

* Fix accidental text-node render

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>

* Make dim theme dim (#2966)

* Make dim color scheme dim

* Tweaks

* Overall tweaks

* We have to go darker

* Tweak saturation of blues in dim

* Increase contrast on dark-dark mode

* adjust dim

---------

Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Co-authored-by: Hailey <me@haileyok.com>

* Fix dim mode unread notif color

* use `showControls` to show/hide live text icon on ios (#2982)

* Update .po files

* fix reversed icons in validator 🤦 (#2991)

* Adjust `windowSize` on `PostThread` `FlatList` (#2989)

* adjust window size, cells batching period

* rm batching period change

* Pluralize 'follow(s)'

* Include a space between the msgid count and "follower(s)/following(s)" so the translator can adjust the translated count line to fit within the Drawer.

* pluralie '# following'

* Fix & Update

* Rewrite to use Plural

* rmeove unused import

* When commiting changes, disable 'simple-import-sort' plugin in .eslintrc.js to sync with bluesky-social:main

* Revert simple-import-sort/imports related changes

* Move ProfileHoverCard web to plural util

* Followings -> following

* Add plural following to hovercard

* Followings -> Following

---------

Co-authored-by: Takayuki KUSANO <kusano@tkusano.jp>
Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com>
Co-authored-by: dan <dan.abramov@gmail.com>
Co-authored-by: Hailey <me@haileyok.com>
Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>
Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-06 16:55:57 -07:00
Paul Frazee fe82257801 Dont leave promise unresolved 2024-05-06 15:44:19 -07:00
Paul Frazee e1940983a3 Merge branch 'fix-banner-cropper' of https://github.com/piotrpalek/social-app into piotrpalek-fix-banner-cropper 2024-05-06 15:30:54 -07:00
Hailey b34d224207
remove `hide_vertical_scrollbars` test (#3855) 2024-05-06 20:59:36 +01:00
Hailey 91f8202549
fix typo in `app-info` (#3863) 2024-05-04 16:45:59 -07:00
Hailey 4862bc2ba8
add bundle identifiers to app-info (#3861)
* add bundle identifiers to `app-info`

* add them to the `.env.example`

* add environment variables for docker build

* add environment variables for native builds and bundles

* also include the hour in bundle date

* organize app info better in settings
2024-05-04 16:33:10 -07:00
dan 4a2d4253e5
[Session] Align state and global agent switchpoints (#3845)
* Adopt synced accounts unconditionally

* Remove try/catch around resuming session

* Move to login form on resume failure

* Restructure code flow for easier reading

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-03 17:57:09 +01:00
dan 85b34418ef
Don't clear toasts when changing users (#3843)
* Move ThemeProvider to the top

* Move RootSiblingParent above the remounted part

* Move ToastContainer outside the remounted part

* Remove setTimeout around toasts

* Consistently handle dropped session
2024-05-03 16:36:58 +01:00
dan b86c3b486f
Improve account switcher pending state (#3827)
* Protect against races

* Reduce UI jank when switching accounts

* Add pending state to selected account

* Disable presses while pending
2024-05-02 21:55:50 +01:00
Samuel Newman 6da18e3dcf
Only run "disable min shell on foregrounding" behaviour if on the home screen (#3825)
* change useEffect to useFocusEffect

* v2 -> v3
2024-05-02 21:27:54 +01:00
Samuel Newman aca55cb192
rename "MessagesList" to "Messages" (#3826) 2024-05-02 21:02:45 +01:00
dan 1a07e23192
[Session] Extract selectAccount out (#3812) 2024-05-02 18:25:09 +01:00
Paul Frazee 31cb3e5422
Performance improvements: structural sharing & moderation opts context (#3785)
* Fix: correctly apply structural sharing to preferences object

* Move moderation opts into a context

* Fix import

* Remove log

* Pass userdid directly

* Pass moderationPrefs directly
2024-04-30 21:06:51 -07:00
dan 2b7d796ca9
Session fixes, pt. 1 (#3762)
* Update persisted schema for new source of truth, implement in existing session

(cherry picked from commit b1e5f12baee932721d66c60dd51c981b46b0c274)

* Improve toasts, log caught error, during switch account

(cherry picked from commit fe0d1507063d2e532b7b1a447670b689292d1dc3)

* Handle thrown errors from initSession during login

(cherry picked from commit 2c85c045917e923901284b9ba310a82e28f37b5c)

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-04-30 17:38:05 +01:00
Eric Bailey a4e34537ce
Send Bluesky feeds and suggested follows more data (#3695)
* WIP

* Fix constructors

* Clean up

* Tweak

* Rm extra assignment

* Narrow down the argument

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-29 22:04:35 +01:00
dan 1dd3d6657c
Account for momentum when hiding minimal shell (#3740)
* Add optional momentum events to scroll context

* If there is a velocity, don't snap until momentum end

* Don't show bar on scroll down

* Rm onMomentumBegin
2024-04-28 17:48:20 +01:00
Mary 74cd1d4458
YouTube Music as supported player (#3736) 2024-04-27 22:11:08 -07:00
Piotr P bc956803b8 allow for custom cropper aspect ration based on image 2024-04-27 14:31:45 +02:00
Piotr P ebd333b331 Fix cropper crashing after clicking cancel 2024-04-27 14:31:39 +02:00
Piotr P ae26963b45 eslint autofixes 2024-04-27 14:31:33 +02:00
Samuel Newman ce85375c85
[Clipclops] New routes with placeholder screens (#3725)
* add new routes with placeholder screens

* gate content

* add filled envelope style

* swap filled state

* switch to `useAgent`
2024-04-27 05:54:18 +01:00
Samuel Newman 1af59ca8a7
Special-case bsky.app/download to open share sheet or copy to clipboard (#3710)
* special-case bsky.app/download to share

* Address feedback

* Improve detection

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-27 05:25:28 +01:00
Eric Bailey d8c8e1e854
[Session] Drill `getAgent` into notifications handlers (#3705)
* Drill into notifications handlers

(cherry picked from commit 7ac9e500866732e1f2e205bbe96e70db331e5ffb)

* Thread getAgent instead

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-25 21:57:45 +01:00
Eric Bailey ec37696034
[Session] Drill `getAgent` into feed APIs (#3701)
* Update to desired post-feed usage

* Drill agent into feed apis

* Thread getAgent instead

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-25 21:29:06 +01:00
Eric Bailey 6aded4f257
[Session] Base (#3541)
* Add readLastActiveAccount to use accounts[] as source of truth

* Add public service constant, use
2024-04-25 10:35:21 -05:00
Hailey c3fcd486b3
Cleanup files after each iteration of compression and downloading (#3599)
* delete image on each iteration of compression

* replace a few other instances of `unlink()`

* ensure that moving to the permanent path will succeed

* use `cacheDirectory`

* missing file extension?

* assert

* Remove extra .

* Extract safeDeleteAsync, fix normalization

* Normalize everywhere

* Use safeDeleteAsync in more places

* Delete .bin too

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-25 01:12:36 +01:00
dan 90c3ec8749
Ignore image responses on non-200 status (#3693)
* Ignore image responses on non-200 status

* Fix tests
2024-04-24 23:16:11 +01:00
dan e2a59449df
Remove old Suggested Follows logic (#3689) 2024-04-24 17:45:11 +01:00
Eric Bailey 05beb1bbad
Remove old old onboarding (#3674) 2024-04-23 19:30:49 -05:00
Hailey 76aef2d064
use mp4 over webm (#3666)
* use mp4 over webm

* tinymp4

* safari only
2024-04-23 23:55:01 +01:00
dan 096725110a
[Statsig] Add test gates and events (#3659)
* [Statsig] Add test gates and events

* Better types
2024-04-23 04:47:13 +01:00
Hailey cbb817b5b7
GIF Viewer (#3605)
* ios player

autoplay after recycle

remove all items from AVPlayer queue

recurururururursion

use managers in the view

add prefetch

make sure player items stay in order

add controller and item managers

start of the view

create module, ios

* android player

smoother

basic caching

prep cache

somewhat works

backup

other files

android impl

blegh

lets go

touchup

add prefetch to js

use caching

* bogus testing commit

* add dims to type

* save

* add the dimensions to the embed info

* add a new case

* add a new case

* limit this case to giphy

* use gate

* Revert "bogus testing commit"

This reverts commit b3c8751b71f7108de9aa843b22ded4e0249fa854.

* add web player base

* flip mp4/webp

* basic mp4 player for web

* move some stuff into `ExternalLinkEmbed` instead

* use a class component for web

* remove extra component

* add `onPlayerStateChange` event type on web

* layer properly

* fix tests

* add new test

* about ready. native portions done, a few touch ups on web needed

show placeholder on ios

fix type

rm log

display thumbnail until video is ready to play

add oncanplay, playsinline

remove unused method

add `isLoaded` change event

release player when finished

apply gc to the view

cleanup logs

android gc

rm log

automatic gc for assets

make `nativeRef` private

remove unnecessary `await`

cleanup

rev log

only play on prepare whenever needed

rm unused

perfperfperf

rm var

comment + android width

native height calculations

rm pressable

add event dispatcher on android

add event dispatcher on ios

* ready to test ios

fix autoplay ios

clean

oops

* autoplay on web

* normalize across all platforms

add check for `ALT:`

separate gif embed logic to another file

handle permissions requests

flatten web styles

normalize styles

normalize styles

prefetch functions

pause animatable on foreground android

nits

one more oops

idk where that code went

lint

rethink the usage

wrap up

android

clear bg

update gradle

more android

rename dir

update android namespace

web

ios

add deps

use webp

rm unused

update types

use webp on mobile

* rm gate from types

* remove unused event param

* only start placeholder op if doesn't exist in disk cache

* fix gifs animating on app resume android

* remove comment

* add `isLoaded` for ios

* add `isLoaded` to Android

* onload for web

* add visual loading state

* rm a log

* implement isloaded for android

* dialogs

* replace `webpSource` with `source`

* update prop name

* Move to Tenor for GIFs (#3654)

* update some urls

* right order for dimensions

* add GIF coder for ios

* remove giphy check

* rewrite tenor urls

* remove all the unnecessary stuff for consent

* rm print

* rm log

* check if id and filename are strings

* full size playback controls

* pass tests

* add accessibility to gifs

* use `onPlay` and `onPause`

* rm unused logic for description

* add accessibility label to the controls

* add gif into to external embed in composer

* make it optional

* gif dimensions

* make the jsx look nicer

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
2024-04-23 02:54:15 +01:00
dan fe9b3f0432
Ungate profile scroll fix (#3655) 2024-04-23 00:54:59 +01:00
Samuel Newman 76449fb6ef
[GIFs] Replace GIPHY with Tenor (#3651)
* replace GIPHY with Tenor

* remove "directly" wording

* replace GIPHY wording

* remove log
2024-04-22 23:39:32 +01:00
Hailey 1a4e05e9f9
properly close the switch account dialog (#3558)
* properly close the switch account dialog

* use it for switch account as well

* ensure dialog is closed on unmount

Revert "properly check if the ref is null"

This reverts commit 8f563808a5d39389b0bc47a31e73cd147d1e7e8b.

properly check if the ref is null

ensure dialog is closed on unmount

* Revert "ensure dialog is closed on unmount"

This reverts commit a48548fd8ed53ae3eb08a0e05bb89f641c112b95.
2024-04-22 22:46:05 +01:00
Hailey 243769e657
remove gate from updates (#3646) 2024-04-22 21:06:25 +01:00
Hailey c0ca891501
Player improvement pre-reqs (#3618)
* add dims to type

* save

* add the dimensions to the embed info

* add a new case

* add a new case

* limit this case to giphy

* use gate

* flip mp4/webp

* fix tests

* add new test
2024-04-19 23:31:20 +01:00
Samuel Newman 8b33ffdfb5
Add disable autoplay preference and group related settings into a dedicated page (#3626)
* add autoplay preference

* group accessibility settings into a dedicated page

* fix gray background on web

* Put a11y first

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-19 22:10:37 +01:00
dan ade2ea6172
Ungate Top/Latest search (#3627) 2024-04-19 21:58:18 +01:00
dan c42a557417
[Statsig] Send locale info (#3621) 2024-04-19 15:51:41 +01:00
dan 55aea348c2
[Statsig] Update experiments (#3617) 2024-04-19 15:23:47 +01:00
Samuel Newman ba1c4834ab
Add GIF select to composer (#3600)
* create dialog with flatlist in it

* use alf for composer photos/camera/gif buttons

* add gif icons

* focus textinput on gif dialog close

* add giphy API + gif grid

* web support

* add consent confirmation

* track gif select

* desktop web consent styles

* use InlineLinkText instead of Link

* add error/loading state

* hide sideborders on web

* disable composer buttons where necessary

* skip cardyb and set thumbnail directly

* switch legacy analytics to statsig

* remove autoplay prop

* disable photo/gif buttons if external media is present

* memoize listmaybeplaceholder

* fix pagination

* don't set `value` of TextInput, clear via ref

* remove console.log

* close modal if press escape

* pass alt text in the description

* Fix typo

* Rm dialog

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-19 03:42:26 +01:00
dan bef7d8a325
[Statsig] Slightly block the UI on gates (#3608) 2024-04-18 17:53:51 +01:00
dan 6101c32bd9
[Statsig] Prefetch configs for other accounts (#3607)
* Poll both current and other accounts

* Make createStatsigOptions a function

* Pass prefetchUsers with the initial request

* Add initializeCalled check

* Be resilient to object identity changes

* Decrease poll interval to 1 minute
2024-04-18 16:26:05 +01:00
dan 41b5b5b283
Add our own cache in front of Statsig (#3604) 2024-04-18 15:28:24 +01:00
dan 02becdf449
[Statsig] Make gate checks lazily (#3594) 2024-04-18 04:39:29 +01:00
Hailey 410f155988
Cleanup files after upload on native (#3597)
* cleanup images after uploading from the composer

cleanup external embed images as well

cleanup files after upload

add `expo-file-system`

* remove test log

* await

* Revert "await"

This reverts commit 771814b40ce1395cac4f56853d8a9e793ca92c2f.

* just log an error if it throws
2024-04-17 12:49:22 -07:00
Hailey 69d3768006
Better dist strings for Sentry (#3584)
* better version codes for sentry

* use a `.` to follow the same intended format as before

* ignore dist build number
2024-04-16 14:38:25 -07:00
dan 71c427cea8
Make ref_ always strings (#3583)
* Make ref_ always strings

* Harden types
2024-04-16 21:55:12 +01:00
dan a66c9d0bc4
Always send ref_ params (#3582) 2024-04-16 21:28:39 +01:00
Paul Frazee 0b43d728e4
Improve the language behaviors around the PWI (#3545)
* Handle leftnav overflow with longer languages' copy

* Update the language dropdown to set ALL language prefs

* Add hackfix to language cachebusting on PWI

* Reset feeds on language change
2024-04-13 19:49:52 -07:00
dan 1390b1dc9e
[Statsig] Send ref source (#3531)
* [Statsig] Send ref source

* Add is web check

* Fix types
2024-04-13 12:09:49 +01:00
Samuel Newman 4c966e5d6d
[Embeds] "Embed post" post dropdown option (#3513)
* add embed option to post dropdown menu

* put embed post button behind a gate

* increase line height in dialog

* add gate to gate name union

* hide embed button if PWI optout

* Ungate embed button

* Escape HTML, align implementations

* Make dialog conditionally rendered

* Memoize EmbedDialog

* Render dialog lazily

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-13 05:13:53 +01:00
Hailey c3821fdc31
Remove vertical scrollbars from views on native (#3429)
* remove vertical scrollbars

* add to a few missing lists

* gate this change

* use `hide_vertical_scroll_indicators`

* fix gate lint

* fix bool
2024-04-12 15:22:09 -07:00
Eric Bailey 1f61109cfa
Profile card hover preview (#3508)
* feat: initial user card hover

* feat: flesh it out some more

* fix: initialize middlewares once

* chore: remove floating-ui react-native

* chore: clean up

* Update moderation apis, fix lint

* Refactor profile hover card to alf

* Clean up

* Debounce, fix positioning when loading

* Fix going away

* Close on all link presses

* Tweak styles

* Disable on mobile web

* cleanup some of the changes pt. 1

* cleanup some of the changes pt. 2

* cleanup some of the changes pt. 3

* cleanup some of the changes pt. 4

* Re-revert files

* Fix handle presentation

* Don't follow yourself, silly

* Collapsed notifications group

* ProfileCard

* Tree view replies

* Suggested follows

* Fix hover-back-on-card edge case

* Moar

---------

Co-authored-by: Mary <git@mary.my.id>
Co-authored-by: Hailey <me@haileyok.com>
2024-04-12 17:01:32 -05:00
Hailey f91aa37c6b
Enable updates for `production` behind `receive_updates` gate (#3496)
* add gate type

* gate the updates

* enable updates in `production`

* web placeholder for `useOTAUpdates()`

* update comment
2024-04-12 14:51:53 -07:00
dan 835f2e6548
Fix stale Notifications after push (#3507) 2024-04-12 11:33:34 -07:00
Paul Frazee ed2c8b720e
Dont apply the content-language filter if it will remove all content (#3492)
* Dont apply the content-language filter if it will remove all content

* Improve code
2024-04-12 15:53:11 +01:00
dan bedb0c3fbd
Use getSuggestions endpoint behind the gate (#3499)
* Move suggested follows out of the component

* Add new suggestions implementation

* Put new endpoint behind the gate

* Make bottom less weird
2024-04-12 13:02:15 +01:00