Commit Graph

3862 Commits (3573f7ea40d41b8c416194da31fbbad092062679)

Author SHA1 Message Date
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
Samuel Newman 03b2796976
lowcase ALT text (#3934) 2024-05-09 20:58:22 +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
Hailey 2fe76333bc
[🐴] Add hover context menu for convo list on web (#3923)
* remove some unnecessary props

* add hover trigger on web for convo list

* lint

* use `UserAvatar` to not affect accessibility

* remove extra wrapper

* add `label`

* always show on mobile

* adjust size of dots

* make the message trigger dots the same size

* 
2024-05-09 09:07:57 -07:00
Samuel Newman 55ac287d5e
[🐴] Skeleton header (#3921) 2024-05-08 17:08:24 -07:00
Eric Bailey 3bac0182b5
[🐴] Integrate event bus (#3915)
* Integrate event bus

* Fixes

* Move events mgmt into Convo class

* Clean up poll interval updates

* Remove unused

* Remove annoying log
2024-05-08 18:01:07 -05:00
Eric Bailey ce2eddca8e
[🐴] Refactor event bus (#3919)
* Refactor to singleton class outside react

* Fix retry, remove debug logs
2024-05-08 17:41:10 -05:00
dan 0c6bf276dd
Replace updateCurrentAccount() with refreshSession() (#3910)
Replace updateCurrentAccount() with resumeSession()
2024-05-08 23:11:39 +01:00
Hailey f62b0458a7
[🐴] Adjust press and hold delay on messages (#3918)
* adjust press and hold delay on messages

* adjust hit slop
2024-05-08 13:56:36 -07:00
Samuel Newman 701e508a1a
add sideborders prop (#3920) 2024-05-08 21:44:49 +01:00
Samuel Newman 750a5c899b
actually optimistic mark as read (#3917) 2024-05-08 21:19:45 +01:00
Eric Bailey 7d06fb9432
Move to requestPollInterval handling (#3914) 2024-05-08 11:34:04 -05:00
bnewbold f3515e2673
use four-digit years for RSS pubDate (#3907) 2024-05-08 09:33:38 -07:00
Samuel Newman 38198fdf7f
[🐴] Mark as read in convo menu (#3913)
* add mark as read option

* optimistic update + link up menu

* rm messageid
2024-05-08 15:48:05 +01:00
Eric Bailey 56f713077f
[🐴] Reorg convo files (#3909)
* Remove unused prop

* Reorganize
2024-05-07 19:46:59 -07:00
dan 814ec2bd7f
Add session reducer tests (#3860) 2024-05-08 03:34:35 +01: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 4fe5a869c3
[🐴] Unread messages badge (#3901)
* add badge

* move stringify logic to hook

* add mutation hooks

* optimistic mark convo as read

* don't count muted chats

* Integrate new context

* Integrate mark unread mutation

* Remove unused edit

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-07 21:23:09 -05:00
dan 0c41b3188a
[Session] Remove global agent (#3852)
* Remove logs and outdated comments

* Move side effect upwards

* Pull refreshedAccount next to usage

* Simplify account refresh logic

* Extract setupPublicAgentState()

* Collapse setStates into one

* Ignore events from stale agents

* Use agent from state

* Remove clearCurrentAccount

* Move state to a reducer

* Remove global agent

* Fix stale agent reference in create flow

* Proceed to onboarding even if setting date fails

---------

Co-authored-by: Eric Bailey <git@esb.lol>
2024-05-08 03:10:03 +01:00
Eric Bailey 31a8356aef
Handle invalid service URLs (#3908) 2024-05-07 21:09:02 -05:00
Eric Bailey 165fdb7049
[🐴] Integrate global event bus (#3904)
* Conditionally run global event bus

* Add current convo id context, bundle providers
2024-05-07 20:25:58 -05:00
Hailey 37f22ca224
fix privacy api type (#3903) 2024-05-07 16:35:04 -07:00
Eric Bailey b2b1c6c040
Let React app replace preload (#3900)
* Let React app replace preload

* Fix html structure

* Fix indent
2024-05-07 18:29:21 -05:00
Eric Bailey 53d844495b
Remove messages provider (#3902) 2024-05-07 18:29:06 -05:00
Eric Bailey f78126e01a
[🐴] State transitions (#3880)
* Handle init/resume/suspend/background and polling

* Add debug and temp guard

* Make state transitions sync

* Make init sync also

* Checkpoint: confusing but working state machine

* Reducer-esque

* Remove poll events

* Guard fetchConvo

(cherry picked from commit 8385579d31500bb4bfb60afeecdc1eb3ddd7e747)

* Clean up polling, make sync

(cherry picked from commit 7f75cd04c3bf81c94662785748698640a84bef51)

* Update history handling

(cherry picked from commit b82b552ba4040adf7ead2377541132a386964ff8)

* Check for screen focus in app state listener

* Get rid of ad-hoc status checks
2024-05-07 17:54:52 -05:00
Eric Bailey 87cb4c105e
[🐴] Global event mgmt (#3897)
* Add global event bus for messages logs

* Add rev to state

* Better handle error

* Clean up polling, add backgrounding

* Add trailConvo method

* Extend polling until we're ready for this
2024-05-07 17:54:34 -05:00
Paul Frazee 0625a914bd Run intl:extract 2024-05-07 14:15:34 -07:00
Hailey 4678c4353b
typo in if/else (#3899) 2024-05-07 13:17:40 -07:00
Hailey 0658dd053d
create new cache key on each run when saving previous commit hash (#3898)
* create new cache key on each run

* dynamic restore-key
2024-05-07 13:08:44 -07:00
Minseo Lee c6d30f671a
Remove unnecessary Trans tags (#3888) 2024-05-07 20:06:39 +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
Samuel Newman 77e6c75a2c
Fix color of new web splash logo (#3896) 2024-05-07 19:28:51 +01:00
Minseo Lee af77574b3c
Update Feed.tsx (#3715) 2024-05-07 11:09:22 -07:00
Minseo Lee b1a1ca98e8
Update Feeds.tsx (#3719) 2024-05-07 11:07:57 -07:00
kodebanget 3cca5f04d6
Update Indonesian translation (#3891)
* Update Indonesian translation

* Update id/messages.po

---------

Co-authored-by: Indonesian <github-actions@github.com>
2024-05-07 10:33:59 -07:00
Minseo Lee 7f88ec7ca5
Update WhoCanReply.tsx (#3720) 2024-05-07 10:20:05 -07: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
Jan-Olof Eriksson 92f6665f93
Finnish translation update (#3755)
* Update messages.po

Translated new strings (GIF's etc) and cleaned up deprecated ones.

* Update messages.po

resolve conflict

* Update messages.po

removed double quotes. Thanks @lapanti
2024-05-06 20:08:36 -07:00
Minseo Lee 2ea9e2c929
Improve localization marks (#3285)
* Update Lightbox.tsx

* Change strings for easier localization

* Update DeleteAccount.tsx

* Update LabelsOnMeDialog.tsx

* Update FeedCard.tsx

* Update index.tsx

* Update LabelsOnMeDialog.tsx

* Update index.tsx

* Update FeedCard.tsx

* Update SelfLabel.tsx

* Update Hashtag.tsx

* Update index.tsx

* Update Hashtag.tsx

* Update ChangeHandle.tsx

* Update index.web.tsx

* Update index.web.tsx

* Update index.tsx

* Remove unnecessary `<Trans>` tags

* Update Drawer.tsx
2024-05-06 19:58:04 -07: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 e264dfbb87 Merge branch 'TuxPenguin09-web-loading' into main 2024-05-06 18:06:44 -07:00
Paul Frazee 032f849092 Protect against missing element 2024-05-06 18:06:31 -07:00
Paul Frazee 0a8dc289ff Merge branch 'web-loading' of https://github.com/TuxPenguin09/bsky-social-app into TuxPenguin09-web-loading 2024-05-06 17:51:51 -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 2ca4b74955 Merge branch 'piotrpalek-fix-banner-cropper' into main 2024-05-06 15:49:52 -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
Samuel Newman 136b0e12ab
make gif alt text prompt selectable (#3879) 2024-05-06 22:14:00 +01:00
Hailey fdb5ffff53
remove trailing period from query term in `useActorAutocompleteQuery` (#3765)
* remove trailing period from query term

* Rm useMemo

---------

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
2024-05-06 22:04:47 +01:00