about summary refs log tree commit diff
path: root/src/components/hooks
Commit message (Collapse)AuthorAgeFilesLines
* `@atproto/api@next` integration (#7344)Eric Bailey2025-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump SDK * Use consistent type in profile query * Omit from constraint for profile shadow * Replace isRecord with isValidRecord in QuoteEmbed * Omit type from constraint for old ProfileCard * Omit type from constraint in profile queries where appropriate * Use correct type for update profile mutation * Conslidate and fix check for isValidRecord in Post.tsx * Replace isRecord with isValidRecord in PostThreadItem * Remove redundant cast in PostThreadFollowBtn * Ignore errors in DebugMod screen * Use matching type in ProfileFollows screen * Use matching type in ProfileFollowers screen * Migrate to isValidRecord in PostFeedItem * Use matching type if PostRepostedBy * Omit type from constraint in avatar props * Use matching types in NotificationFeedItem * Todo * Use isValidRecord in NotfyFeedItem * Improve MediaPreview types * Migrate another isValidRecord in NotificationFeedItem * Migrate to isValidView in queries/util * Migrate to isValidRecord in threadgate/util * Fix types in threadgates * Fix up types in starter-packs queries * Todo * Specify exact types in search-posts * Use internal type util to align types * Ditto last * Migrate postgate/index * Specify exact types in post-thread * Use correct type in post-quotes * FIX potential bug in post-thread * Use correct type in post-feed * Add correct type guards to notifications/feed * Migrate a guard in notifications/util * Migrate guard in Wizard/State * [@next] Profile handling, migrate `ProfileCard` (#7347) * Introduce new utils for profiles, migrate old ProfileCard * Rename, reorg * Add parseEmbed utils * Expand AnyProfileView to include chat profile view, update post shadow to reflect this * Cast for perf reasons * Tighten up types now that we have AnyProfileView * Add fastIsType util * Use `assertDid` Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use util types * Comment * Use fastIsType where no validation was happening before * suggestions (#7382) * suggestions * Revert unneeded changes --------- Co-authored-by: Eric Bailey <git@esb.lol> * Use new util * Rename to dangerousIsType * Convert object shape * Use dangerous util * Use dangerous util * Use dangerous util, we can trust post records * Use dangerous util * Use AnyProfileVIew * Convert object shape * Clean up handling * Patch moderateProfile to accept known profile views, to discuss * Add AnyStarterPackView and related, implement in first usage * Remove validation, fix type, fix ref * Migrate over list-conversations * Clarify intent behind precacheProfile and its unstable query cache * Clean up unstable profile cache * Fix types during label creation in PwiOptOut (#7346) * Tighten types in queries/list * Chat: use correct profile views * Chat: fix log type check * Chat: construct lexically correct shape, even though it's only internal usage * Chat: use correct profile types * Chat: fix type check in logs * Starter: use correct profile types * Starter: use correct profile types * Starter: tighten types to match lex * Any profile type will work in blocked-and-muted * Use dangerous util * Use dangerousIsType * Update new ProfileCard to use AnyProfileView * Use dangerousIsType * Remove outdated todo * Use correct profile type * Use correct profile types * Tighten up types * Use dangerousIsType * Chat: more type fixes * Remove unused file * Add a few utils * Remove unused file * Ignore feedPost.__source * Clean up types, leave validation in critical path * Use dangerousIstype * Use ANyProfileView * Use isValidRecord * Use dangerousIsType * Fix types in ListCard * Fix FeedInterstitials types * Fix types in FeedCard * Fix types in dms ReportDialog * Fix types in SearchablePeopleList * Fix bad type in composer opts * Starter: ok these need to be loose too * Clarify docs Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Less code Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> * Use package exports * Bump sdk, update $Typed imports * Format * Format * Fix weird TS error * Remove patch * Beter name * It's memo, can validate * Tighten up parseEmbed, dogfood * Bump sdk * Use asPredicate * Loosen types a bit * use asPredicate * Fix types * Use asPredicate * Use asPredicate * Use asPredicate * Clean up upsertProfile types * Use asPredicate * Use Un util * Fix types * Use new AnyProfileView * Use dangerousIsType * Use asPredicate * Use asPredicate * Add fallback content-type to pass typecheck * Clean up upsertProfile types * Align types * Use dangerousIsType * Use dangerousIsType * Use asPredicate * Align types * Convert findLast * Align types * Just ignore type errors and use findLast * Rename atproto -> bsky * Add validate util * Fix type error * Loosen types * Export post * rename atp bsky * Remove unused code * minor changes * Bump deps * Fix types * Tighten back up loose check * Tighten back up loose check * Fix small bug * Update comment * Revert change --------- Co-authored-by: Matthieu Sieben <matthieusieben@users.noreply.github.com> Co-authored-by: Matthieu Sieben <matthieu.sieben@gmail.com>
* Add language: Interlingua (#7715)Paul Frazee2025-02-111-0/+1
| | | | | * Add language: Interlingua * Add ia entry in dates
* Add Danish localization (#7220)Christian Schmidt2025-01-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Danish localization * Fix * Update src/locale/locales/da/messages.po Co-authored-by: Frudrax Cheng <i@cynosura.one> * Typo * Inconsistent translation of "draft" * Do not use "post" as verb * Change "post"/"repost" to "opslag"/"videredeling" * Fix "About" * Fix * Add to iOS config * Sort alphabetically * Typo fixes by @kseistrup * Fix gender of "opslag" * Plural * "videredeling" > "deling" * Be specific that ÆØÅ is not allowed * Add new strings from main --------- Co-authored-by: Frudrax Cheng <i@cynosura.one>
* Add Swedish localization (#7232)nilaallj2025-01-241-0/+2
| | | | | | | | | | | | | * Adding Swedish translation * Fixes and improvements * Fixes and improvements * Fixed inconsistencies + some other improvements * Made some improvements, added missing translations and added Swedish to app.config.js * Force push to resolve conflicts in messages.po
* Add Basque language ('eu') (#7479)REALSOULMAN2025-01-241-0/+2
| | | | | * Add Basque language * Contributor's changes
* Add Greek Language ('el') Support and Internationalization (#6677)Yiannis Mertzanis2024-12-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Add Greek language support to the application * Add support for Greek language in date handling and tests * Update Greek locale file with translator and team information * Add support for Greek language in date handling and tests * Add support for Greek language in app configuration, and updated translation from the reviewers' comments * Update src/locale/i18n.ts Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/locale/i18n.ts Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Update Chinese & Cantonese localization (#7235)Frudrax Cheng2024-12-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * Update translates from crowdin * Convert language codes from RFC-1766 to RFC-4646 * Update translates from crowdin * Update deviceLocales.ts * Revert 'changes zh-HK to yue' * Fix zh-HK messages.po * Revert 'en/messages.po' * Update deviceLocales.ts * Revert code comments * Update translates from crowdin * zh-TW: Improved translations
* Rework discover-feed trending interstitial (#7314)Paul Frazee2024-12-311-1/+1
| | | | | | | | | | | | | * Rework discover-feed trending interstitial to take one row * Fix loading state * Try putting it at the top * Color consistency * Tweak some spacing * Show trending when progress guide is there
* Fix Nepali language code (#7265)Minseo Lee2024-12-241-1/+1
| | | | | * Replace `np` with `ne` * Reorder
* Nepali Translation (divyaswormakai's reviewed & some changes) (#7033)Ankit Bhandari2024-12-181-0/+1
| | | | | | | | | | | | | | | | | * feat: prepare necesaary files * fix: message file for nepali translation * feat: language file update * feat: add missing pieces * feat: one and other updates * additional changes --------- Co-authored-by: Divyaswor Makai <makaidivya@gmail.com>
* Add Khmer Localization (#6914)roth2024-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * add khmer language * update translate * update translate * add missing localization key * update khmer wording * update khmer wording * add missing translate * add missing translate * chore: add khmer local date-time format * Update src/locale/i18n.ts Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Romanian localization (#6456)Claudiu Cristea2024-12-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Empty * First pass * More colloquial Romanian * Add Romanian lanaguage * Romanian specfic plural with 3 variants * Adjustments * Chat > Conversație * Keep code alphabetical order * Update messages.po * Add 'ro' to app.config.js * Regenerate and finish RO * Update messages.po * Fixing a previous wrong conflict resolution * Adapt after #6742 Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --------- Co-authored-by: Alex <alextec70@outlook.com> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Fix web Home header (#7086)dan2024-12-121-2/+2
| | | | | * Fix header disappearing on web * Make border nicer
* Add new languages to `CFBundleLocalizations` key (#6835)surfdude292024-12-021-1/+1
| | | | | | | | | | | | | | | * Order tweak in lingui.config.js * Add new languages to `CFBundleLocalizations` key * Order tweak in dates.ts * hyphen to en-dash * change two `zh` tags to use script rather than region * `zh_HK` ➡️ `yue-Hant` * `pt` ➡️ `pt-BR`
* Fix ast (#6774)Frudrax Cheng2024-11-271-2/+1
|
* Add "ast" locale support (#6411)Softastur2024-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add "ast" locale support * Add "ast" locale support * Add "ast" locale support * Add "ast" locale support * Add "ast" locale support * Add "ast" locale support * Add "ast" translations This commit adds preliminary translation support for "ast" locale. Around 20% is translated. * Update "ast" locale translations * Update "ast" translations Fixes minor spelling mistakes and translates many strings more * Update messages.po With this commit we reach the 55% of strings translated after the last code sync --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Add Aragonese language ('an') support and l10n (#6638)Juan Pablo Martínez2024-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update languages.ts * Update i18n.web.ts * Update i18n.ts * Update helpers.ts * Create messages.po * Update lingui.config.js * Update dates.ts * Add files via upload * Update src/components/hooks/dates.ts Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/components/hooks/dates.ts Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update i18n.ts * Update messages.po * Update src/locale/i18n.ts Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Merge branch 'main' into mainPaul Frazee2024-11-232-2/+8
|\
| * Added Galician language localization (#6463)xurxogp2024-11-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update languages.ts added galician language * Update i18n.web.ts added import of galician translations file * Update i18n.ts added galician language * Update helpers.ts added galician to sanitizeLanguage function * galician messages First commit * Second commit * Third commit * fourth commit * fifth commit * Update lingui.config.js change to make available Galician language * galician translation by Carlos Vieito and Alexandre Espinosa --------- Co-authored-by: Alexandre Espinosa Menor <aemenor@gmail.com>
| * Vietnamese Localization (Continued from #2524) (#6564)Quang Phan2024-11-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Vietnamese localization * Complete Vietnamese Translations * Add date localization for Vietnamese * Fix typos and wording in Vietnamese translation * Update Vietnamese translation * Add @vinhphm to Vietnamese translator list --------- Co-authored-by: CromNguyen <nguyenthietmanh98@gmail.com>
| * Implement Polish translation (#6283)axiand2024-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial polish translation sweep * rewrite feeds page flavor text * bring up to date with dev branch, revisit some strings * redoing some more... * bring up to date * rm dead strings, try out a different phrasing for threaded mode str prev translation was nonsensical - we're already calling threads "wątki". let's try "recursive tree" instead to describe what threaded mode does * tweaks here and there * more tweaks. sign translation file TL note: trying a new space-saving translation for send via direct message, old one made the context menu stretch * space-saving translations for profile tabs * up to date * tl latest changes * some small fixes * few more tweaks around profile editing strings * i dislike gendered languages * yet more tweaks * Update dates.ts * Review suggestions (1) * tiny fixes * Review suggestions (2) * Review suggestions (3) * Review suggestions (4) * "Anuluj wyciszenie" * A few new strings * Remove dead strings again * Review suggestions (5) * te -> to --------- Co-authored-by: Frudrax Cheng <i@cynosura.one>
| * [Statsig] Remove client downsampling (#6153)Hailey2024-11-151-2/+2
| |
* | Allow use of Dutch translations [ER].Guido Leenders2024-11-121-0/+2
|/
* add Thai Language translation support (#5879)Nawapon Boonjua2024-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | * add Thai Language support * Update lingui.config.js * Update dates.ts * Update helpers.ts * Update i18n.ts * Update i18n.web.ts * Update languages.ts * Update messages.po --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Sort imports (#6009)dan2024-10-292-6/+6
| | | | | * Mark import sort/order/style rules as error * npm run lint -- --fix
* Add Hungarian localisation (#5902)smileyhead2024-10-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add 'hu' to lingui.config.js * Add 'hu' to dates.ts * Add 'hu' to helpers.ts * Add 'hu' to i18n.ts * Add 'hu' to i18n.web.ts * Add 'hu' to languages.ts * Create messages.po * Update messages.po * Update messages.po * Update messages.po * Minor fixes Reworded some things in the hashtag context menu. * Some tweaks Shortened Media tab title Added spaces to the short timestamps (mp, p, ó, n, hó) * Hopefully fix the removing of plural strings * Update Hungarian localisation * Fixed some things * Fixed typo * Further small fixes * Update src/locale/locales/hu/messages.po Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/locale/locales/hu/messages.po Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/locale/locales/hu/messages.po Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/locale/locales/hu/messages.po Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/locale/locales/hu/messages.po Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update src/locale/locales/hu/messages.po Co-authored-by: Frudrax Cheng <i@cynosura.one> * Update src/locale/locales/hu/messages.po Co-authored-by: Frudrax Cheng <i@cynosura.one> * Apply fixes after proofreading session --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> Co-authored-by: Frudrax Cheng <i@cynosura.one>
* Add `en-GB` localisation (#5952)surfdude292024-10-281-0/+2
| | | | | | | | | | | | | | | | | | | * Create blank en-GB/messages.po * localise certain strings for en-GB * Update lingui.config.js * Update dates.ts * Update helpers.ts * Update i18n.ts * Update i18n.web.ts * Update languages.ts * Update i18n.ts
* Add Cantonese Localization (#5479)Frudrax Cheng2024-10-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add zh-HK localization * Update dates.ts * HK: Update Translates * HK: Fix typo * HK: Fix wrong language code * HK: Update Translates * HK: Update Translates * rename 'Chinese (Hong Kong)' to 'Cantonese' * HK: Update Translates * Update languages.ts Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * HK: Update Translates by reviewers --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Adjust header offset (#5501)Eric Bailey2024-09-271-3/+3
|
* [Video] Fix fullscreen on Chrome (#5246)Samuel Newman2024-09-091-0/+53
|
* Update dates.ts (#5220)surfdude292024-09-071-0/+2
|
* [Statsig] Add more events to downsample, increase downsample rate (#5198)Hailey2024-09-071-2/+2
| | | | | | | | | * add some events for sampling * include downsample rate in metadata * fix metadata logic * uncomment debug
* [Video] add scrubber to the web player (#4943)Samuel Newman2024-08-261-2/+2
|
* Submit fix (#4978)dan2024-08-221-1/+1
| | | | | | | | | | | | | | | * Fix submit logic * Fix type * Align submit task creation 1:1 with callsites * blegh. `useThrottledValue` * make `useThrottledValue`'s time required --------- Co-authored-by: Hailey <me@haileyok.com>
* Update muted words dialog with `expiresAt` and `actorTarget` (#4801)Eric Bailey2024-08-011-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP not working dropdown * Update MutedWords dialog * Add i18n formatDistance * Comments * Handle text wrapping * Update label copy Co-authored-by: Hailey <me@haileyok.com> * Fix alignment * Improve translation output * Revert toggle changes * Better types for useFormatDistance * Tweaks * Integrate new sdk version into TagMenu * Use ampersand Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Bump SDK --------- Co-authored-by: Hailey <me@haileyok.com> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Use appropriate icons for toasts (#4803)Samuel Newman2024-07-231-2/+2
| | | | | | | | | | | | | * use appropriate icons for toasts * use info for session expiry * tweak size * message -> safeMessage --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
* Create shared preferences API (#4654)Hailey2024-07-111-9/+5
|
* Starter Packs (#4332)Hailey2024-06-212-0/+97
| | | | | | | 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>
* Replace getAgent() with reading agent (#4243)dan2024-05-281-3/+3
| | | | | * Replace getAgent() with agent * Replace {agent} with agent
* Movable following feed (#3593)Eric Bailey2024-05-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* add focus refresh + polling (#3846)Samuel Newman2024-05-031-0/+17
|
* [Session] Add `useAgent` hook and replace (#3706)Eric Bailey2024-04-251-2/+3
| | | | | | | | | | | * Hook it up * Memoize getAgent method * Use one shared reference --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Throttle gif search by 500ms (#3622)Samuel Newman2024-04-191-0/+27
| | | | | | | | | * debounce gif search by 300ms * Throttle it instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Profile card hover preview (#3508)Eric Bailey2024-04-122-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Fix problems with `BottomSheet` and the report dialog (#3297)Hailey2024-03-201-0/+12
| | | | | | | | | | | | | | | | | | | | | * use @discord/bottom-sheet * add @types/invariant * some progress on keyboard dialog * rework rework add a comment use discord bottom sheet * remove `@gorhom/bottom-sheet` * remove android specific code * organize imports
* 3p moderation services [WIP] (#2550)Paul Frazee2024-03-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add modservice screen and profile-header-card * Drop the guidelines for now * Remove ununsed constants * Add label & label group descriptions * Not found state * Reorg, add icon * Subheader * Header * Complete header * Clean up * Add all groups * Fix scroll view * Dialogs side quest * Remove log * Add (WIP) debug mod page * Dialog solution * Add note * Clean up and reorganize localized moderation strings * Memoize * Add example * Add first ReportDialog screen * Report dialog step 2 * Submit * Integrate updates * Move moderation screen * Migrate buttons * Migrate everything * Rough sketch * Fix types * Update atoms values * Abstract ModerationServiceCard * Hook up data to settings page * Handle subscription * Rough enablement * Rough enablement * Some validation, fixes * More work on the mod debug screen * Hook up data * Update invalidation * Hook up data to ReportDialog * Fix native error * Refactor/rewrite the entire moderation-application system * Fix toggles * Add copyright and other option to report * Handle reports on profile vs content * Little cleanup * Get post hiding back in gear * Better loading flow on Mod screen * Clean up Mod screen * Clean up ProfileMod screen * Handle muting correctly * Update enablement on ProfileMod screen * Improve Moderation screen and dialog * Styling, handle disabled labelers * Rework list of labels on own content * Use moderateNotification() * ReportDialog updates * Fix button overflow * Simplify the ProfileModerationService ui * Mod screen design * Move moderation card from the profile header to a tab * Small tweaks to the moderation screen * Enable toggle on mod page * Add notifs to debugmod and dont filter notifs from followed users * Add moderator-service profile view * Wire up more of the modservice data to profiles * A bunch of speculative non-working UI * Cleanup: delete old code * Update ModerationDetailsDialog * Update ReportDialog * Update LabelsOnMe dialog * Handle ReportDialog load better * Rename LabelsOnMeDialog, fix close * Experiment to put labeling under a tab of a normal profile * Moderator variation of profile * Remove dead code and start moving toward latest modsdk * Remove a bunch of now-dead label strings * Update ModDebug to be a bit more intuitive and support custom labels * Minor ui tweaks * Improve consistency of display name blurring * Fix profile-card warning rendering * More debugmod UI tuning * Update to use new labeler semantics * Delete some dead code and do some refactoring * Update profile to pull from labeler definition * Implement new label config controls (wip) * Tweak ui * Implement preference controls on labelers * Rework label pref ui * Get moderation screen working * Add asyncstorage query persistence * Implement label handling * Small cleanup * Implement Likes dialog * Fix: remove text outside of text element * Cleanup * Fix likes dialog on mobile * Implement the label appeal flow * Get report flow working again with temporarily fixed report options * Update onboarding * Enforce limit of ten labeler subscriptions * Fix type errors * Fix lint errors * Improve types of RQ * Some work on Likes dialog, needs discussion * Bit of ReportDialog cleanup * Replace non-single-path SVG * Update nudity descriptions * Update to use new sdk updates * Add adult-content-enabled behavior to label config * Use the default setting of custom labels * Handle global moderation label prefs with the global settings * Fix missing postAuthor * Fix empty moderation page * Add mutewords control back to Mod screen * Tweak adult setting styles * Remove deprecated global labels * Handle underage users on mod screen * Adjust font sizes * Swap in RichText * Like button improvements * Tweaks to Labeler profile * Design tweaks for mod pref dialog * Add tertiary button color * Switch moderation UIs to tertiary color * Update mutewords and hiddenposts to use the new sdk * Add test-environment mod authority * Switch 'gore' to 'graphic-media' * Move nudity out of the adult content control * Remove focus styles from buttons - let the browser behavior handle it * Fixes to the adult content age-gating in moderaiton * Ditch tertiary button color, lighten secondary button * Fix some colors * Remove focused overrides from toggles * Liked by screen * Rework the moderationlabelpref * Fix optimistic like * Cleanup * Change how onboarding handles adult content enabled/disabled * Add special handling of the mod authorities * Tweaks * Update the default labeler avatar to a shield * Add route to go server * Avoid dups due to bad config * Fix attrs * Fix: dont try to detect link/label mismatches on post meta * Correctly show the label behavior when adult content is disabled * Readd the local hiddenPosts handling * WIP * Fix bad merge * Conten hider design tweaks * Fix text string breakage * Adjust source text in ContentHider * Fix link bug * Design tweaks to ContentHider and ModDetailsDialog * Adjust spacing of inform badges * Adjust spacing of embeds in posts * Style tweaks to post/profile alerts * Labels on me and dialog * Remove bad focus styles from post dropdown * Better spacing solution * Tune moderation UIs * Moderation UI tweaks for mobile * Move labelers query on Mod screen * Update to use new SDK appLabelers semantics * Implement report submission * Replace the report modal entirely with the report dialog * Add @ to mod details dialog handle * Bump SDK package * Remove silly type * Add to AWS build CI * Fix ToggleButton overflow * Clean up ModServiceCard, rename to LabelingServiceCard * Hackfix to translate gore labels to graphic-media * Tune content hider sizing on web desktop * Handle self labels * Fix spacing below text-only posts * Fix: send appeals to the right labeler * Give mod page links interactive states * Fix references * Remove focus handling * Remove remnant * Remove the like count from the subscribed labeler listing * Bump @atproto/api@0.11.1 * Remove extra @ * Fix: persist labels to local storage to reduce coverage gaps * update dipendencies * revert dipendencies * Add some explainers on how blocking affects labelers * Tweak copy * Fix underline color in header * Fix profile menu * Handle card overflow * Remove metrics from header * Mute 'account' not 'user' * Show metrics if self * Show the labels tab on logged out view * Fix bad merge * Use purple theming on labelers * Tighten space on LabelerCard * Set staleTime to 6hrs for labeler details * Memoize the memoizers * Drop staleTime to 60s * Move label defs into a context to reduce recomputes * Submit view tweaks * Move labeler fetch below auth * Mitigation: hardcode the bluesky moderation labeler name * Bump sdk * Add missing translated string Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Add missing translated string Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Hailey's fix for incorrect profile tabs Co-authored-by: Hailey <me@haileyok.com> * Feedback * Fix borders, add bottom space * Hailey's fix pt 2 Co-authored-by: Hailey <me@haileyok.com> * Fix post tabs * Integrate feedback pt 1 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Integrate feedback pt 2 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Integrate feedback pt 3 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Integrate feedback pt 4 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Integrate feedback pt 5 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Integrate feedback pt 6 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Integrate feedback pt 7 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Integrate feedback pt 8 Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> * Format * Integrate new bday modal * Use public agent for getServices * Update casing --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Takayuki KUSANO <65759+tkusano@users.noreply.github.com> Co-authored-by: Hailey <me@haileyok.com>
* New component library based on ALF (#2459)Eric Bailey2024-01-181-0/+21
* Install on native as well * Add button and link components * Comments * Use new prop * Add some form elements * Add labels to input * Fix line height, add suffix * Date inputs * Autofill styles * Clean up InputDate types * Improve types for InputText, value handling * Enforce a11y props on buttons * Add Dialog, Portal * Dialog contents * Native dialog * Clean up * Fix animations * Improvements to web modal, exiting still broken * Clean up dialog types * Add Prompt, Dialog refinement, mobile refinement * Integrate new design tokens, reorg storybook * Button colors * Dim mode * Reorg * Some styles * Toggles * Improve a11y * Autosize dialog, handle max height, Dialog.ScrolLView not working * Try to use BottomSheet's own APIs * Scrollable dialogs * Add web shadow * Handle overscroll * Styles * Dialog text input * Shadows * Button focus states * Button pressed states * Gradient poc * Gradient colors and hovers * Add hrefAttrs to Link * Some more a11y * Toggle invalid states * Update dialog descriptions for demo * Icons * WIP Toggle cleanup * Refactor toggle to not rely on immediate children * Make Toggle controlled * Clean up Toggles storybook * ToggleButton styles * Improve a11y labels * ToggleButton hover darkmode * Some i18n * Refactor input * Allow extension of input * Remove old input * Improve icons, add CalendarDays * Refactor DateField, web done * Add label example * Clean up old InputDate, DateField android, text area example * Consistent imports * Button context, icons * Add todo * Add closeAllDialogs control * Alignment * Expand color palette * Hitslops, add shortcut to Storybook in dev * Fix multiline on ios * Mark dialog close button as unused