Commit Graph

366 Commits (f924465899ac46d7b3030344d000fcbc3f7feef2)

Author SHA1 Message Date
Hailey efdcfd09e6
Bump 1.84.0 (#4185) 2024-05-23 04:15:38 +01:00
lauren bf8db6172f
Add React Compiler (#4161)
* Install babel-plugin-react-compiler

* Install eslint-plugin-react-compiler

* Add and configure react-compiler-runtime

React Compiler uses a small cache function from React 19 at runtime.
Until it's possible to use R19 on RN, this adds a userspace
implementation to polyfill the cache function

* Add eslint-plugin-react-compiler to config

* @lingui/macro should run as the first plugin

@lingui recommends running their `macro` plugin [first in the
pipeline](https://lingui.dev/ref/macro). Normally with the React
Compiler, the compiler plugin should run first as we want to see the
original code as it was written. However, this sometimes causes
conflicts with other babel plugins.

In this case, it looks like the @lingui/macro plugin does some very
light transformation that the compiler can still understand and compile
correctly, so let's run it first.

Before this commit, the compiler would cause the @lingui/macro plugin to
crash because it seems like it would strip off the `extra.raw` property
off of StringLiterals which was being used
[here](1293412c5d/packages/macro/src/macroJsx.ts (L395)).
I need to figure out why the compiler is doing that but for now this
works and should be a safe change unless there were specific reasons
the macro plugin was placed 2nd to last.
2024-05-22 18:46:45 +01:00
Eric Bailey 3356bcfba6
Bump api sdk (#4118) 2024-05-20 14:00:37 -05:00
Hailey 52beb29a0d
[🐴] Fully implement keyboard controller (#4106)
* Revert "[🐴] Ensure keyboard gets dismissed when leaving screen (#4104)"

This reverts commit 3ca671d9aa.

* getting somewhere

* remove some now nuneeded code

* fully implement keyboard controller

* onStartReached check

* fix new messages pill alignment

* scroll to end on press

* simplify pill scroll logic

* update comment

* adjust logic on when to hide the pill

* fix backgrounding jank

* improve look of deleting messages

* add double tap on messages

* better onStartReached logic

* nit

* add hit slop to the gesture

* better gestures for press and hold

* nits
2024-05-19 19:25:49 -07:00
Hailey b15b49a48f
[🐴] Remove keyboard controller lib (#4038)
* remove library

* implement using just reanimated

* always return false for `keyboardIsOpening` on web

* undo comment

* handle input focus scroll more elegantly

* add back minimal shell toggle on mobile web

* adjust initialnumtorender

* oops

* nit
2024-05-16 09:32:10 -07:00
Hailey 9499d4343d
[🐴] A few tweaks to message input on native (#4035)
* tweaks

* only apply the padding on ios

* use a hitslop of 10 instead

* version bump
2024-05-16 08:09:14 -07:00
Eric Bailey 9173be686c
[🐴] Swap in new package, update usages (#3992)
* Swap in new package, update usages

* Remove uneccessary patch

* Override type in safe place
2024-05-14 09:22:09 -05:00
Paul Frazee d49b93dc7e
Replace e2e tests with Maestro (#3983)
* Setup maestro tests and convert some initial tests

* Remove detox

* Replace all tests with maestro
2024-05-13 08:43:13 -07:00
Hailey 97750c4aab
Show "label has been placed..." even for self-labels (#3874)
* show labels placed on your content even if it's a self-label

even friendlier wording

friendlier wording

remove unnecessary `export`

temp revert reordering

show labels placed on your content even if it's a self-label

* Bump api 0.12.9

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
2024-05-11 15:07:50 -07:00
Hailey d0440d087e
bump (#3961) 2024-05-11 05:44:17 +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
dan 814ec2bd7f
Add session reducer tests (#3860) 2024-05-08 03:34:35 +01:00
Paul Frazee 4fad18b2fa
Implement FeedFeedback API (#3498)
* Implement onViewableItemsChanged on List.web.tsx

* Introduce onItemSeen to List API

* Add FeedFeedback tracker

* Add clickthrough interaction tracking

* Add engagement interaction tracking

* Reduce duplicate sends, introduce a flushAndReset to be triggered on refreshes, and modify the api design a bit

* Wire up SDK types and feedContext

* Avoid needless function allocations

* Fix schema usage

* Add show more / show less buttons

* Fix minor rendering issue on mobile menu

* Wire up sendInteractions()

* Fix logic error

* Fix: it's item not uri

* Update 'seen' to mean 3 seconds on-screen with some significant portion visible

* Fix non-reactive debounce

* Move methods out

* Use a WeakSet for deduping

* Reset timeout

* 3 -> 2 seconds

* Oopsie

* Throttle instead

* Fix divider

* Remove explicit flush calls

* Rm unused

---------

Co-authored-by: dan <dan.abramov@gmail.com>
2024-05-07 03:08:33 +01: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
Hailey b4015d10d1
Add PrivacyManifest info to comply with new App Store guidelines (#3784)
* add necessary privacy reasons

* bump expo to support creation of the manifest
2024-05-06 21:47:55 +01:00
Hailey 19a6bdcc86
Version bump (#3848) 2024-05-03 11:21:02 -07:00
Hailey 333ccdad39
[Clipclops] Dynamic input height (#3778)
* input max height/scrollability

* remove unused imports

* add a web-specific version

* enter and shift enter for web

* missing onSubmit for native

* missing attributes

* improve layout of input on web

* use the correct text color in the input

* trim messages

* remove `onSubmit`

* move prop up

* trim message on web

* remove extra function call

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
2024-05-01 20:42:11 +01:00
Eric Bailey 538ca8dff1
[Clipclops] 2 Clipped 2 Clopped (#3796)
* Add new pkg

* copy queries over to new file

* useConvoQuery

* useListConvos

* Use useListConvos

* extract useConvoQuery

* useGetConvoForMembers

* Delete unused

* exract useListConvos

* Replace imports

* Messages/List/index.tsx

* extract getconvoformembers

* MessageItem

* delete chatLog and rename query.ts

* Update import

* Clipclop service (#3794)

* Add Chat service

* Better handle deletions

* Rollback unneeded changes

* Better insertion order

* Use clipclops

* don't show FAB if error

* clean up imports

* Update Convo service

* Remove temp files

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
2024-05-01 10:14:41 -07:00
Samuel Newman 81ae7e425d
Add kawaii mode (#3773) 2024-05-01 08:59:40 +01:00
Hailey eb8bfd11d1
[Clipclops] Add screen to view and send clip clops (#3754)
* add new routes with placeholder screens

* add clops list

* add a clop input

* add some better padding to the clops

* some more adjustments

* add rnkc

* implement rnkc

* implement rnkc

* be a little less weird about it

* rename clop stuff

* rename more clop

* one more

* [Clipclops] Temp codegenerated lexicon (#3749)

* add codegenerated lexicon

* replace hailey's types

* use codegen'd types in components

* fix error + throw if fetch failed

* remove bad imports

* update messageslist and messageitem

* import useState

* add clop service URL hook

* add dm service url storage

* use context

* use context for service url (temp)

* remove log

* nits

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
2024-04-29 23:34:26 -07:00
Hailey 5d19f27052
switch branch for installing `react-native-bottom-sheet` (#3760) 2024-04-29 16:13:41 -07:00
Hailey b10c96f28d
ver bump (#3731) 2024-04-27 04:38:51 +01:00
Paul Frazee 710e913024
Email auth factor (#3602)
* Add email 2fa toggle

* Add UI elements needed for 2fa codes in login

* Wire up to the server

* Give a better failure message for bad 2fa code

* Handle enter key in login form 2fa field

* Trim spaces

* Improve error message
2024-04-22 19:18:13 -07: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 45e572b212
bump api, remove `as number` from types (#3580)
* bump api, remove `as number` from types

* bump dev env
2024-04-16 20:34:34 +01:00
Hailey 38074854b2
Allow a post to contain only a quote (#3577)
* allow posts with only a quote

* bump version while we're at it
2024-04-16 10:20:05 -07:00
Paul Frazee d5db632e29 1.78 2024-04-15 20:47:28 -07:00
bnewbold 58842d03a9
rebased embedr (#3511)
* skeleton of embedr service, based on bskyweb

* embedr container setup

* builds on this branch

* actual routes

* fix embedr go:embed

* tweak embedr dockerfile

* progress on embedr

* fix path params

* tweaks to build process

* try to get embedr dockerfile to install embed deps

* build this branch

* updates to match sam's output HTML

* try to unbreak embedr dockerfile

* small embedr tweak

* docker hack

* get embed.js copied over to embedr

* don't x-frame-options for embed.bsky.app

* bskyembed: remove a console.log

* use html/template for golang snippet generation

* simplify embedr API fetches

* missing file

* Rm console.log fully

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-04-13 12:20:06 -07:00
Kisaragi Hiu cefa0a55e8
android: fix navigation bar always being bright even in dark mode (#3464)
Right now both light mode and dark mode get light navigation bar, and
looks jarring in the dark modes.

This commit applies a more appropriate color before the UI thread
runs (in app config), as well as applying the current theme background
after the UI shell is mounted.

This should fix #3332.

Co-authored-by: Hailey <me@haileyok.com>
2024-04-12 15:40:22 -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
Samuel Newman ad97d4350c
[Embeds] Create vite project and add to build pipeline (#3448)
* add bskyembed vite app

* create build script (temp until embedr is ready)
2024-04-12 15:52:26 +01:00
Hailey bf974b147e
Bump to 1.77 (#3468) 2024-04-10 08:50:44 -07:00
Paul Frazee ee87f2cadd
1.76 release preparations (#3459)
* Run intl:extract

* Update dev-env to 0.3.4

* Test fixes
2024-04-09 16:27:39 -07:00
Hailey 00076ad1ff
Bump `async-storage` to comply with App Store guidelines (#3436) 2024-04-08 08:24:59 -07:00
Hailey 443dfb5c3e
prevent deployment race conditions (#3416) 2024-04-05 08:27:22 -07:00
Hailey 9bcb0a7a81
migrate to `expo-linear-gradient` (#3420)
* replace packages

* rm useless alias from webpack config

* fix accidental double commit

* replace all usages
2024-04-04 21:22:13 -07:00
Hailey 4e59914d2a
migrate to 'expo-haptics' (#3418)
* migrate to 'expo-haptics'

* run yarn install twice if necessary
2024-04-04 21:19:38 -07:00
Hailey cddbbc4bd4
migrate to `expo-application` (#3417)
* migrate to `expo-application`

* replace additional usage
2024-04-04 21:19:28 -07:00
Hailey 0433f8ad68
migrate to `expo-clipboard` (#3419)
* replace package

* replace usages
2024-04-04 21:19:15 -07:00
Hailey 101d1589bf
Bump some Expo package, remove unused packages to prepare for migration (#3415)
* bump some package versions

* remove completely unused packages

* remove blurview

* update yarn.lock
2024-04-04 18:30:32 -07:00
dan 4cc57f4bfd
Lint against strings without wrapping <Text> (#3398)
* Add a rudimentary rule

* Get the rule passing

* Support special-casing text props

* More tests
2024-04-04 17:32:50 +01:00
Hailey 8e393b16f5
Simplify list logic further to prevent misuse (#3334)
* simplify list logic further

more simplification

simplify by removing `isEmpty`

use `isFetchingNextPage` everywhere for clarity

change `isFetching` to `isFetchingNextPage` for clarity

remove some useless `useMemo`s

move `renderItem` and `keyExtractor` out of component

* clean bundle size check

* update deploy

* adjust

* adjust

* one test

* try now

* test it

* done
2024-04-03 20:59:33 -07:00
Hailey b1bd7ab6e3
Add webpack analyzer, PR comments for webpack bundle size (#3383)
try that again 9

try that again 8

try that again 7

try that again 6

try that again 5

try that again 4

try that again 3

try that again 2

try that again

merge base 3

merge base 2

merge base

use latest main commit rather than tag

webpack diff analyzer

use cache v4

use cache

again...

blegh

blegh

try cache again

cache

try again

one more adjutment

adjust

okay again maybe

maybe now?

maybe now

oops again

oops

add diff comments

add open analyzer script

add webpack analyzer
2024-04-03 19:31:29 -07:00
Hailey 7fb117d213
Upgrade `UITextView` to latest (#3090)
* uitextview use library w/ fixes

bump

bump

multiple uitextview fixes

* bump

* update to latest

* cleanup
2024-04-03 18:05:03 -07:00
Hailey 73df7e53b3
Add OTA updates support for `testflight` channel (#3291)
* some progress

another adjustment, testing

another adjustment, testing

fix again

fix again

set default runtime version

fix

test this script

test this script

test this script

add build numbers to the deployment url

clean

give script access to build number

add `useBuildNumberEnv` without a bump

new line

fix missing async

add channel name to deployment url

add updates check on launch for testflight users

ver bump

init updates on launch for native

add `testflight` as default in build submit

add is_testflight check

* disable inline predictions to prevent ios composer jank

* temp bump

* Revert "temp bump"

This reverts commit 44c51134a35d817c73edb1e635495597c95117b3.

* adjustments

version bump

adjust

fixes

test

* cleanup and finalize

drop check down to every 15 minutes

adjustments

change to 15 mins

use jq to get version if necessary

rm test on push

figured it out

remove nightly testflight releases

test again again again again again AGAIN ONCE MORE

test again again again again again AGAIN

test again again again again again AGAIN

test again again again again again

test again again again again

test again again again

test again again

test again

test

test

test

run deploy if necessary

run deploy if necessary

run deploy if necessary

run deploy if necessary

run deploy if necessary

remove test message

fix environment

oops

cleanup

merge in changes

* remove unnecessary `workflow_call`

* remove changes that have been merged into main now

* finalize android

update git ignore

rm test stuff from the bundle action

remove test message

test message

fix

test message

test message

few android fixes

few android fixes

fix jq

add a test message

fix slack webhook

create android deployments test 2

create android deployments

add `testflight-android` profile to eas.json

more cleanup

some more cleanup

simplify some logic

remove unnecessary channel

rename to `useOTAUpdates`

* rm test portion
2024-04-03 15:14:44 -07:00
dan 8de27160f5
Remove unnecessary yarn call (#3380) 2024-04-03 03:05:53 +01:00
dan a45da17c48
Separate ESLint and Prettier (#3373)
* Disable legacy Prettier ESLint integration

* Run Prettier separately

* Add caching

* Separate -some and -all

* Reduce node inits
2024-04-01 22:58:31 -07:00
Paul Frazee 0baf9f9919 1.75 2024-03-22 13:07:54 -07:00
Samuel Newman a8ccc91335 Specify package manager in package.json 2024-03-21 16:00:36 +00:00