* Add logged out e2e ctrl, fix login test
* Fix log handling via env vars in expo
* Fix create account test
* Upgrade dev-env
* Fix home screen tests
* Fix composer tests
* Fix curate-lists tests, split in two
* Fix invite codes test
* Fix curate-lists tests
* Give up on mergefeed test
* Fix mod lists
* Fix app view url
* Fix profile tests
* Fix profile test with hack
* Keep using globals
* Fix two more
* Fix thread view
* Better skip for merge feed
* Revert debug code
* Do no poll when screen is not focused
* Avoid polling unless focused
* Handle homepage in background
* Fix the intl:check to ignore comments in diffs
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Install lingui eslint plugin, ignore compiled files
* Add lingui step to Lint workflow
* Run check in other job
* Add compile step to web build
* Temp: add a new string to test with
* Add message
* Revert "Temp: add a new string to test with"
This reverts commit ef5459d00c3ea9798279e000a5ac43effc117486.
* Un-track compiled files
* Add check scripts to package.json, build step
* Make sure to compile translations prior to test/typecheck
* Rename scripts
* fixed lack of styles on 1300px web viewport width by adjusting tablet breakpoints
* fixed lack of styles on 800px web viewport width by adjusting mobile breakpoints
* changed `maxWidth` values in viewports to `n - 1` format
* Reset
* Associate shadows with the cache
* Use colocated helpers
* Fix types
* Reorder for clarity
* More types
* Copy paste logic for profile
* Hook up profile query
* Hook up suggested follows
* Hook up other profile things
* Fix shape
* Pass setShadow into the effect deps
* Include reply posts in the shadow cache search
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Dont group read & unread notifications together
* Remove and reduce some stale cache times
* Keep the staleTime on the post-feed
* Bring back the load-bearing staletime on profile
* Assign keys to feed slices via a counter, to enable duplicate items in the feed if needed
* Move post-feed query state into the query's page params to consistently bind their lifecycles
* Optimisticaly update order of saved feeds
* Better show disabled state for pin button
* Improve loading/disabled states
* Improve placeholder
* Simplify loading components
* show logged out view when adding accounts
* Handle existing signed-in account
* Show which account is currently logged in
* Fix showing toasts
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Rework resolve-did and resolve-uri queries to be smarter about cache reuse
* Precache handle resolutions
* Remove old unused code
* Load placeholder threads from the post-feed and notifications-feed queries
* Remove logs
* Fix bad ref
* Add loading spinners to the cache-loading thread view
* Scroll replies into view when loading threads
* Add caching within a thread
* Fix: dont show bottom border when the child spinner is active
* Vendor createNativeStackNavigator for further tweaks
* Completely disable withAuthRequired
* Render LoggedOut for protected routes
* Move web shell into the navigator
* Simplify the logic
* Add login modal
* Delete withAuthRequired
* Reset app state on session change
* Move TS suppression
* Make shadow a type-only concept
* Prevent unnecessary init state recalc
* Use derived state instead of effects
* Batch emitter updates
* Use object first seen time instead of dataUpdatedAt
* Stop threading dataUpdatedAt through
* Use same value consistently
* Base work for public view
* Make default moderation settings more restrictive
* Fix type
* Handle showing sign-in on authed actions
* Fix hoc logic
* Simplify prefs logic
* Remove duplicate method
* Add todo
* Clean up RepostButton.web
* Fix x button color
* Add todo
* Retain existing label prefs for now, use separate logged out settings
* Clean up useAuthedMethod, rename to useRequireAuth
* Add todos
* Move dismiss logic to withAuthRequired
* Ooops add web
* Block public view in prod
* Add todo
* Fix bad import
* get basic hindi support to work
* get web app language switcher in
* Refactor i18n implementation and remove unused
code
* add missing strings
* add dropdowns and modals missing strings
* complete all hindi translations
* fix merge conflicts
* fix legeacy persisted state
* fix data in RecommendedFeeds
* fix lint
* Dont use the stale cache for notifs-feed
* Add a delay to marking all read to avoid marking upcoming posts as read
* Trigger automatic notifications refresh when navigating to the tab, in certain conditions
* Prototype a queue
* Track both current and pending actions
* Skip unnecessary actions
* Commit last confirmed state to shadow
* Thread state through actions over time
* Fix the logic to skip redundant mutations
* Track status
* Extract an abstraction
* Fix standalone mutations
* Add types
* Move to another file
* Return stable function
* Clean up
* Use queue for muting
* Use queue for blocking
* Convert other follow buttons
* Don't export non-queue mutations
* Properly handle canceled tasks
* Fix copy paste
* Update login page to use service query
* Update modal to use session instead of store
* Move image sizes cache off store
* Update settings to no longer use store
* Update link-meta fetch to use agent instead of rootstore
* Remove deprecated resolveName()
* Delete deprecated link-metas cache
* Delete deprecated posts cache
* Delete all remaining mobx models, including the root store
* Strip out unused mobx observer wrappers
* Replace me model in post dropdown btn
* Replace delete account logic
* Replace me model in bottom bar web
* Replace me model in bottom bar
* Replace me model in reply prompt
* Better fallback
* Fix reference
* Fix bad ref in bottom bar
* Refactor ChangeHandle to use new methods
* Better telemetry
* Remove unused logic
* Remove caching
* Add error message
* Persist service changes, don't fall back on change handle
* Move tick-every-minute into a hook/context
* Move soft-reset event out of the shell model
* Update soft-reset listener on new search page
* Implement session-loaded and session-dropped events
* Update analytics and push-notifications to use new session system
* Unify the autocomplete code; drop fuse
* Persist autocomplete results while they're in progress
* Commit lockfile
* Use ReturnType helper
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Port user followers to RQ
* Port user follows to RQ
* Start porting FollowButton to RQ
* Fix RQ key
* Check pending
* Fix shadow and pending states
* Rm unused
* Remove last usage of useFollowProfile
* Add my-blocked-accounts and my-muted-accounts queries
* Update ProfileCard to use the profile shadow cache and useModerationOpts
* Update blocked accounts and muted accounts screens
* Refactor first onboarding step
* Replace old FeedSourceCard
* Clean up CustomFeedEmbed
* Remove discover feeds model
* Refactor ProfileFeed screen
* Remove useCustomFeed
* Delete some unused models
* Rip out more prefs
* Factor out treeView from thread comp
* Improve last commit
* Profile tabs WIP
* Refactor the profile screen to use react-query (WIP)
* Add the profile shadow and get follow, mute, and block working
* Cleanup
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Move broadcast channel to lib
* Refactor view/com/post/Post and remove temporary 2 components
* Add useModerationOpts hook
* Refactor notifications to use react-query
* Fix: only trigger updates in useModerationOpts when the values have changed
* Implement unread notification tracking
* Add moderation filtering to notifications
* Handle native/push notifications
* Remove dead code
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Refactor lists queries to react-query
* Delete old lists-list model
* Implement list, list-members, and list-memberships react-queries
* Update CreateOrEditList modal
* First pass at my-follows and actor-autocomplete queries
* Update ListAddUserModal to use new queries, change to ListAddRemoveUsersModal
* Update UserAddRemoveLists modal
* Remove old TODO
* Fix indent, autocomplete query
* Add a todo
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Add initial preferences query, couple mutations
* Remove unused
* Clean up labels, migrate getModerationOpts
* Add birth date handling
* Migrate feed prefs
* Migrate thread view prefs
* Migrate homeFeed to use existing key name
* Fix up saved feeds in response, no impl yet
* Migrate saved feeds to new hooks
* Clean up more of preferences
* Fix PreferencesThreads load state
* Fix modal dismissal
* Small spacing fix
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Revert "Pull animated scroll handler down from pager"
This reverts commit ecebb78e40148b9160f832d26ada1d366551b645.
* Only handle onScroll for current page
* Add post and post-thread queries
* Update PostThread components to use new queries
* Move from normalized cache to shadow cache model
* Merge post shadow into the post automatically
* Remove dead code
* Remove old temporary session
* Fix: set agent on session creation
* Temporarily double-login
* Handle post-thread uri resolution errors
* Disable existing code that toggles shell
* Make shell mode a float
* Translate based on the gesture
* Track header and footer heights
* Add web support
* Fix types and cleanup
* Add back isScrolled logic
* Add comments
* install and setup lingui
* setup dynamic locale activation and async loading
* first pass of automated replacement of text messages
* add some more documentaton
* fix nits
* add `es` and `hi`locales for testing purposes
* make accessibilityLabel localized
* compile and extract new messages
* fix merge conflicts
* fix eslint warning
* change instructions from sending email to opening PR
* fix comments
* Add persistent state provider
* Catch write error
* Handle read errors, update error msgs
* Fix lint
* Don't provide initial state to loader
* Remove colorMode from shell state
* Idea: hook into persisted context from other files
* Migrate settings to new hook
* Rework persisted state to split individual contexts
* Tweak persisted schema and validation
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* WIP
* Add shell state
* Integrate new shell state for drawer and minimal shell mode
* Replace isDrawerSwipeDisabled
* Split shell state into separate contexts to avoid needless re-renders
* Fix typo
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Defer showing pager content until its header settles
* Introduce the concept of headerOnlyHeight
* Keep headerOnlyHeight in state, make headerHeight derived
* Hide content until *both* header (only) and tabbar are measured
* Hide tabbar to read its layout earlier
* Give consistent keys to pages
* Add lists screen
* Update Lists screen and List create/edit modal to support curate lists
* Rework the ProfileList screen and add curatelist support
* More ProfileList progress
* Update list modals
* Rename mutelists to modlists
* Layout updates/fixes
* More layout fixes
* Modal fixes
* List list screen updates
* Update feed page to give more info
* Layout fixes to ListAddUser modal
* Layout fixes to FlatList and Feed on desktop
* Layout fix to LoadLatestBtn on Web
* Handle did resolution before showing the ProfileList screen
* Rename the CustomFeed routes to ProfileFeed for consistency
* Fix layout issues with the pager and feeds
* Factor out some common code
* Fix UIs for mobile
* Fix user list rendering
* Fix: dont bubble custom feed errors in the merge feed
* Refactor feed models to reduce usage of the SavedFeeds model
* Replace CustomFeedModel with FeedSourceModel which abstracts feed-generators and lists
* Add the ability to pin lists
* Add pinned lists to mobile
* Remove dead code
* Rework the ProfileScreenHeader to create more real-estate for action buttons
* Improve layout behavior on web mobile breakpoints
* Refactor feed & list pages to use new Tabs layout component
* Refactor to ProfileSubpageHeader
* Implement modlist block and mute
* Switch to new api and just modify state on modlist actions
* Fix some UI overflows
* Fix: dont show edit buttons on lists you dont own
* Fix alignment issue on long titles
* Improve loading and error states for feeds & lists
* Update list dropdown icons for ios
* Fetch feed display names in the mergefeed
* Improve rendering off offline feeds in the feed-listing page
* Update Feeds listing UI to react to changes in saved/pinned state
* Refresh list and feed on posts tab press
* Fix pinned feed ordering UI
* Fixes to list pinning
* Remove view=simple qp
* Add list to feed tuners
* Render richtext
* Add list href
* Add 'view avatar'
* Remove unused import
* Fix missing import
* Correctly reflect block by list state
* Replace the <Tabs> component with the more effective <PagerWithHeader> component
* Improve the responsiveness of the PagerWithHeader
* Fix visual jank in the feed loading state
* Improve performance of the PagerWithHeader
* Fix a case that would cause the header to animate too aggressively
* Add the ability to scroll to top by tapping the selected tab
* Fix unit test runner
* Update modlists test
* Add curatelist tests
* Fix: remove link behavior in ListAddUser modal
* Fix some layout jank in the PagerWithHeader on iOS
* Simplify ListItems header rendering
* Wait for the appview to recognize the list before proceeding with list creation
* Fix glitch in the onPageSelecting index of the Pager
* Fix until()
* Copy fix
Co-authored-by: Eric Bailey <git@esb.lol>
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Remove cropped area in Edit profile screen iOS
* Hide cancel button when saving changes in EditProfile
* Disable fadeOut animation cancel button for web in EditProfile screen
Since react-native-reanimated is not configured for web support (https://docs.swmansion.com/react-native-reanimated/docs/2.x/fundamentals/web-support/), we are enabling fade out animation for iOS and android solely
* Copypaste UserAvatar to EditableUserAvatar
* Swap usages with onSelectNewAvatar to EditableUserAvatar
* Split prop types into UserAvatarProps and EditableUserAvatarProps
* Remove dead branches from EditableUserAvatar
* Remove dead branches from UserAvatar
* upgrade sentry to support profiling monitoring
* remove console logs in production builds
* feeds tab bar and bottom bar animation centralized
* refactor FeedPage out of Home
* add script to start in production mode
* move FAB inner to reanimated
* move FABInner back to `Animated` RN animation
* add perf commands
* add testing with Maestro and perf with Flashlight
* fix merge conflicts
* fix resourceClass name in eas.json
* fix onEndReachedThreshold in Feed
* memoize styles
* go back to old styling for LoadLatestBtn
* remove reanimated code from useMinimalShellMode
* move shell animations to hook/reanimated for perf
* fix empty state issue
* make shell animation feel smoother
* make shell animation more smooth
* run animation with autorun
* specify keys for tab bar properly
* remove comments
* remove already imported dep
* fix lint
* add testing instructions
* mock sentry-expo for jest
* fix jest mocks
* Fix the load-latest button on desktop and tablet
* Fix: don't move the FAB in tablet mode
* Fix type error
* Fix tabs bar positioning on tablet
* Fix types
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Add top inset for profile preview to match target screen
* Avoid flicker by waiting for profile screen navigation
* Fix glimmer to align with the content
* A more reliable (but non-scientific) fix for the flash
* Lower the timeout
* Update testrunner to use new dev-env
* Fix label testcase
* Vendor the dev-infra scripts from the atproto repo for the dev-env server runner
* Bump detox to fix the ios sim control issue
* Use iphone 15 pro for tests
* Ensure the reminders never trigger during tests
* Skip the shell tests due to a crash bug with detox and the drawer
* Update follows cache to maintain some user info
* Prioritize follows in composer autocomplete
* Clean up logic and add new autocomplete to search
* Update follow hook
* Fix: improve the 'end of feed' detection condition
* Fix the feeds link on mobile in the empty state
* Align the following empty state better on web
* Dont autofocus the search input in the search tab
* Fix the error boundary render
* Add 'end of feed' CTA to following feed
* Reduce the default feeds to discover now that we have feed-selection during onboarding
* Fix case where loading spinner fails to stop rendering in bottom of feed
* Fix: dont show loading spinner at footer of feed when refreshing
* Fix: dont fire reminders during onboarding
* Optimize adding feeds and update to mirror the api behaviors more closely
* Use the lock in preferences to avoid clobbering in-flight updates
* Refresh the feed after onboarding to ensure content is visible
* Remove the now-incorrect comment
* Tune copy
- Replaced `useWebMediaQueries().isDesktop` with `isWeb` in `DesktopWebTextLink` component to fix inconsistent behavior due to media query changes.
- `isWeb` doesn't rely on media queries, offering stable judgement and avoiding fluctuation when adjusting the browser window.
* Add link warning modal when URLs do not match their text
* Simplify the misleading link case for clarity
* Fix typecheck
* fix dark mode
* Give a stronger visual indication of the root domain in the link warning
* More rigorous URL mismatch logic
* Remove debug
---------
Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
* Refactor `useOnMainScroll` function to use responsive device detection
- Replace static `isDesktopWeb` with `useWebMediaQueries` hook to enable dynamic device type detection.
- Create `useDeviceLimits` hook to dynamically determine `DY_LIMIT_UP` and `DY_LIMIT_DOWN` based on device type.
- Update dependency arrays for the `useCallback` hooks to include new dynamic variables.
* Refactor styles to be responsive to device type
- Create `useStyles` hook that generates styles object based on device type detected from `useWebMediaQueries`.
- Replace static styles object with dynamic styles object generated from `useStyles` hook in components.
- This allows `paddingLeft` values for 'ul' and 'ol' styles to adapt to device type dynamically.
- This allows `maxWidth` values for 'metaItem'' styles to adapt to device type dynamically.
* Remove `isDesktopWeb` in favor of `useWebMediaQueries().isDesktop`
* Refactor `SplashScreen` component for responsive design
* Revision based on review results
* Fix isNative check
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* quick switch menu
* Some small tweaks and fixes to the account switch modal
* Factor out the account switcher logic to a hook
* Add haptic feedback on account switcher open
* Fix bad merge
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Don't automatically mention users with invalid handles
* don't mention when using did urls
* resolve profile from cache
* a little clearer
---------
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* move content languages to screen
* add dropdown library, style primary lang select
* update settings button
* show selected langauges in button
* use primary language in translator link
* update copy
* lint
* Prefilter the mergefeed to ensure a better mix of following and custom feeds
* Test suite improvements & tests for the mergefeed (#1499)
* Disable invite codes test for now
* Update test sim to latest iphone
* Introduce TestCtrls driver
* Add mergefeed tests
* Bold the saved feeds on mobile
* Improve the saved feeds loading state
* Add soft reset handler to feeds page
* Show feed descriptions in profile listing
* Add an 'about this feed' modal
* Fix type assertion
* Add tree-view experiment to threads
* Fix typo
* Remove extra minimalshellmode call
* Fix to parent line rendering
* Fix extra border
* Some ui cleanup
* upgrade api package
* add RecommendedFollows as a step in onboarding
* add list of recommended follows from suggested actor model
* remove dead code
* hoist suggestedActors into onboarding model
* add comments
* load more suggested follows on follow
* styling changes
* add animation
* tweak animations
* adjust styling slightly
* adjust styles on mobile
* styling improvements for web
* fix text alignment in RecommendedFollows
* dedupe inserted suggestions
* fix animation duration
* Minor spacing tweak
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com> and Eric Bailey <git@esb.lol>
* 🐛 Handle middle mouse click on feed list items
* ♻️ Refactor the event listener and turn it into a dedicated hook for web
* 🧹 Cleanup unnecessary Link changes
* Fix import
* Create native version of useAuxClick
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Fix error state for recommended feeds
* Handle failure to set default feeds more safely
* Dont return undefined within react-query
* Update yarn.lock
* Feeds navigation on right side of desktop (#1403)
* Remove home feed header on desktop
* Add feeds to right sidebar
* Add simple non-moving header to desktop
* Improve loading state of custom feed header
* Remove log
Co-authored-by: Eric Bailey <git@esb.lol>
* Remove dead comment
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* Redesign feeds tab (#1439)
* consolidate saved feeds and discover into one screen
* Add hoverStyle behavior to <Link>
* More UI work on SavedFeeds
* Replace satellite icon with a hashtag
* Tune My Feeds mobile ui
* Handle no results in my feeds
* Remove old DiscoverFeeds screen
* Remove multifeed
* Remove DiscoverFeeds from router
* Improve loading placeholders
* Small fixes
* Fix types
* Fix overflow issue on firefox
* Add icons prompting to open feeds
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Merge feed prototype [WIP] (#1398)
* POC WIP for the mergefeed
* Add feed API wrapper and move mergefeed into it
* Show feed source in mergefeed
* Add lodash.random dep
* Improve mergefeed sampling and reliability
* Tune source ui element
* Improve mergefeed edge condition handling
* Remove in-place update of feeds for performance
* Fix link on native
* Fix bad ref
* Improve variety in mergefeed sampling
* Fix types
* Fix rebase error
* Add missing source field (got dropped in merge)
* Update find more link
* Simplify the right hand feeds nav
* Bring back load latest button on desktop & unify impl
* Add 'From' to source
* Add simple headers to desktop home & notifications
* Fix thread view jumping around horizontally
* Add unread indicators to desktop headers
* Add home feed preference for enabling the mergefeed
* Add a preference for showing replies among followed users only (#1448)
* Add a preference for showing replies among followed users only
* Simplify the reply filter UI
* Fix typo
* Simplified custom feed header
* Add soft reset to custom feed screen
* Drop all the in-post translate links except when expanded (#1455)
* Update mobile feed settings links to match desktop
* Fixes to feeds screen loading states
* Bolder active state of feeds tab on mobile web
* Fix dark mode issue
---------
Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: Ansh <anshnanda10@gmail.com>
* add React Query and hook up to existing functionality
* wire in remote data, add error message
* remove hard-coded feeds
* oops fix logic
* add loading state
* fix loading on mobile
---------
Co-authored-by: Eric Bailey <git@esb.lol>
* 🗺️ fix an issue where web devices that see the Drawer couldn't access Profile from said Drawer
* fix routes on web
* handle profile button active state
* add hack for web navigation
* fix comment
---------
Co-authored-by: Micah Maligie <kerosuppi@gmail.com>
* Update time.ts to handle very small or negative time differences
Right now, posts can appear to be from the future with a negative time difference (i.e. -3s appears). This change defines 'NOW' as less than 5 seconds old, and returns 'now' in that case.
It's not clear how localisation is handled - this may need translation.
* Add test for 'now' in time/ago(...)
Add tests for ago() for right now (i.e. 'now') and 10s ago to ensure the seconds case is still tested
Fixes#1263
Previously, opening the crop tool had 1:1 selected by default. So if you opened it and pressed Done without changing anything, it would format the image as 1:1.
After this change, None is selected by default. So if you open the crop tool and press Done without changing anything, nothing will change.
* update to expo 49
* update expo-camera to fix console erorrs
* run doctor again
* fix ts errors
* patch @sentry/react-native
Getting `cannot read property 'ignoreLogs' of undefined` in this file.
Ironically, this may be a cyclical imports problem. LogBox isn't enabled
in production, so this patch should only affect dev/test.
* fix type error
* reinstall newer reanimated
* pin expo-dev-client to fix reanimated dev-build issue
* fix type errors, fix bad conflict res
* Fix to notifications badge z-index on desktop
---------
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Move most responsive queries to the hook
* Fix invalid CSS value
* Fixes to tablet render of post thread
* Fix overflow issues on web
* Fix search header on tablet
* Fix QP margin in web composer
* Fix: only apply double gutter once to flatlist (close#1368)
* Fix styles on discover feeds header
* Fix double discover links in multifeed
* move `PreferencesHomeFeed` to a screen instead of a modal
* add web route for home feed preferences
* upgrade `@miblanchard/react-native-slider` to fix lint
* fix web route naming
* fix desktop web styling
* add `react-native-slider` mock
* Default isAdultContentEnabled to false on all devices.
The original intent of setting the default based on the device was
to make the maximally-permissive choice. It turns out this was a
mistake as it created sync issues between devices; users would be
confused by the lack of congruity between them. We have to go with
false by default to ensure sync is retained.
* Update preferences model to use new sdk api
* Delete dead code
* Dont show the iOS adult content warning in content filtering settings if adult content is enabled
* Bump @atproto/api@0.6.8
* Codebase style consistency