Merge remote-tracking branch 'origin/main' into eric/post-controls-skeleton
* origin/main: (112 commits) Restore await to `dismissBrowser` in intent handler (#9326) add even more optional chaining to link thing (#9327) Avoid asking for read access to photo library when saving images on iOS (#9297) Remove use of `flatten` where possible (#9325) Nightly source-language update Adds client event for empty feed error (#9287) ship post follow follow suggestions (#9251) Android lightbox minor perf improvement (#9274) chore: update caniuse (#9239) fix right nav overflow (#9253) push in post-post toast (#9252) add android ripple effect to images in feed (#9273) Improve image download timeout handling (#9276) disable wake-from-background OTA on Android (#9317) Update Android adaptive icon (#9298) use 0.5px media border on high DPI screens on web (#9311) Update web dim `<html>` background color (#9307) Fixed Apple Music song embeds. (#9220) Nightly source-language update [APP-1321]: Update brand embeds more clearly (#8955) ...
@@ -50,8 +50,8 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: "temurin"
|
||||||
java-version: '17'
|
java-version: "17"
|
||||||
|
|
||||||
- name: ⚙️ Install dependencies
|
- name: ⚙️ Install dependencies
|
||||||
run: yarn install
|
run: yarn install
|
||||||
@@ -96,7 +96,7 @@ jobs:
|
|||||||
id: timestamp
|
id: timestamp
|
||||||
uses: nanzm/get-time-action@master
|
uses: nanzm/get-time-action@master
|
||||||
with:
|
with:
|
||||||
format: 'MM-DD-HH-mm-ss'
|
format: "MM-DD-HH-mm-ss"
|
||||||
|
|
||||||
- name: 🚀 Upload Production Artifact
|
- name: 🚀 Upload Production Artifact
|
||||||
id: upload-artifact-production
|
id: upload-artifact-production
|
||||||
@@ -146,6 +146,11 @@ jobs:
|
|||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }}
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CLIENT_ALERT_WEBHOOK }}
|
||||||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
||||||
|
|
||||||
|
- name: 🧹 Clear Metro cache
|
||||||
|
if: ${{ inputs.profile == 'production' }}
|
||||||
|
# https://github.com/expo/eas-cli/issues/2959#issuecomment-2749791326
|
||||||
|
run: rm -rf ${TMPDIR:-/tmp}/metro-cache
|
||||||
|
|
||||||
- name: 🏗️ Build Production APK
|
- name: 🏗️ Build Production APK
|
||||||
if: ${{ inputs.profile == 'production' }}
|
if: ${{ inputs.profile == 'production' }}
|
||||||
run: >
|
run: >
|
||||||
@@ -182,11 +187,11 @@ jobs:
|
|||||||
- name: ⬇️ Restore Cache
|
- name: ⬇️ Restore Cache
|
||||||
id: get-base-commit
|
id: get-base-commit
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
if: ${{ inputs.profile == 'testflight' }}
|
if: ${{ inputs.profile == 'testflight-android' }}
|
||||||
with:
|
with:
|
||||||
path: most-recent-testflight-commit.txt
|
path: most-recent-testflight-commit.txt
|
||||||
key: most-recent-testflight-commit
|
key: most-recent-testflight-commit
|
||||||
|
|
||||||
- name: ✏️ Write commit hash to cache
|
- name: ✏️ Write commit hash to cache
|
||||||
if: ${{ inputs.profile == 'testflight' }}
|
if: ${{ inputs.profile == 'testflight-android' }}
|
||||||
run: echo ${{ github.sha }} > most-recent-testflight-commit.txt
|
run: echo ${{ github.sha }} > most-recent-testflight-commit.txt
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
if: github.repository == 'bluesky-social/social-app'
|
if: github.repository == 'bluesky-social/social-app'
|
||||||
name: Build and Submit iOS
|
name: Build and Submit iOS
|
||||||
runs-on: macos-15
|
runs-on: macos-26
|
||||||
steps:
|
steps:
|
||||||
- name: Check for EXPO_TOKEN
|
- name: Check for EXPO_TOKEN
|
||||||
run: >
|
run: >
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: maxim-lobanov/setup-xcode@v1
|
- uses: maxim-lobanov/setup-xcode@v1
|
||||||
with:
|
with:
|
||||||
xcode-version: "16.4"
|
xcode-version: "26.0"
|
||||||
|
|
||||||
- name: ☕️ Setup Cocoapods
|
- name: ☕️ Setup Cocoapods
|
||||||
uses: maxim-lobanov/setup-cocoapods@v1
|
uses: maxim-lobanov/setup-cocoapods@v1
|
||||||
@@ -98,10 +98,29 @@ jobs:
|
|||||||
yarn use-build-number-with-bump
|
yarn use-build-number-with-bump
|
||||||
eas build -p ios
|
eas build -p ios
|
||||||
--profile ${{ inputs.profile || 'testflight' }}
|
--profile ${{ inputs.profile || 'testflight' }}
|
||||||
--local --output build.ipa --non-interactive
|
--local --output build.tar.gz --non-interactive
|
||||||
|
|
||||||
|
- name: 📂 Extract build artifact
|
||||||
|
run: |
|
||||||
|
if [ -f "build.tar.gz" ]; then
|
||||||
|
echo "Extracting build.tar.gz..."
|
||||||
|
mkdir ios-build
|
||||||
|
tar -xzf build.tar.gz -C ios-build
|
||||||
|
echo "Extraction completed successfully"
|
||||||
|
else
|
||||||
|
echo "Archive file not found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: 🚀 Deploy
|
- name: 🚀 Deploy
|
||||||
run: eas submit -p ios --non-interactive --path build.ipa
|
run: eas submit -p ios --non-interactive --path ios-build/ios/build/Bluesky.ipa
|
||||||
|
|
||||||
|
- name: 🪲 Upload dSYM to Sentry
|
||||||
|
run: >
|
||||||
|
SENTRY_ORG=blueskyweb
|
||||||
|
SENTRY_PROJECT=app
|
||||||
|
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||||
|
yarn sentry-cli debug-files upload ios-build/ios/build/Bluesky.app.dSYM.zip --include-sources
|
||||||
|
|
||||||
- name: 📚 Get version from package.json
|
- name: 📚 Get version from package.json
|
||||||
id: get-build-info
|
id: get-build-info
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ jobs:
|
|||||||
# GitHub actions are horrible so let's just copy paste this in
|
# GitHub actions are horrible so let's just copy paste this in
|
||||||
buildIfNecessaryIOS:
|
buildIfNecessaryIOS:
|
||||||
name: Build and Submit iOS
|
name: Build and Submit iOS
|
||||||
runs-on: macos-15
|
runs-on: macos-26
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-build-ios
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}-build-ios
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -192,7 +192,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: maxim-lobanov/setup-xcode@v1
|
- uses: maxim-lobanov/setup-xcode@v1
|
||||||
with:
|
with:
|
||||||
xcode-version: "16.2"
|
xcode-version: "26.0"
|
||||||
|
|
||||||
- name: ☕️ Setup Cocoapods
|
- name: ☕️ Setup Cocoapods
|
||||||
uses: maxim-lobanov/setup-cocoapods@v1
|
uses: maxim-lobanov/setup-cocoapods@v1
|
||||||
|
|||||||
@@ -119,3 +119,8 @@ src/locale/locales/**/*.js
|
|||||||
|
|
||||||
# ogcard assets
|
# ogcard assets
|
||||||
bskyogcard/src/assets/fonts/noto-*
|
bskyogcard/src/assets/fonts/noto-*
|
||||||
|
|
||||||
|
# bskyweb build output
|
||||||
|
bskyweb/static/media/*.webp
|
||||||
|
bskyweb/static/media/*.jpg
|
||||||
|
bskyweb/static/media/*.png
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ appId: xyz.blueskyweb.app
|
|||||||
- tapOn:
|
- tapOn:
|
||||||
id: "passwordInput"
|
id: "passwordInput"
|
||||||
- inputText: "hunter22"
|
- inputText: "hunter22"
|
||||||
- hideKeyboard
|
- tapOn:
|
||||||
|
# hideKeyboard on ios is borked
|
||||||
|
# https://docs.maestro.dev/troubleshooting/known-issues#hidekeyboard-command-is-flaky
|
||||||
|
text: "Your account"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "nextBtn"
|
id: "nextBtn"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
|
|||||||
@@ -17,63 +17,52 @@ appId: xyz.blueskyweb.app
|
|||||||
id: "e2eGotoLists"
|
id: "e2eGotoLists"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "newUserListBtn"
|
id: "newUserListBtn"
|
||||||
- assertVisible:
|
- waitForAnimationToEnd
|
||||||
id: "createOrEditListModal"
|
- assertVisible: "Create user list"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editNameInput"
|
id: "editListNameInput"
|
||||||
- inputText: "Good Ppl"
|
- inputText: "Good Ppl"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editDescriptionInput"
|
id: "editListDescriptionInput"
|
||||||
- inputText: "They good"
|
- inputText: "They good"
|
||||||
- tapOn: "Save"
|
- tapOn: "Save"
|
||||||
- tapOn: "Save"
|
- assertNotVisible: "Create user list"
|
||||||
- assertNotVisible:
|
|
||||||
id: "createOrEditListModal"
|
|
||||||
- tapOn: "People"
|
- tapOn: "People"
|
||||||
- assertVisible: "Good Ppl"
|
- assertVisible: "Good Ppl"
|
||||||
- assertVisible: "They good"
|
- assertVisible: "They good"
|
||||||
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
label: "Edit display name and description via the edit curatelist modal"
|
id: "moreOptionsBtn"
|
||||||
point: "90%,9%"
|
|
||||||
- tapOn: "Edit list details"
|
- tapOn: "Edit list details"
|
||||||
- assertVisible:
|
- assertVisible: "Edit user list"
|
||||||
id: "createOrEditListModal"
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editNameInput"
|
id: "editListNameInput"
|
||||||
- eraseText
|
- eraseText
|
||||||
- inputText: "Bad Ppl"
|
- inputText: "Bad Ppl"
|
||||||
- hideKeyboard
|
- hideKeyboard
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editDescriptionInput"
|
id: "editListDescriptionInput"
|
||||||
- eraseText
|
- eraseText
|
||||||
- inputText: "They bad"
|
- inputText: "They bad"
|
||||||
- tapOn: "Save"
|
- tapOn: "Save"
|
||||||
- tapOn: "Save"
|
- assertNotVisible: "Edit user list"
|
||||||
- assertNotVisible:
|
|
||||||
id: "createOrEditListModal"
|
|
||||||
- assertVisible: Bad Ppl
|
- assertVisible: Bad Ppl
|
||||||
- assertVisible: They bad
|
- assertVisible: They bad
|
||||||
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
label: "Remove description via the edit curatelist modal"
|
id: "moreOptionsBtn"
|
||||||
point: "90%,9%"
|
|
||||||
- tapOn: "Edit list details"
|
- tapOn: "Edit list details"
|
||||||
- assertVisible:
|
- assertVisible: "Edit user list"
|
||||||
id: "createOrEditListModal"
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editDescriptionInput"
|
id: "editListDescriptionInput"
|
||||||
- eraseText
|
- eraseText
|
||||||
- tapOn: "Save"
|
- tapOn: "Save"
|
||||||
- tapOn: "Save"
|
- assertNotVisible: "Edit user list"
|
||||||
- assertNotVisible:
|
|
||||||
id: "createOrEditListModal"
|
|
||||||
- assertNotVisible:
|
- assertNotVisible:
|
||||||
id: "listDescription"
|
id: "listDescription"
|
||||||
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
label: "Delete the curatelist"
|
id: "moreOptionsBtn"
|
||||||
point: "90%,9%"
|
|
||||||
- tapOn: "Delete List"
|
- tapOn: "Delete List"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "confirmBtn"
|
id: "confirmBtn"
|
||||||
@@ -82,18 +71,15 @@ appId: xyz.blueskyweb.app
|
|||||||
id: "newUserListBtn"
|
id: "newUserListBtn"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "newUserListBtn"
|
id: "newUserListBtn"
|
||||||
- assertVisible:
|
- assertVisible: "Create user list"
|
||||||
id: "createOrEditListModal"
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editNameInput"
|
id: "editListNameInput"
|
||||||
- inputText: "Good Ppl"
|
- inputText: "Good Ppl"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editDescriptionInput"
|
id: "editListDescriptionInput"
|
||||||
- inputText: "They good"
|
- inputText: "They good"
|
||||||
- tapOn: "Save"
|
- tapOn: "Save"
|
||||||
- tapOn: "Save"
|
- assertNotVisible: "Create user list"
|
||||||
- assertNotVisible:
|
|
||||||
id: "createOrEditListModal"
|
|
||||||
- tapOn: "People"
|
- tapOn: "People"
|
||||||
- assertVisible: "Good Ppl"
|
- assertVisible: "Good Ppl"
|
||||||
- assertVisible: "They good"
|
- assertVisible: "They good"
|
||||||
|
|||||||
@@ -19,21 +19,17 @@ appId: xyz.blueskyweb.app
|
|||||||
id: "moderationlistsBtn"
|
id: "moderationlistsBtn"
|
||||||
- tapOn: "New list"
|
- tapOn: "New list"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editNameInput"
|
id: "editListNameInput"
|
||||||
- inputText: "Muted Users"
|
- inputText: "Muted Users"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "editDescriptionInput"
|
id: "editListDescriptionInput"
|
||||||
- inputText: "Shhh"
|
- inputText: "Shhh"
|
||||||
- tapOn: "Save"
|
- tapOn: "Save"
|
||||||
- tapOn: "Save"
|
|
||||||
|
|
||||||
# view modlist
|
# view modlist
|
||||||
- assertVisible: "Muted Users"
|
- assertVisible: "Muted Users"
|
||||||
- assertVisible: "Shhh"
|
- assertVisible: "Shhh"
|
||||||
|
|
||||||
# DOES NOT WORK - THE BUTTON IS NOT ACCESSIBLE
|
|
||||||
# IGNORING FOR NOW, FIX THE COMPONENTS IN THE NEXT RELEASE
|
|
||||||
# BECAUSE THIS IS A LEGIT A11Y PROBLEM -sfn
|
|
||||||
- tapOn: "Subscribe to this list"
|
- tapOn: "Subscribe to this list"
|
||||||
- tapOn: "Mute accounts"
|
- tapOn: "Mute accounts"
|
||||||
- tapOn: "Mute list"
|
- tapOn: "Mute list"
|
||||||
|
|||||||
@@ -30,7 +30,14 @@ appId: xyz.blueskyweb.app
|
|||||||
- assertVisible: "What are your interests?"
|
- assertVisible: "What are your interests?"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "onboardingContinue"
|
id: "onboardingContinue"
|
||||||
- assertVisible: "You're ready to go!"
|
- assertVisible: "Suggested for you"
|
||||||
|
# mock server doesn't have suggestions api
|
||||||
|
- tapOn: "Skip to next step"
|
||||||
|
- swipe:
|
||||||
|
direction: "LEFT"
|
||||||
|
- swipe:
|
||||||
|
direction: "LEFT"
|
||||||
|
- assertVisible: "Complete onboarding and start using your account"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "onboardingFinish"
|
id: "onboardingFinish"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ appId: xyz.blueskyweb.app
|
|||||||
id: "e2eStartOnboarding"
|
id: "e2eStartOnboarding"
|
||||||
- tapOn: "Select an avatar"
|
- tapOn: "Select an avatar"
|
||||||
- waitForAnimationToEnd
|
- waitForAnimationToEnd
|
||||||
- assertVisible: "Search your library…"
|
- assertVisible: "Photos"
|
||||||
|
- assertVisible: "Collections"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
point: "50%,22%"
|
point: "50%,22%"
|
||||||
- waitForAnimationToEnd
|
- waitForAnimationToEnd
|
||||||
@@ -27,7 +28,14 @@ appId: xyz.blueskyweb.app
|
|||||||
- assertVisible: "What are your interests?"
|
- assertVisible: "What are your interests?"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "onboardingContinue"
|
id: "onboardingContinue"
|
||||||
- assertVisible: "You're ready to go!"
|
- assertVisible: "Suggested for you"
|
||||||
|
# mock server doesn't have suggestions api
|
||||||
|
- tapOn: "Skip to next step"
|
||||||
|
- swipe:
|
||||||
|
direction: "LEFT"
|
||||||
|
- swipe:
|
||||||
|
direction: "LEFT"
|
||||||
|
- assertVisible: "Complete onboarding and start using your account"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "onboardingFinish"
|
id: "onboardingFinish"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ appId: xyz.blueskyweb.app
|
|||||||
id: "viewHeaderHomeFeedPrefsBtn"
|
id: "viewHeaderHomeFeedPrefsBtn"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "replyBtn"
|
id: "replyBtn"
|
||||||
|
- tapOn:
|
||||||
|
id: "replyBtn"
|
||||||
- inputText: "Reply 1"
|
- inputText: "Reply 1"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "composerPublishBtn"
|
id: "composerPublishBtn"
|
||||||
@@ -69,6 +71,8 @@ appId: xyz.blueskyweb.app
|
|||||||
id: "profilePager-selector-1"
|
id: "profilePager-selector-1"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "replyBtn"
|
id: "replyBtn"
|
||||||
|
- tapOn:
|
||||||
|
id: "replyBtn"
|
||||||
- inputText: "Reply 2"
|
- inputText: "Reply 2"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "composerPublishBtn"
|
id: "composerPublishBtn"
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ appId: xyz.blueskyweb.app
|
|||||||
- swipe:
|
- swipe:
|
||||||
from: "Bluesky"
|
from: "Bluesky"
|
||||||
direction: DOWN
|
direction: DOWN
|
||||||
|
duration: 100
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: e2eProxyHeaderInput
|
id: e2eProxyHeaderInput
|
||||||
- inputText: ${output.result}
|
- inputText: ${output.result}
|
||||||
- pressKey: Enter
|
- pressKey: Enter
|
||||||
- hideKeyboard
|
|
||||||
|
|||||||
@@ -378,6 +378,7 @@ describe('parseEmbedPlayerFromUrl', () => {
|
|||||||
'https://music.apple.com/us/playlist/playlistName/playlistId',
|
'https://music.apple.com/us/playlist/playlistName/playlistId',
|
||||||
'https://music.apple.com/us/album/albumName/albumId',
|
'https://music.apple.com/us/album/albumName/albumId',
|
||||||
'https://music.apple.com/us/album/albumName/albumId?i=songId',
|
'https://music.apple.com/us/album/albumName/albumId?i=songId',
|
||||||
|
'https://music.apple.com/us/song/songName/songId',
|
||||||
|
|
||||||
'https://vimeo.com/videoId',
|
'https://vimeo.com/videoId',
|
||||||
'https://vimeo.com/videoId?autoplay=0',
|
'https://vimeo.com/videoId?autoplay=0',
|
||||||
@@ -604,6 +605,11 @@ describe('parseEmbedPlayerFromUrl', () => {
|
|||||||
playerUri:
|
playerUri:
|
||||||
'https://embed.music.apple.com/us/album/albumName/albumId?i=songId',
|
'https://embed.music.apple.com/us/album/albumName/albumId?i=songId',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'apple_music_song',
|
||||||
|
source: 'appleMusic',
|
||||||
|
playerUri: 'https://embed.music.apple.com/us/song/songName/songId',
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
type: 'vimeo_video',
|
type: 'vimeo_video',
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ module.exports = function (_config) {
|
|||||||
*
|
*
|
||||||
* @see https://docs.expo.dev/build-reference/variables/#built-in-environment-variables
|
* @see https://docs.expo.dev/build-reference/variables/#built-in-environment-variables
|
||||||
*/
|
*/
|
||||||
const PLATFORM = process.env.EAS_BUILD_PLATFORM
|
const PLATFORM = process.env.EAS_BUILD_PLATFORM ?? 'web'
|
||||||
|
|
||||||
const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
|
||||||
const IS_PRODUCTION = process.env.EXPO_PUBLIC_ENV === 'production'
|
const IS_PRODUCTION = process.env.EXPO_PUBLIC_ENV === 'production'
|
||||||
@@ -40,7 +40,7 @@ module.exports = function (_config) {
|
|||||||
runtimeVersion: {
|
runtimeVersion: {
|
||||||
policy: 'appVersion',
|
policy: 'appVersion',
|
||||||
},
|
},
|
||||||
icon: './assets/app-icons/ios_icon_default_light.png',
|
icon: './assets/app-icons/ios_icon_default_next.png',
|
||||||
userInterfaceStyle: 'automatic',
|
userInterfaceStyle: 'automatic',
|
||||||
primaryColor: '#1083fe',
|
primaryColor: '#1083fe',
|
||||||
newArchEnabled: false,
|
newArchEnabled: false,
|
||||||
@@ -50,6 +50,10 @@ module.exports = function (_config) {
|
|||||||
config: {
|
config: {
|
||||||
usesNonExemptEncryption: false,
|
usesNonExemptEncryption: false,
|
||||||
},
|
},
|
||||||
|
icon:
|
||||||
|
PLATFORM === 'web' // web build doesn't like .icon files
|
||||||
|
? './assets/app-icons/ios_icon_default_next.png'
|
||||||
|
: './assets/app-icons/ios_icon_default.icon',
|
||||||
infoPlist: {
|
infoPlist: {
|
||||||
UIBackgroundModes: ['remote-notification'],
|
UIBackgroundModes: ['remote-notification'],
|
||||||
NSCameraUsageDescription:
|
NSCameraUsageDescription:
|
||||||
@@ -112,6 +116,34 @@ module.exports = function (_config) {
|
|||||||
'com.apple.security.application-groups': 'group.app.bsky',
|
'com.apple.security.application-groups': 'group.app.bsky',
|
||||||
},
|
},
|
||||||
privacyManifests: {
|
privacyManifests: {
|
||||||
|
NSPrivacyCollectedDataTypes: [
|
||||||
|
{
|
||||||
|
NSPrivacyCollectedDataType: 'NSPrivacyCollectedDataTypeCrashData',
|
||||||
|
NSPrivacyCollectedDataTypeLinked: false,
|
||||||
|
NSPrivacyCollectedDataTypeTracking: false,
|
||||||
|
NSPrivacyCollectedDataTypePurposes: [
|
||||||
|
'NSPrivacyCollectedDataTypePurposeAppFunctionality',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
NSPrivacyCollectedDataType:
|
||||||
|
'NSPrivacyCollectedDataTypePerformanceData',
|
||||||
|
NSPrivacyCollectedDataTypeLinked: false,
|
||||||
|
NSPrivacyCollectedDataTypeTracking: false,
|
||||||
|
NSPrivacyCollectedDataTypePurposes: [
|
||||||
|
'NSPrivacyCollectedDataTypePurposeAppFunctionality',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
NSPrivacyCollectedDataType:
|
||||||
|
'NSPrivacyCollectedDataTypeOtherDiagnosticData',
|
||||||
|
NSPrivacyCollectedDataTypeLinked: false,
|
||||||
|
NSPrivacyCollectedDataTypeTracking: false,
|
||||||
|
NSPrivacyCollectedDataTypePurposes: [
|
||||||
|
'NSPrivacyCollectedDataTypePurposeAppFunctionality',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
NSPrivacyAccessedAPITypes: [
|
NSPrivacyAccessedAPITypes: [
|
||||||
{
|
{
|
||||||
NSPrivacyAccessedAPIType:
|
NSPrivacyAccessedAPIType:
|
||||||
@@ -143,12 +175,11 @@ module.exports = function (_config) {
|
|||||||
barStyle: 'light-content',
|
barStyle: 'light-content',
|
||||||
},
|
},
|
||||||
android: {
|
android: {
|
||||||
icon: './assets/app-icons/android_icon_default_light.png',
|
icon: './assets/app-icons/android_icon_default_next.png',
|
||||||
adaptiveIcon: {
|
adaptiveIcon: {
|
||||||
foregroundImage: './assets/icon-android-foreground.png',
|
foregroundImage: './assets/icon-android-foreground.png',
|
||||||
monochromeImage: './assets/icon-android-foreground.png',
|
monochromeImage: './assets/icon-android-monochrome.png',
|
||||||
backgroundImage: './assets/icon-android-background.png',
|
backgroundColor: '#006AFF',
|
||||||
backgroundColor: '#1185FE',
|
|
||||||
},
|
},
|
||||||
googleServicesFile: './google-services.json',
|
googleServicesFile: './google-services.json',
|
||||||
package: 'xyz.blueskyweb.app',
|
package: 'xyz.blueskyweb.app',
|
||||||
@@ -295,18 +326,13 @@ module.exports = function (_config) {
|
|||||||
* Default set
|
* Default set
|
||||||
*/
|
*/
|
||||||
default_light: {
|
default_light: {
|
||||||
ios: './assets/app-icons/ios_icon_default_light.png',
|
ios: './assets/app-icons/ios_icon_legacy_light.png',
|
||||||
android: './assets/app-icons/android_icon_default_light.png',
|
android: './assets/app-icons/android_icon_legacy_light.png',
|
||||||
prerendered: true,
|
prerendered: true,
|
||||||
},
|
},
|
||||||
default_dark: {
|
default_dark: {
|
||||||
ios: './assets/app-icons/ios_icon_default_dark.png',
|
ios: './assets/app-icons/ios_icon_legacy_dark.png',
|
||||||
android: './assets/app-icons/android_icon_default_dark.png',
|
android: './assets/app-icons/android_icon_legacy_dark.png',
|
||||||
prerendered: true,
|
|
||||||
},
|
|
||||||
next: {
|
|
||||||
ios: './assets/app-icons/icon_default_next.png',
|
|
||||||
android: './assets/app-icons/icon_default_next.png',
|
|
||||||
prerendered: true,
|
prerendered: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 369 KiB |
|
Before Width: | Height: | Size: 467 KiB After Width: | Height: | Size: 467 KiB |
|
Before Width: | Height: | Size: 432 KiB After Width: | Height: | Size: 432 KiB |
|
Before Width: | Height: | Size: 486 KiB |
|
After Width: | Height: | Size: 771 KiB |
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"fill" : {
|
||||||
|
"automatic-gradient" : "srgb:0.00000,0.41569,1.00000,1.00000"
|
||||||
|
},
|
||||||
|
"groups" : [
|
||||||
|
{
|
||||||
|
"layers" : [
|
||||||
|
{
|
||||||
|
"fill" : "none",
|
||||||
|
"glass" : false,
|
||||||
|
"image-name" : "iOS transparent.png",
|
||||||
|
"name" : "iOS transparent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"shadow" : {
|
||||||
|
"kind" : "neutral",
|
||||||
|
"opacity" : 0.5
|
||||||
|
},
|
||||||
|
"translucency" : {
|
||||||
|
"enabled" : true,
|
||||||
|
"value" : 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supported-platforms" : {
|
||||||
|
"circles" : [
|
||||||
|
"watchOS"
|
||||||
|
],
|
||||||
|
"squares" : "shared"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 426 KiB |
|
Before Width: | Height: | Size: 389 KiB After Width: | Height: | Size: 389 KiB |
|
Before Width: | Height: | Size: 321 KiB After Width: | Height: | Size: 321 KiB |
|
Before Width: | Height: | Size: 223 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 332 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 125 KiB |
@@ -0,0 +1,10 @@
|
|||||||
|
<svg width="105" height="32" viewBox="0 0 105 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M19.7901 9.77492C21.7947 11.2889 23.9508 14.3587 24.7425 16.0059C25.5342 14.3587 27.6903 11.2889 29.6949 9.77492C31.1413 8.68251 33.485 7.83725 33.485 10.5269C33.485 11.064 33.1789 15.0393 32.9993 15.6848C32.3752 17.9285 30.1009 18.5008 28.0778 18.1544C31.6141 18.7598 32.5136 20.7653 30.5709 22.7708C26.1996 27.2831 24.7425 20.3569 24.7425 20.3569C24.7425 20.3569 23.2854 27.2831 18.9142 22.7708C16.9714 20.7653 17.871 18.7598 21.4072 18.1544C19.3841 18.5008 17.1099 17.9285 16.4857 15.6848C16.3061 15.0393 16 11.064 16 10.5269C16 7.83725 18.3437 8.68251 19.7901 9.77492Z" fill="white"/>
|
||||||
|
<path d="M44.3863 16.3646C45.5901 16.7932 46.2292 17.7837 46.2292 18.8924C46.2292 20.7698 44.9659 21.908 42.5434 21.908H37.5942V11.3828H42.3799C44.6835 11.3828 45.7982 12.5506 45.7982 14.1028C45.7982 15.1376 45.3226 15.8915 44.3863 16.3646ZM42.2313 13.0237H39.6006V15.7732H42.2313C43.2568 15.7732 43.8067 15.2411 43.8067 14.3541C43.8067 13.5411 43.2419 13.0237 42.2313 13.0237ZM39.6006 20.2524H42.4393C43.5689 20.2524 44.1782 19.735 44.1782 18.8037C44.1782 17.828 43.5986 17.3402 42.4393 17.3402H39.6006V20.2524Z" fill="white"/>
|
||||||
|
<path d="M49.0111 21.908H47.1385V11.3828H49.0111V21.908Z" fill="white"/>
|
||||||
|
<path d="M55.2202 18.5524V14.2802H57.0929V21.908H55.2797V20.7993C54.7 21.6567 53.8975 22.0854 52.872 22.0854C51.252 22.0854 50.1968 21.1098 50.1968 19.3359V14.2802H52.0694V19.0254C52.0694 19.9863 52.545 20.4741 53.5111 20.4741C54.4177 20.4741 55.2202 19.8089 55.2202 18.5524Z" fill="white"/>
|
||||||
|
<path d="M65.6167 18.2272V18.6706H59.8799C60.0137 19.9863 60.7419 20.6367 61.8714 20.6367C62.7334 20.6367 63.3131 20.2672 63.6252 19.5428H65.4235C65.0222 21.095 63.6846 22.0854 61.8566 22.0854C60.7122 22.0854 59.7907 21.7159 59.0922 20.9915C58.3937 20.2672 58.037 19.3063 58.037 18.0941C58.037 16.8967 58.3788 15.9359 59.0773 15.1967C59.7759 14.4724 60.6825 14.1028 61.8269 14.1028C62.9861 14.1028 63.9076 14.4872 64.5912 15.2411C65.2749 15.995 65.6167 17.0002 65.6167 18.2272ZM61.812 15.5515C60.7865 15.5515 60.0731 16.1428 59.8948 17.3698H63.7441C63.5806 16.2611 62.8969 15.5515 61.812 15.5515Z" fill="white"/>
|
||||||
|
<path d="M69.7673 22.115C67.5379 22.115 66.3638 21.2428 66.2598 19.4837H68.0878C68.1918 20.4298 68.6674 20.7846 69.797 20.7846C70.8076 20.7846 71.3129 20.4741 71.3129 19.868C71.3129 19.3211 70.9562 19.055 69.8118 18.8628L68.935 18.715C67.2555 18.4341 66.4232 17.6654 66.4232 16.4089C66.4232 14.975 67.5676 14.1028 69.6038 14.1028C71.7885 14.1028 72.9181 14.9602 72.9924 16.6898H71.2238C71.1792 15.7585 70.6293 15.4332 69.6038 15.4332C68.712 15.4332 68.2662 15.7289 68.2662 16.3202C68.2662 16.8524 68.6526 17.0889 69.5443 17.2515L70.5104 17.3993C72.3681 17.7393 73.1707 18.4193 73.1707 19.7202C73.1707 21.2576 71.9223 22.115 69.7673 22.115Z" fill="white"/>
|
||||||
|
<path d="M81.3899 21.908H79.2497L77.0204 18.3602L75.8611 19.5132V21.908H74.0182V11.3828H75.8611V17.4437L78.9822 14.2802H81.2116L78.3134 17.1628L81.3899 21.908Z" fill="white"/>
|
||||||
|
<path d="M86.2805 16.2019L86.9047 14.2802H88.8665L85.909 22.5289C85.5968 23.3715 85.2104 23.9776 84.72 24.3176C84.2295 24.6576 83.531 24.8202 82.6095 24.8202C82.2974 24.8202 82.0299 24.8054 81.7921 24.7759V23.3124H82.5055C83.3526 23.3124 83.7688 22.795 83.7688 22.0854C83.7688 21.7306 83.6499 21.2132 83.4121 20.548L81.1827 14.2802H83.204L83.8282 16.1872C84.289 17.6211 84.6902 19.0402 85.0469 20.4446C85.3739 19.2324 85.7901 17.8132 86.2805 16.2019Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.4 KiB |
@@ -37,7 +37,7 @@ export function Container({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className="w-full bg-white text-black hover:bg-neutral-50 dark:bg-dimmedBg dark:hover:bg-dimmedBgLighten relative transition-colors max-w-[600px] min-w-[300px] flex border dark:border-slate-600 dark:text-slate-200 rounded-xl"
|
className="w-full bg-brand text-black dark:bg-brand relative transition-colors max-w-[600px] min-w-[300px] flex items-center dark:text-slate-200 rounded-[20px] cursor-pointer hover:bg-opacity-90"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (ref.current && href) {
|
if (ref.current && href) {
|
||||||
// forwardRef requires preact/compat - let's keep it simple
|
// forwardRef requires preact/compat - let's keep it simple
|
||||||
@@ -49,7 +49,9 @@ export function Container({
|
|||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
{href && <Link href={href} />}
|
{href && <Link href={href} />}
|
||||||
<div className="flex-1 px-4 pt-3 pb-2.5 max-w-full">{children}</div>
|
<div className="flex-1 px-[6px] pt-[6px] pb-2.5 max-w-full">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ export function Embed({
|
|||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
href={`/profile/${record.author.did}/post/${getRkey(record)}`}
|
href={`/profile/${record.author.did}/post/${getRkey(record)}`}
|
||||||
className="transition-colors hover:bg-neutral-100 dark:hover:bg-slate-700 border dark:border-slate-600 rounded-xl p-2 gap-1.5 w-full flex flex-col">
|
className="transition-colors hover:bg-blue-50 dark:hover:bg-slate-900 border dark:border-slate-600 rounded-xl p-2 gap-1.5 w-full flex flex-col">
|
||||||
<div className="flex gap-1.5 items-center">
|
<div className="flex gap-1.5 items-center">
|
||||||
<div className="w-4 h-4 rounded-full bg-neutral-300 dark:bg-slate-700 shrink-0">
|
<div className="w-4 h-4 rounded-full bg-neutral-300 dark:bg-slate-900 shrink-0">
|
||||||
<img
|
<img
|
||||||
className="rounded-full"
|
className="rounded-full"
|
||||||
src={record.author.avatar}
|
src={record.author.avatar}
|
||||||
@@ -222,7 +222,7 @@ export function Embed({
|
|||||||
|
|
||||||
function Info({children}: {children: ComponentChildren}) {
|
function Info({children}: {children: ComponentChildren}) {
|
||||||
return (
|
return (
|
||||||
<div className="w-full rounded-xl border py-2 px-2.5 flex-row flex gap-2 bg-neutral-50">
|
<div className="w-full rounded-xl border py-2 px-2.5 flex-row flex gap-2 hover:bg-blue-50 dark:border-slate-600 dark:hover:bg-slate-900">
|
||||||
<img src={infoIcon} className="w-4 h-4 shrink-0 mt-0.5" />
|
<img src={infoIcon} className="w-4 h-4 shrink-0 mt-0.5" />
|
||||||
<p className="text-sm text-textLight dark:text-textDimmed">{children}</p>
|
<p className="text-sm text-textLight dark:text-textDimmed">{children}</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -330,7 +330,7 @@ function ExternalEmbed({
|
|||||||
{content.external.thumb && (
|
{content.external.thumb && (
|
||||||
<img
|
<img
|
||||||
src={content.external.thumb}
|
src={content.external.thumb}
|
||||||
className="aspect-[1.91/1] object-cover"
|
className="aspect-[1200/630] object-cover"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="py-3 px-4">
|
<div className="py-3 px-4">
|
||||||
@@ -435,7 +435,7 @@ function StarterPackEmbed({
|
|||||||
<Link
|
<Link
|
||||||
href={starterPackHref}
|
href={starterPackHref}
|
||||||
className="w-full rounded-xl overflow-hidden border dark:border-slate-600 flex flex-col items-stretch">
|
className="w-full rounded-xl overflow-hidden border dark:border-slate-600 flex flex-col items-stretch">
|
||||||
<img src={imageUri} className="aspect-[1.91/1] object-cover" />
|
<img src={imageUri} className="aspect-[1200/630] object-cover" />
|
||||||
<div className="py-3 px-4">
|
<div className="py-3 px-4">
|
||||||
<div className="flex space-x-2 items-center">
|
<div className="flex space-x-2 items-center">
|
||||||
<img src={starterPackIcon} className="w-10 h-10" />
|
<img src={starterPackIcon} className="w-10 h-10" />
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import {
|
|||||||
} from '@atproto/api'
|
} from '@atproto/api'
|
||||||
import {h} from 'preact'
|
import {h} from 'preact'
|
||||||
|
|
||||||
import replyIcon from '../../assets/bubble_filled_stroke2_corner2_rounded.svg'
|
import logo from '../../assets/logo_full_name.svg'
|
||||||
import likeIcon from '../../assets/heart2_filled_stroke2_corner0_rounded.svg'
|
import {Like as LikeIcon} from '../icons/Like'
|
||||||
import logo from '../../assets/logo.svg'
|
import {Reply as ReplyIcon} from '../icons/Reply'
|
||||||
import repostIcon from '../../assets/repost_stroke2_corner2_rounded.svg'
|
import {Repost as RepostIcon} from '../icons/Repost'
|
||||||
import {CONTENT_LABELS} from '../labels'
|
import {CONTENT_LABELS} from '../labels'
|
||||||
import * as bsky from '../types/bsky'
|
import * as bsky from '../types/bsky'
|
||||||
import {niceDate} from '../util/nice-date'
|
import {niceDate} from '../util/nice-date'
|
||||||
@@ -45,10 +45,13 @@ export function Post({thread}: Props) {
|
|||||||
const verification = getVerificationState({profile: post.author})
|
const verification = getVerificationState({profile: post.author})
|
||||||
|
|
||||||
const href = `/profile/${post.author.did}/post/${getRkey(post)}`
|
const href = `/profile/${post.author.did}/post/${getRkey(post)}`
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container href={href}>
|
<Container href={href}>
|
||||||
<div className="flex-1 flex-col flex gap-2" lang={record?.langs?.[0]}>
|
<div
|
||||||
<div className="flex gap-2.5 items-center cursor-pointer w-full max-w-full">
|
className="flex-1 flex-col flex gap-2 bg-neutral-50 dark:bg-black dark:hover:bg-slate-900 hover:bg-blue-50 rounded-[14px] p-4"
|
||||||
|
lang={record?.langs?.[0]}>
|
||||||
|
<div className="flex gap-2.5 items-center cursor-pointer w-full max-w-full ">
|
||||||
<Link
|
<Link
|
||||||
href={`/profile/${post.author.did}`}
|
href={`/profile/${post.author.did}`}
|
||||||
className="rounded-full shrink-0">
|
className="rounded-full shrink-0">
|
||||||
@@ -80,57 +83,66 @@ export function Post({thread}: Props) {
|
|||||||
@{post.author.handle}
|
@{post.author.handle}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<Link
|
|
||||||
href={href}
|
|
||||||
className="transition-transform hover:scale-110 shrink-0 self-start">
|
|
||||||
<img src={logo} className="h-8" />
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
<PostContent record={record} />
|
<PostContent record={record} />
|
||||||
<Embed content={post.embed} labels={post.labels} />
|
<Embed content={post.embed} labels={post.labels} />
|
||||||
<Link href={href}>
|
|
||||||
<time
|
<div className="flex items-center justify-between w-full pt-2.5 text-sm">
|
||||||
datetime={new Date(post.indexedAt).toISOString()}
|
<div className="flex items-center gap-3 text-sm cursor-pointer">
|
||||||
className="text-textLight dark:text-textDimmed mt-1 text-sm hover:underline">
|
|
||||||
{niceDate(post.indexedAt)}
|
|
||||||
</time>
|
|
||||||
</Link>
|
|
||||||
<div className="border-t dark:border-slate-600 w-full pt-2.5 flex items-center gap-5 text-sm cursor-pointer">
|
|
||||||
{!!post.likeCount && (
|
{!!post.likeCount && (
|
||||||
<div className="flex items-center gap-2 cursor-pointer">
|
<div className="flex items-center gap-1 cursor-pointer group">
|
||||||
<img src={likeIcon} className="w-5 h-5" />
|
<LikeIcon
|
||||||
<p className="font-bold text-neutral-500 dark:text-neutral-300 mb-px">
|
width={20}
|
||||||
|
height={20}
|
||||||
|
className="text-slate-600 dark:text-slate-400 group-hover:text-neutral-800 dark:group-hover:text-white transition-colors"
|
||||||
|
/>
|
||||||
|
<p className="font-medium text-slate-600 text-neutral-600 dark:text-neutral-300 mb-px group-hover:text-neutral-800 dark:group-hover:text-white transition-colors dark:text-slate-400">
|
||||||
{prettyNumber(post.likeCount)}
|
{prettyNumber(post.likeCount)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{!!post.replyCount && (
|
||||||
|
<div className="flex items-center gap-1 cursor-pointer group">
|
||||||
|
<ReplyIcon
|
||||||
|
width={20}
|
||||||
|
height={20}
|
||||||
|
className="text-slate-600 dark:text-slate-400 group-hover:text-neutral-800 dark:group-hover:text-white transition-colors"
|
||||||
|
/>
|
||||||
|
<p className="font-medium text-slate-600 text-neutral-600 dark:text-neutral-300 mb-px group-hover:text-neutral-800 dark:group-hover:text-white transition-colors dark:text-slate-400">
|
||||||
|
{prettyNumber(post.replyCount)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{!!post.repostCount && (
|
{!!post.repostCount && (
|
||||||
<div className="flex items-center gap-2 cursor-pointer">
|
<div className="flex items-center gap-1 cursor-pointer group">
|
||||||
<img src={repostIcon} className="w-5 h-5" />
|
<RepostIcon
|
||||||
<p className="font-bold text-neutral-500 dark:text-neutral-300 mb-px">
|
width={20}
|
||||||
|
height={20}
|
||||||
|
className="text-slate-600 dark:text-slate-400 group-hover:text-neutral-800 dark:group-hover:text-white transition-colors"
|
||||||
|
/>
|
||||||
|
<p className="font-medium text-slate-600 dark:text-slate-400 mb-px group-hover:text-neutral-800 dark:group-hover:text-white transition-colors">
|
||||||
{prettyNumber(post.repostCount)}
|
{prettyNumber(post.repostCount)}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="flex items-center gap-2 cursor-pointer">
|
|
||||||
<img src={replyIcon} className="w-5 h-5" />
|
|
||||||
<p className="font-bold text-neutral-500 dark:text-neutral-300 mb-px">
|
|
||||||
Reply
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-1" />
|
<Link href={href}>
|
||||||
<p className="cursor-pointer text-brand dark:text-brandLighten font-bold hover:underline hidden min-[450px]:inline">
|
<time
|
||||||
{post.replyCount
|
datetime={new Date(post.indexedAt).toISOString()}
|
||||||
? `Read ${prettyNumber(post.replyCount)} ${
|
className="text-slate-500 dark:text-textDimmed text-sm hover:underline dark:text-slate-500">
|
||||||
post.replyCount > 1 ? 'replies' : 'reply'
|
{niceDate(post.indexedAt)}
|
||||||
} on Bluesky`
|
</time>
|
||||||
: `View on Bluesky`}
|
</Link>
|
||||||
</p>
|
|
||||||
<p className="cursor-pointer text-brand font-bold hover:underline min-[450px]:hidden">
|
|
||||||
<span className="hidden min-[380px]:inline">View on </span>Bluesky
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center justify-end pt-2">
|
||||||
|
<Link
|
||||||
|
href={href}
|
||||||
|
className="transition-transform hover:scale-110 shrink-0">
|
||||||
|
<img src={logo} className="h-8" />
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import {h} from 'preact'
|
||||||
|
|
||||||
|
export const Like = ({
|
||||||
|
width = 16,
|
||||||
|
height = 17,
|
||||||
|
fill = 'currentColor',
|
||||||
|
className,
|
||||||
|
}: {
|
||||||
|
width?: number
|
||||||
|
height?: number
|
||||||
|
fill?: string
|
||||||
|
className?: string
|
||||||
|
}) => (
|
||||||
|
<svg
|
||||||
|
className={className}
|
||||||
|
width={width}
|
||||||
|
height={height}
|
||||||
|
viewBox="0 0 16 17"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
fillRule="evenodd"
|
||||||
|
clipRule="evenodd"
|
||||||
|
d="M11.1561 3.62664C10.3307 3.44261 9.35086 3.65762 8.47486 4.54615C8.34958 4.67323 8.17857 4.74478 8.00012 4.74478C7.82167 4.74478 7.65066 4.67324 7.52538 4.54616C6.64938 3.65762 5.66955 3.44261 4.84416 3.62664C4.0022 3.81438 3.25812 4.43047 2.89709 5.33069C2.21997 7.01907 2.83524 10.1257 8.00015 13.1315C13.165 10.1257 13.7803 7.01906 13.1032 5.33069C12.7421 4.43047 11.998 3.81437 11.1561 3.62664ZM14.3407 4.83438C15.4101 7.50098 14.0114 11.2942 8.32611 14.4808C8.12362 14.5943 7.87668 14.5943 7.6742 14.4808C1.98891 11.2942 0.590133 7.501 1.65956 4.83439C2.1788 3.53968 3.26862 2.61187 4.55399 2.32527C5.68567 2.07294 6.92237 2.32723 8.00012 3.18278C9.07786 2.32723 10.3146 2.07294 11.4462 2.32526C12.7316 2.61186 13.8214 3.53967 14.3407 4.83438Z"
|
||||||
|
fill={fill}
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import {h} from 'preact'
|
||||||
|
|
||||||
|
export const Reply = ({
|
||||||
|
width = 16,
|
||||||
|
height = 17,
|
||||||
|
fill = 'currentColor',
|
||||||
|
className,
|
||||||
|
}: {
|
||||||
|
width?: number
|
||||||
|
height?: number
|
||||||
|
fill?: string
|
||||||
|
className?: string
|
||||||
|
}) => (
|
||||||
|
<svg
|
||||||
|
className={className}
|
||||||
|
width={width}
|
||||||
|
height={height}
|
||||||
|
viewBox="0 0 16 17"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
fillRule="evenodd"
|
||||||
|
clipRule="evenodd"
|
||||||
|
d="M1.3335 4.23242C1.3335 3.12785 2.22893 2.23242 3.3335 2.23242H12.6668C13.7714 2.23242 14.6668 3.12785 14.6668 4.23242V10.8991C14.6668 12.0037 13.7714 12.8991 12.6668 12.8991H8.18482L5.00983 14.8041C4.80387 14.9277 4.54737 14.9309 4.33836 14.8126C4.12936 14.6942 4.00016 14.4726 4.00016 14.2324V12.8991H3.3335C2.22893 12.8991 1.3335 12.0037 1.3335 10.8991V4.23242ZM3.3335 3.56576C2.96531 3.56576 2.66683 3.86423 2.66683 4.23242V10.8991C2.66683 11.2673 2.96531 11.5658 3.3335 11.5658H4.66683C5.03502 11.5658 5.3335 11.8642 5.3335 12.2324V13.055L7.65717 11.6608C7.76078 11.5986 7.87933 11.5658 8.00016 11.5658H12.6668C13.035 11.5658 13.3335 11.2673 13.3335 10.8991V4.23242C13.3335 3.86423 13.035 3.56576 12.6668 3.56576H3.3335Z"
|
||||||
|
fill={fill}
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import {h} from 'preact'
|
||||||
|
|
||||||
|
export const Repost = ({
|
||||||
|
width = 16,
|
||||||
|
height = 17,
|
||||||
|
fill = 'currentColor',
|
||||||
|
className,
|
||||||
|
}: {
|
||||||
|
width?: number
|
||||||
|
height?: number
|
||||||
|
fill?: string
|
||||||
|
className?: string
|
||||||
|
}) => (
|
||||||
|
<svg
|
||||||
|
className={className}
|
||||||
|
width={width}
|
||||||
|
height={height}
|
||||||
|
viewBox="0 0 16 17"
|
||||||
|
fill="none"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path
|
||||||
|
d="M3.86204 9.76164C4.12239 9.50134 4.54442 9.50131 4.80475 9.76164C5.06503 10.022 5.06503 10.444 4.80475 10.7044L3.94277 11.5663H11.3334C12.0697 11.5663 12.6667 10.9693 12.6667 10.233V8.89966C12.6667 8.53147 12.9652 8.233 13.3334 8.233C13.7015 8.23305 14.0001 8.53151 14.0001 8.89966V10.233C14.0001 11.7057 12.8061 12.8996 11.3334 12.8997H3.94277L4.80475 13.7616C5.06503 14.022 5.06503 14.444 4.80475 14.7044C4.54442 14.9647 4.12239 14.9646 3.86204 14.7044L2.3334 13.1757C1.8127 12.655 1.8127 11.811 2.3334 11.2903L3.86204 9.76164ZM2.00006 7.56633V6.233C2.00006 4.76024 3.19397 3.56633 4.66673 3.56633H12.0574L11.1954 2.70435C10.935 2.444 10.935 2.02199 11.1954 1.76164C11.4557 1.50134 11.8778 1.50131 12.1381 1.76164L13.6667 3.29029C14.1873 3.81096 14.1873 4.65503 13.6667 5.17571L12.1381 6.70435C11.8778 6.96468 11.4557 6.96465 11.1954 6.70435C10.935 6.444 10.935 6.02199 11.1954 5.76164L12.0574 4.89966H4.66673C3.93035 4.89966 3.3334 5.49662 3.3334 6.233V7.56633C3.3334 7.93449 3.03487 8.23294 2.66673 8.233C2.29854 8.233 2.00006 7.93452 2.00006 7.56633Z"
|
||||||
|
fill={fill}
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
)
|
||||||
@@ -15,7 +15,7 @@ import {redirectLogger} from '../logger.js'
|
|||||||
|
|
||||||
const SAFELINK_MIN_FETCH_INTERVAL = 1_000
|
const SAFELINK_MIN_FETCH_INTERVAL = 1_000
|
||||||
const SAFELINK_MAX_FETCH_INTERVAL = 10_000
|
const SAFELINK_MAX_FETCH_INTERVAL = 10_000
|
||||||
const SCHEME_REGEX = /^[a-zA-Z][a-zA-Z0-9+.-]*:/
|
const SCHEME_REGEX = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//
|
||||||
|
|
||||||
export class SafelinkClient {
|
export class SafelinkClient {
|
||||||
private domainCache: LRUCache<string, SafelinkRule | 'ok'>
|
private domainCache: LRUCache<string, SafelinkRule | 'ok'>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ After you do `yarn ios` and `yarn android` once, you can later just run `yarn we
|
|||||||
|
|
||||||
- Start in various console tabs:
|
- Start in various console tabs:
|
||||||
- `yarn e2e:mock-server`
|
- `yarn e2e:mock-server`
|
||||||
- `yarn e2e:metro`
|
- `yarn e2e:start`
|
||||||
- Run once: `yarn e2e:build`
|
- Run once: `yarn e2e:build`
|
||||||
- Each test run: `yarn e2e:run`
|
- Each test run: `yarn e2e:run`
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ values.
|
|||||||
### Running Maestro tests
|
### Running Maestro tests
|
||||||
|
|
||||||
- In one tab, run `yarn e2e:mock-server`
|
- In one tab, run `yarn e2e:mock-server`
|
||||||
- In a second tab, run `yarn e2e:metro`
|
- In a second tab, run `yarn e2e:build`
|
||||||
- In a third tab, run `yarn e2e:run`
|
- In a third tab, run `yarn e2e:run`
|
||||||
|
|
||||||
## Using Flashlight for Performance Testing
|
## Using Flashlight for Performance Testing
|
||||||
|
|||||||
@@ -36,7 +36,8 @@
|
|||||||
"extends": "base",
|
"extends": "base",
|
||||||
"ios": {
|
"ios": {
|
||||||
"resourceClass": "large",
|
"resourceClass": "large",
|
||||||
"autoIncrement": true
|
"autoIncrement": true,
|
||||||
|
"buildArtifactPaths": ["ios/build/*"]
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"autoIncrement": true
|
"autoIncrement": true
|
||||||
@@ -50,7 +51,8 @@
|
|||||||
"extends": "base",
|
"extends": "base",
|
||||||
"distribution": "internal",
|
"distribution": "internal",
|
||||||
"ios": {
|
"ios": {
|
||||||
"autoIncrement": false
|
"autoIncrement": false,
|
||||||
|
"buildArtifactPaths": ["ios/build/*"]
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"autoIncrement": false
|
"autoIncrement": false
|
||||||
@@ -63,7 +65,8 @@
|
|||||||
"testflight": {
|
"testflight": {
|
||||||
"extends": "base",
|
"extends": "base",
|
||||||
"ios": {
|
"ios": {
|
||||||
"autoIncrement": true
|
"autoIncrement": true,
|
||||||
|
"buildArtifactPaths": ["ios/build/*"]
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"autoIncrement": true
|
"autoIncrement": true
|
||||||
@@ -77,7 +80,8 @@
|
|||||||
"extends": "base",
|
"extends": "base",
|
||||||
"distribution": "internal",
|
"distribution": "internal",
|
||||||
"ios": {
|
"ios": {
|
||||||
"autoIncrement": true
|
"autoIncrement": true,
|
||||||
|
"buildArtifactPaths": ["ios/build/*"]
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"autoIncrement": true
|
"autoIncrement": true
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bsky.app",
|
"name": "bsky.app",
|
||||||
"version": "1.109.0",
|
"version": "1.110.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
@@ -46,8 +46,9 @@
|
|||||||
"lint-native:fix": "swiftlint --fix ./modules && ktlint --format ./modules",
|
"lint-native:fix": "swiftlint --fix ./modules && ktlint --format ./modules",
|
||||||
"typecheck": "tsc --project ./tsconfig.check.json",
|
"typecheck": "tsc --project ./tsconfig.check.json",
|
||||||
"e2e:mock-server": "NODE_ENV=development ./jest/dev-infra/with-test-redis-and-db.sh ts-node --project tsconfig.e2e.json __e2e__/mock-server.ts",
|
"e2e:mock-server": "NODE_ENV=development ./jest/dev-infra/with-test-redis-and-db.sh ts-node --project tsconfig.e2e.json __e2e__/mock-server.ts",
|
||||||
"e2e:metro": "EXPO_PUBLIC_ENV=e2e NODE_ENV=test RN_SRC_EXT=e2e.ts,e2e.tsx expo run:ios",
|
"e2e:build": "EXPO_PUBLIC_ENV=e2e NODE_ENV=test RN_SRC_EXT=e2e.ts,e2e.tsx expo run:ios",
|
||||||
"e2e:metro-android": "EXPO_PUBLIC_ENV=e2e NODE_ENV=test RN_SRC_EXT=e2e.ts,e2e.tsx expo run:android",
|
"e2e:build-android": "EXPO_PUBLIC_ENV=e2e NODE_ENV=test RN_SRC_EXT=e2e.ts,e2e.tsx expo run:android",
|
||||||
|
"e2e:start": "EXPO_PUBLIC_ENV=e2e NODE_ENV=test RN_SRC_EXT=e2e.ts,e2e.tsx expo start",
|
||||||
"e2e:run": "maestro test __e2e__",
|
"e2e:run": "maestro test __e2e__",
|
||||||
"perf:test": "NODE_ENV=test maestro test",
|
"perf:test": "NODE_ENV=test maestro test",
|
||||||
"perf:test:run": "NODE_ENV=test maestro test __e2e__/perf-test.yml",
|
"perf:test:run": "NODE_ENV=test maestro test __e2e__/perf-test.yml",
|
||||||
@@ -71,10 +72,11 @@
|
|||||||
"icons:optimize": "svgo -f ./assets/icons"
|
"icons:optimize": "svgo -f ./assets/icons"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@atproto/api": "^0.17.0",
|
"@atproto/api": "^0.17.6",
|
||||||
"@bitdrift/react-native": "^0.6.8",
|
"@bitdrift/react-native": "^0.6.8",
|
||||||
"@braintree/sanitize-url": "^6.0.2",
|
"@braintree/sanitize-url": "^6.0.2",
|
||||||
"@bsky.app/alf": "^0.1.2",
|
"@bsky.app/alf": "^0.1.5",
|
||||||
|
"@bsky.app/react-native-mmkv": "2.12.5",
|
||||||
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
|
"@discord/bottom-sheet": "bluesky-social/react-native-bottom-sheet",
|
||||||
"@emoji-mart/react": "^1.1.1",
|
"@emoji-mart/react": "^1.1.1",
|
||||||
"@expo/html-elements": "^0.12.5",
|
"@expo/html-elements": "^0.12.5",
|
||||||
@@ -129,36 +131,37 @@
|
|||||||
"emoji-mart": "^5.5.2",
|
"emoji-mart": "^5.5.2",
|
||||||
"emoji-regex": "^10.4.0",
|
"emoji-regex": "^10.4.0",
|
||||||
"eventemitter3": "^5.0.1",
|
"eventemitter3": "^5.0.1",
|
||||||
"expo": "^54.0.9",
|
"expo": "^54.0.22",
|
||||||
"expo-application": "~7.0.7",
|
"expo-application": "~7.0.7",
|
||||||
"expo-blur": "~15.0.7",
|
"expo-blur": "~15.0.7",
|
||||||
"expo-build-properties": "~1.0.9",
|
"expo-build-properties": "~1.0.9",
|
||||||
"expo-camera": "~17.0.8",
|
"expo-camera": "~17.0.9",
|
||||||
"expo-clipboard": "~8.0.7",
|
"expo-clipboard": "~8.0.7",
|
||||||
"expo-dev-client": "~6.0.12",
|
"expo-dev-client": "~6.0.16",
|
||||||
"expo-device": "~8.0.8",
|
"expo-device": "~8.0.9",
|
||||||
"expo-file-system": "~19.0.14",
|
"expo-file-system": "~19.0.17",
|
||||||
"expo-font": "~14.0.8",
|
"expo-font": "~14.0.9",
|
||||||
"expo-haptics": "~15.0.7",
|
"expo-haptics": "~15.0.7",
|
||||||
"expo-image": "~3.0.8",
|
"expo-image": "~3.0.10",
|
||||||
"expo-image-crop-tool": "^0.1.8",
|
"expo-image-crop-tool": "^0.1.8",
|
||||||
"expo-image-manipulator": "~14.0.7",
|
"expo-image-manipulator": "~14.0.7",
|
||||||
"expo-image-picker": "~17.0.8",
|
"expo-image-picker": "~17.0.8",
|
||||||
"expo-intent-launcher": "~13.0.7",
|
"expo-intent-launcher": "~13.0.7",
|
||||||
|
"expo-keep-awake": "^15.0.7",
|
||||||
"expo-linear-gradient": "~15.0.7",
|
"expo-linear-gradient": "~15.0.7",
|
||||||
"expo-linking": "~8.0.8",
|
"expo-linking": "~8.0.8",
|
||||||
"expo-localization": "~17.0.7",
|
"expo-localization": "~17.0.7",
|
||||||
"expo-location": "~19.0.7",
|
"expo-location": "~19.0.7",
|
||||||
"expo-media-library": "~18.2.0",
|
"expo-media-library": "~18.2.0",
|
||||||
"expo-notifications": "~0.32.11",
|
"expo-notifications": "~0.32.12",
|
||||||
"expo-screen-orientation": "~9.0.7",
|
"expo-screen-orientation": "~9.0.7",
|
||||||
"expo-sharing": "~14.0.7",
|
"expo-sharing": "~14.0.7",
|
||||||
"expo-splash-screen": "~31.0.10",
|
"expo-splash-screen": "~31.0.10",
|
||||||
"expo-system-ui": "~6.0.7",
|
"expo-system-ui": "~6.0.8",
|
||||||
"expo-task-manager": "~14.0.7",
|
"expo-task-manager": "~14.0.8",
|
||||||
"expo-updates": "~29.0.11",
|
"expo-updates": "~29.0.12",
|
||||||
"expo-video": "~3.0.11",
|
"expo-video": "~3.0.13",
|
||||||
"expo-web-browser": "~15.0.7",
|
"expo-web-browser": "~15.0.9",
|
||||||
"fast-text-encoding": "^1.0.6",
|
"fast-text-encoding": "^1.0.6",
|
||||||
"history": "^5.3.0",
|
"history": "^5.3.0",
|
||||||
"hls.js": "^1.6.2",
|
"hls.js": "^1.6.2",
|
||||||
@@ -183,7 +186,7 @@
|
|||||||
"react-image-crop": "^11.0.7",
|
"react-image-crop": "^11.0.7",
|
||||||
"react-is": "19",
|
"react-is": "19",
|
||||||
"react-keyed-flatten-children": "^5.0.0",
|
"react-keyed-flatten-children": "^5.0.0",
|
||||||
"react-native": "0.81.4",
|
"react-native": "0.81.5",
|
||||||
"react-native-compressor": "^1.13.0",
|
"react-native-compressor": "^1.13.0",
|
||||||
"react-native-date-picker": "^5.0.13",
|
"react-native-date-picker": "^5.0.13",
|
||||||
"react-native-device-attest": "^0.1.6",
|
"react-native-device-attest": "^0.1.6",
|
||||||
@@ -192,7 +195,6 @@
|
|||||||
"react-native-gesture-handler": "~2.28.0",
|
"react-native-gesture-handler": "~2.28.0",
|
||||||
"react-native-get-random-values": "~1.11.0",
|
"react-native-get-random-values": "~1.11.0",
|
||||||
"react-native-keyboard-controller": "1.18.5",
|
"react-native-keyboard-controller": "1.18.5",
|
||||||
"@bsky.app/react-native-mmkv": "2.12.5",
|
|
||||||
"react-native-pager-view": "6.8.0",
|
"react-native-pager-view": "6.8.0",
|
||||||
"react-native-progress": "bluesky-social/react-native-progress",
|
"react-native-progress": "bluesky-social/react-native-progress",
|
||||||
"react-native-qrcode-styled": "^0.3.3",
|
"react-native-qrcode-styled": "^0.3.3",
|
||||||
@@ -219,7 +221,7 @@
|
|||||||
"zod": "^3.20.2"
|
"zod": "^3.20.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@atproto/dev-env": "^0.3.172",
|
"@atproto/dev-env": "^0.3.181",
|
||||||
"@babel/core": "^7.26.0",
|
"@babel/core": "^7.26.0",
|
||||||
"@babel/preset-env": "^7.26.0",
|
"@babel/preset-env": "^7.26.0",
|
||||||
"@babel/runtime": "^7.26.0",
|
"@babel/runtime": "^7.26.0",
|
||||||
@@ -227,13 +229,13 @@
|
|||||||
"@lingui/cli": "^4.14.1",
|
"@lingui/cli": "^4.14.1",
|
||||||
"@lingui/macro": "^4.14.1",
|
"@lingui/macro": "^4.14.1",
|
||||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
||||||
"@react-native/babel-preset": "0.81.4",
|
"@react-native/babel-preset": "0.81.5",
|
||||||
"@react-native/eslint-config": "^0.81.4",
|
"@react-native/eslint-config": "^0.81.5",
|
||||||
"@react-native/typescript-config": "^0.81.4",
|
"@react-native/typescript-config": "^0.81.5",
|
||||||
"@sentry/webpack-plugin": "^3.2.2",
|
"@sentry/webpack-plugin": "^3.2.2",
|
||||||
"@testing-library/jest-native": "^5.4.3",
|
"@testing-library/jest-native": "^5.4.3",
|
||||||
"@testing-library/react-native": "^13.2.0",
|
"@testing-library/react-native": "^13.2.0",
|
||||||
"@types/jest": "^29.4.0",
|
"@types/jest": "29.5.14",
|
||||||
"@types/lodash.chunk": "^4.2.7",
|
"@types/lodash.chunk": "^4.2.7",
|
||||||
"@types/lodash.debounce": "^4.0.7",
|
"@types/lodash.debounce": "^4.0.7",
|
||||||
"@types/lodash.isequal": "^4.5.6",
|
"@types/lodash.isequal": "^4.5.6",
|
||||||
@@ -261,7 +263,7 @@
|
|||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"is-ci": "^3.0.1",
|
"is-ci": "^3.0.1",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-expo": "~54.0.12",
|
"jest-expo": "~54.0.13",
|
||||||
"jest-junit": "^16.0.0",
|
"jest-junit": "^16.0.0",
|
||||||
"lint-staged": "^13.2.3",
|
"lint-staged": "^13.2.3",
|
||||||
"lockfile-lint": "^4.14.0",
|
"lockfile-lint": "^4.14.0",
|
||||||
@@ -271,12 +273,13 @@
|
|||||||
"react-refresh": "^0.14.0",
|
"react-refresh": "^0.14.0",
|
||||||
"svgo": "^3.3.2",
|
"svgo": "^3.3.2",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
|
"ts-plugin-sort-import-suggestions": "^1.0.4",
|
||||||
"typescript": "^5.9.2",
|
"typescript": "^5.9.2",
|
||||||
"webpack-bundle-analyzer": "^4.10.1"
|
"webpack-bundle-analyzer": "^4.10.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@react-native/babel-preset": "0.81.4",
|
"@react-native/babel-preset": "0.81.5",
|
||||||
"@react-native/normalize-colors": "0.81.4",
|
"@react-native/normalize-colors": "0.81.5",
|
||||||
"**/@expo/image-utils": "0.8.7",
|
"**/@expo/image-utils": "0.8.7",
|
||||||
"**/expo-constants": "18.0.8",
|
"**/expo-constants": "18.0.8",
|
||||||
"**/expo-device": "7.1.4",
|
"**/expo-device": "7.1.4",
|
||||||
|
|||||||
@@ -0,0 +1,389 @@
|
|||||||
|
diff --git a/node_modules/react-native-reanimated/lib/module/component/PerformanceMonitor.js b/node_modules/react-native-reanimated/lib/module/component/PerformanceMonitor.js
|
||||||
|
index 9c98d6c..70ada9f 100644
|
||||||
|
--- a/node_modules/react-native-reanimated/lib/module/component/PerformanceMonitor.js
|
||||||
|
+++ b/node_modules/react-native-reanimated/lib/module/component/PerformanceMonitor.js
|
||||||
|
@@ -1,125 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
-import React, { useEffect, useRef } from 'react';
|
||||||
|
-import { StyleSheet, TextInput, View } from 'react-native';
|
||||||
|
-import { addWhitelistedNativeProps } from "../ConfigHelper.js";
|
||||||
|
-import { createAnimatedComponent } from "../createAnimatedComponent/index.js";
|
||||||
|
-import { useAnimatedProps, useFrameCallback, useSharedValue } from "../hook/index.js";
|
||||||
|
-function createCircularDoublesBuffer(size) {
|
||||||
|
- 'worklet';
|
||||||
|
-
|
||||||
|
- return {
|
||||||
|
- next: 0,
|
||||||
|
- buffer: new Float32Array(size),
|
||||||
|
- size,
|
||||||
|
- count: 0,
|
||||||
|
- push(value) {
|
||||||
|
- const oldValue = this.buffer[this.next];
|
||||||
|
- const oldCount = this.count;
|
||||||
|
- this.buffer[this.next] = value;
|
||||||
|
- this.next = (this.next + 1) % this.size;
|
||||||
|
- this.count = Math.min(this.size, this.count + 1);
|
||||||
|
- return oldCount === this.size ? oldValue : null;
|
||||||
|
- },
|
||||||
|
- front() {
|
||||||
|
- const notEmpty = this.count > 0;
|
||||||
|
- if (notEmpty) {
|
||||||
|
- const current = this.next - 1;
|
||||||
|
- const index = current < 0 ? this.size - 1 : current;
|
||||||
|
- return this.buffer[index];
|
||||||
|
- }
|
||||||
|
- return null;
|
||||||
|
- },
|
||||||
|
- back() {
|
||||||
|
- const notEmpty = this.count > 0;
|
||||||
|
- return notEmpty ? this.buffer[this.next] : null;
|
||||||
|
- }
|
||||||
|
- };
|
||||||
|
-}
|
||||||
|
-const DEFAULT_BUFFER_SIZE = 20;
|
||||||
|
-addWhitelistedNativeProps({
|
||||||
|
- text: true
|
||||||
|
-});
|
||||||
|
-const AnimatedTextInput = createAnimatedComponent(TextInput);
|
||||||
|
-function loopAnimationFrame(fn) {
|
||||||
|
- let lastTime = 0;
|
||||||
|
- function loop() {
|
||||||
|
- requestAnimationFrame(time => {
|
||||||
|
- if (lastTime > 0) {
|
||||||
|
- fn(lastTime, time);
|
||||||
|
- }
|
||||||
|
- lastTime = time;
|
||||||
|
- requestAnimationFrame(loop);
|
||||||
|
- });
|
||||||
|
- }
|
||||||
|
- loop();
|
||||||
|
-}
|
||||||
|
-function getFps(renderTimeInMs) {
|
||||||
|
- 'worklet';
|
||||||
|
-
|
||||||
|
- return 1000 / renderTimeInMs;
|
||||||
|
-}
|
||||||
|
-function completeBufferRoutine(buffer, timestamp) {
|
||||||
|
- 'worklet';
|
||||||
|
-
|
||||||
|
- timestamp = Math.round(timestamp);
|
||||||
|
- const droppedTimestamp = buffer.push(timestamp) ?? timestamp;
|
||||||
|
- const measuredRangeDuration = timestamp - droppedTimestamp;
|
||||||
|
- return getFps(measuredRangeDuration / buffer.count);
|
||||||
|
-}
|
||||||
|
-function JsPerformance({
|
||||||
|
- smoothingFrames
|
||||||
|
-}) {
|
||||||
|
- const jsFps = useSharedValue(null);
|
||||||
|
- const totalRenderTime = useSharedValue(0);
|
||||||
|
- const circularBuffer = useRef(createCircularDoublesBuffer(smoothingFrames));
|
||||||
|
- useEffect(() => {
|
||||||
|
- loopAnimationFrame((_, timestamp) => {
|
||||||
|
- timestamp = Math.round(timestamp);
|
||||||
|
- const currentFps = completeBufferRoutine(circularBuffer.current, timestamp);
|
||||||
|
-
|
||||||
|
- // JS fps have to be measured every 2nd frame,
|
||||||
|
- // thus 2x multiplication has to occur here
|
||||||
|
- jsFps.value = (currentFps * 2).toFixed(0);
|
||||||
|
- });
|
||||||
|
- }, [jsFps, totalRenderTime]);
|
||||||
|
- const animatedProps = useAnimatedProps(() => {
|
||||||
|
- const text = 'JS: ' + (jsFps.value ?? 'N/A') + ' ';
|
||||||
|
- return {
|
||||||
|
- text,
|
||||||
|
- defaultValue: text
|
||||||
|
- };
|
||||||
|
- });
|
||||||
|
- return <View style={styles.container}>
|
||||||
|
- <AnimatedTextInput style={styles.text} animatedProps={animatedProps} editable={false} />
|
||||||
|
- </View>;
|
||||||
|
-}
|
||||||
|
-function UiPerformance({
|
||||||
|
- smoothingFrames
|
||||||
|
-}) {
|
||||||
|
- const uiFps = useSharedValue(null);
|
||||||
|
- const circularBuffer = useSharedValue(null);
|
||||||
|
- useFrameCallback(({
|
||||||
|
- timestamp
|
||||||
|
- }) => {
|
||||||
|
- if (circularBuffer.value === null) {
|
||||||
|
- circularBuffer.value = createCircularDoublesBuffer(smoothingFrames);
|
||||||
|
- }
|
||||||
|
- timestamp = Math.round(timestamp);
|
||||||
|
- const currentFps = completeBufferRoutine(circularBuffer.value, timestamp);
|
||||||
|
- uiFps.value = currentFps.toFixed(0);
|
||||||
|
- });
|
||||||
|
- const animatedProps = useAnimatedProps(() => {
|
||||||
|
- const text = 'UI: ' + (uiFps.value ?? 'N/A') + ' ';
|
||||||
|
- return {
|
||||||
|
- text,
|
||||||
|
- defaultValue: text
|
||||||
|
- };
|
||||||
|
- });
|
||||||
|
- return <View style={styles.container}>
|
||||||
|
- <AnimatedTextInput style={styles.text} animatedProps={animatedProps} editable={false} />
|
||||||
|
- </View>;
|
||||||
|
-}
|
||||||
|
/**
|
||||||
|
* A component that lets you measure fps values on JS and UI threads on both the
|
||||||
|
* Paper and Fabric architectures.
|
||||||
|
@@ -127,38 +7,7 @@ function UiPerformance({
|
||||||
|
* @param smoothingFrames - Determines amount of saved frames which will be used
|
||||||
|
* for fps value smoothing.
|
||||||
|
*/
|
||||||
|
-export function PerformanceMonitor({
|
||||||
|
- smoothingFrames = DEFAULT_BUFFER_SIZE
|
||||||
|
-}) {
|
||||||
|
- return <View style={styles.monitor}>
|
||||||
|
- <JsPerformance smoothingFrames={smoothingFrames} />
|
||||||
|
- <UiPerformance smoothingFrames={smoothingFrames} />
|
||||||
|
- </View>;
|
||||||
|
+export function PerformanceMonitor() {
|
||||||
|
+ return null;
|
||||||
|
}
|
||||||
|
-const styles = StyleSheet.create({
|
||||||
|
- monitor: {
|
||||||
|
- flexDirection: 'row',
|
||||||
|
- position: 'absolute',
|
||||||
|
- backgroundColor: '#0006',
|
||||||
|
- zIndex: 1000
|
||||||
|
- },
|
||||||
|
- header: {
|
||||||
|
- fontSize: 14,
|
||||||
|
- color: '#ffff',
|
||||||
|
- paddingHorizontal: 5
|
||||||
|
- },
|
||||||
|
- text: {
|
||||||
|
- fontSize: 13,
|
||||||
|
- fontVariant: ['tabular-nums'],
|
||||||
|
- color: '#ffff',
|
||||||
|
- fontFamily: 'monospace',
|
||||||
|
- paddingHorizontal: 3
|
||||||
|
- },
|
||||||
|
- container: {
|
||||||
|
- alignItems: 'center',
|
||||||
|
- justifyContent: 'center',
|
||||||
|
- flexDirection: 'row',
|
||||||
|
- flexWrap: 'wrap'
|
||||||
|
- }
|
||||||
|
-});
|
||||||
|
//# sourceMappingURL=PerformanceMonitor.js.map
|
||||||
|
diff --git a/node_modules/react-native-reanimated/src/component/PerformanceMonitor.tsx b/node_modules/react-native-reanimated/src/component/PerformanceMonitor.tsx
|
||||||
|
index ff8fc8a..34dde79 100644
|
||||||
|
--- a/node_modules/react-native-reanimated/src/component/PerformanceMonitor.tsx
|
||||||
|
+++ b/node_modules/react-native-reanimated/src/component/PerformanceMonitor.tsx
|
||||||
|
@@ -1,170 +1,5 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
-import React, { useEffect, useRef } from 'react';
|
||||||
|
-import { StyleSheet, TextInput, View } from 'react-native';
|
||||||
|
-
|
||||||
|
-import { addWhitelistedNativeProps } from '../ConfigHelper';
|
||||||
|
-import { createAnimatedComponent } from '../createAnimatedComponent';
|
||||||
|
-import type { FrameInfo } from '../frameCallback';
|
||||||
|
-import { useAnimatedProps, useFrameCallback, useSharedValue } from '../hook';
|
||||||
|
-
|
||||||
|
-type CircularBuffer = ReturnType<typeof createCircularDoublesBuffer>;
|
||||||
|
-function createCircularDoublesBuffer(size: number) {
|
||||||
|
- 'worklet';
|
||||||
|
-
|
||||||
|
- return {
|
||||||
|
- next: 0 as number,
|
||||||
|
- buffer: new Float32Array(size),
|
||||||
|
- size,
|
||||||
|
- count: 0 as number,
|
||||||
|
-
|
||||||
|
- push(value: number): number | null {
|
||||||
|
- const oldValue = this.buffer[this.next];
|
||||||
|
- const oldCount = this.count;
|
||||||
|
- this.buffer[this.next] = value;
|
||||||
|
-
|
||||||
|
- this.next = (this.next + 1) % this.size;
|
||||||
|
- this.count = Math.min(this.size, this.count + 1);
|
||||||
|
- return oldCount === this.size ? oldValue : null;
|
||||||
|
- },
|
||||||
|
-
|
||||||
|
- front(): number | null {
|
||||||
|
- const notEmpty = this.count > 0;
|
||||||
|
- if (notEmpty) {
|
||||||
|
- const current = this.next - 1;
|
||||||
|
- const index = current < 0 ? this.size - 1 : current;
|
||||||
|
- return this.buffer[index];
|
||||||
|
- }
|
||||||
|
- return null;
|
||||||
|
- },
|
||||||
|
-
|
||||||
|
- back(): number | null {
|
||||||
|
- const notEmpty = this.count > 0;
|
||||||
|
- return notEmpty ? this.buffer[this.next] : null;
|
||||||
|
- },
|
||||||
|
- };
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-const DEFAULT_BUFFER_SIZE = 20;
|
||||||
|
-addWhitelistedNativeProps({ text: true });
|
||||||
|
-const AnimatedTextInput = createAnimatedComponent(TextInput);
|
||||||
|
-
|
||||||
|
-function loopAnimationFrame(fn: (lastTime: number, time: number) => void) {
|
||||||
|
- let lastTime = 0;
|
||||||
|
-
|
||||||
|
- function loop() {
|
||||||
|
- requestAnimationFrame((time) => {
|
||||||
|
- if (lastTime > 0) {
|
||||||
|
- fn(lastTime, time);
|
||||||
|
- }
|
||||||
|
- lastTime = time;
|
||||||
|
- requestAnimationFrame(loop);
|
||||||
|
- });
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- loop();
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-function getFps(renderTimeInMs: number): number {
|
||||||
|
- 'worklet';
|
||||||
|
- return 1000 / renderTimeInMs;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-function completeBufferRoutine(
|
||||||
|
- buffer: CircularBuffer,
|
||||||
|
- timestamp: number
|
||||||
|
-): number {
|
||||||
|
- 'worklet';
|
||||||
|
- timestamp = Math.round(timestamp);
|
||||||
|
-
|
||||||
|
- const droppedTimestamp = buffer.push(timestamp) ?? timestamp;
|
||||||
|
-
|
||||||
|
- const measuredRangeDuration = timestamp - droppedTimestamp;
|
||||||
|
-
|
||||||
|
- return getFps(measuredRangeDuration / buffer.count);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-function JsPerformance({ smoothingFrames }: { smoothingFrames: number }) {
|
||||||
|
- const jsFps = useSharedValue<string | null>(null);
|
||||||
|
- const totalRenderTime = useSharedValue(0);
|
||||||
|
- const circularBuffer = useRef<CircularBuffer>(
|
||||||
|
- createCircularDoublesBuffer(smoothingFrames)
|
||||||
|
- );
|
||||||
|
-
|
||||||
|
- useEffect(() => {
|
||||||
|
- loopAnimationFrame((_, timestamp) => {
|
||||||
|
- timestamp = Math.round(timestamp);
|
||||||
|
-
|
||||||
|
- const currentFps = completeBufferRoutine(
|
||||||
|
- circularBuffer.current,
|
||||||
|
- timestamp
|
||||||
|
- );
|
||||||
|
-
|
||||||
|
- // JS fps have to be measured every 2nd frame,
|
||||||
|
- // thus 2x multiplication has to occur here
|
||||||
|
- jsFps.value = (currentFps * 2).toFixed(0);
|
||||||
|
- });
|
||||||
|
- }, [jsFps, totalRenderTime]);
|
||||||
|
-
|
||||||
|
- const animatedProps = useAnimatedProps(() => {
|
||||||
|
- const text = 'JS: ' + (jsFps.value ?? 'N/A') + ' ';
|
||||||
|
- return { text, defaultValue: text };
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
- return (
|
||||||
|
- <View style={styles.container}>
|
||||||
|
- <AnimatedTextInput
|
||||||
|
- style={styles.text}
|
||||||
|
- animatedProps={animatedProps}
|
||||||
|
- editable={false}
|
||||||
|
- />
|
||||||
|
- </View>
|
||||||
|
- );
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-function UiPerformance({ smoothingFrames }: { smoothingFrames: number }) {
|
||||||
|
- const uiFps = useSharedValue<string | null>(null);
|
||||||
|
- const circularBuffer = useSharedValue<CircularBuffer | null>(null);
|
||||||
|
-
|
||||||
|
- useFrameCallback(({ timestamp }: FrameInfo) => {
|
||||||
|
- if (circularBuffer.value === null) {
|
||||||
|
- circularBuffer.value = createCircularDoublesBuffer(smoothingFrames);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- timestamp = Math.round(timestamp);
|
||||||
|
-
|
||||||
|
- const currentFps = completeBufferRoutine(circularBuffer.value, timestamp);
|
||||||
|
-
|
||||||
|
- uiFps.value = currentFps.toFixed(0);
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
- const animatedProps = useAnimatedProps(() => {
|
||||||
|
- const text = 'UI: ' + (uiFps.value ?? 'N/A') + ' ';
|
||||||
|
- return { text, defaultValue: text };
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
- return (
|
||||||
|
- <View style={styles.container}>
|
||||||
|
- <AnimatedTextInput
|
||||||
|
- style={styles.text}
|
||||||
|
- animatedProps={animatedProps}
|
||||||
|
- editable={false}
|
||||||
|
- />
|
||||||
|
- </View>
|
||||||
|
- );
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-export type PerformanceMonitorProps = {
|
||||||
|
- /**
|
||||||
|
- * Sets amount of previous frames used for smoothing at highest expectedFps.
|
||||||
|
- *
|
||||||
|
- * Automatically scales down at lower frame rates.
|
||||||
|
- *
|
||||||
|
- * Affects jumpiness of the FPS measurements value.
|
||||||
|
- */
|
||||||
|
- smoothingFrames?: number;
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* A component that lets you measure fps values on JS and UI threads on both the
|
||||||
|
* Paper and Fabric architectures.
|
||||||
|
@@ -172,40 +7,6 @@ export type PerformanceMonitorProps = {
|
||||||
|
* @param smoothingFrames - Determines amount of saved frames which will be used
|
||||||
|
* for fps value smoothing.
|
||||||
|
*/
|
||||||
|
-export function PerformanceMonitor({
|
||||||
|
- smoothingFrames = DEFAULT_BUFFER_SIZE,
|
||||||
|
-}: PerformanceMonitorProps) {
|
||||||
|
- return (
|
||||||
|
- <View style={styles.monitor}>
|
||||||
|
- <JsPerformance smoothingFrames={smoothingFrames} />
|
||||||
|
- <UiPerformance smoothingFrames={smoothingFrames} />
|
||||||
|
- </View>
|
||||||
|
- );
|
||||||
|
+export function PerformanceMonitor() {
|
||||||
|
+ return null;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
-const styles = StyleSheet.create({
|
||||||
|
- monitor: {
|
||||||
|
- flexDirection: 'row',
|
||||||
|
- position: 'absolute',
|
||||||
|
- backgroundColor: '#0006',
|
||||||
|
- zIndex: 1000,
|
||||||
|
- },
|
||||||
|
- header: {
|
||||||
|
- fontSize: 14,
|
||||||
|
- color: '#ffff',
|
||||||
|
- paddingHorizontal: 5,
|
||||||
|
- },
|
||||||
|
- text: {
|
||||||
|
- fontSize: 13,
|
||||||
|
- fontVariant: ['tabular-nums'],
|
||||||
|
- color: '#ffff',
|
||||||
|
- fontFamily: 'monospace',
|
||||||
|
- paddingHorizontal: 3,
|
||||||
|
- },
|
||||||
|
- container: {
|
||||||
|
- alignItems: 'center',
|
||||||
|
- justifyContent: 'center',
|
||||||
|
- flexDirection: 'row',
|
||||||
|
- flexWrap: 'wrap',
|
||||||
|
- },
|
||||||
|
-});
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
diff --git a/node_modules/react-native-uitextview/ios/RNUITextViewShadow.swift b/node_modules/react-native-uitextview/ios/RNUITextViewShadow.swift
|
||||||
|
index c34ba71..13d576a 100644
|
||||||
|
--- a/node_modules/react-native-uitextview/ios/RNUITextViewShadow.swift
|
||||||
|
+++ b/node_modules/react-native-uitextview/ios/RNUITextViewShadow.swift
|
||||||
|
@@ -159,13 +159,23 @@ class RNUITextViewShadow: RCTShadowView {
|
||||||
|
let maxSize = CGSize(width: CGFloat(maxWidth), height: CGFloat(MAXFLOAT))
|
||||||
|
let textSize = self.attributedText.boundingRect(with: maxSize, options: .usesLineFragmentOrigin, context: nil)
|
||||||
|
|
||||||
|
- var totalLines = self.lineHeight == 0.0 ? 0 : Int(ceil(textSize.height / self.lineHeight))
|
||||||
|
-
|
||||||
|
- if self.numberOfLines != 0, totalLines > self.numberOfLines {
|
||||||
|
- totalLines = self.numberOfLines
|
||||||
|
+ var finalHeight: CGFloat
|
||||||
|
+
|
||||||
|
+ if self.numberOfLines != 0 && self.lineHeight != 0.0 {
|
||||||
|
+ // numberOfLines is set with custom line height - need to calculate lines and snap to lineHeight multiples
|
||||||
|
+ // NOTE: this calculation can be inaccurate with fractional font sizes
|
||||||
|
+ var totalLines = Int(ceil(textSize.height / self.lineHeight))
|
||||||
|
+ if totalLines > self.numberOfLines {
|
||||||
|
+ totalLines = self.numberOfLines
|
||||||
|
+ }
|
||||||
|
+ finalHeight = CGFloat(totalLines) * self.lineHeight
|
||||||
|
+ } else {
|
||||||
|
+ // Either no numberOfLines limit, or no custom lineHeight - use actual text height
|
||||||
|
+ // (numberOfLines without custom lineHeight is handled by the UITextView's textContainer.maximumNumberOfLines)
|
||||||
|
+ finalHeight = textSize.height
|
||||||
|
}
|
||||||
|
|
||||||
|
- self.frameSize = CGSize(width: CGFloat(maxWidth), height: CGFloat(CGFloat(totalLines) * self.lineHeight))
|
||||||
|
+ self.frameSize = CGSize(width: CGFloat(maxWidth), height: finalHeight)
|
||||||
|
return YGSize(width: Float(self.frameSize.width), height: Float(self.frameSize.height))
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import {type StyleProp, type ViewStyle} from 'react-native'
|
import {type StyleProp, type ViewStyle} from 'react-native'
|
||||||
import {atoms as baseAtoms} from '@bsky.app/alf'
|
import {atoms as baseAtoms} from '@bsky.app/alf'
|
||||||
|
|
||||||
|
import {CARD_ASPECT_RATIO} from '#/lib/constants'
|
||||||
import {native, platform, web} from '#/alf/util/platform'
|
import {native, platform, web} from '#/alf/util/platform'
|
||||||
import * as Layout from '#/components/Layout'
|
import * as Layout from '#/components/Layout'
|
||||||
|
|
||||||
@@ -31,6 +32,16 @@ export const atoms = {
|
|||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Aspect ratios
|
||||||
|
*/
|
||||||
|
aspect_square: {
|
||||||
|
aspectRatio: 1,
|
||||||
|
},
|
||||||
|
aspect_card: {
|
||||||
|
aspectRatio: CARD_ASPECT_RATIO,
|
||||||
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Transition
|
* Transition
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +78,7 @@ export const atoms = {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Animaations
|
* Animations
|
||||||
*/
|
*/
|
||||||
fade_in: web({
|
fade_in: web({
|
||||||
animation: 'fadeIn ease-out 0.15s',
|
animation: 'fadeIn ease-out 0.15s',
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ function AccountItem({
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
{isCurrentAccount ? (
|
{isCurrentAccount ? (
|
||||||
<Check size="sm" style={[{color: t.palette.positive_600}]} />
|
<Check size="sm" style={[{color: t.palette.positive_500}]} />
|
||||||
) : (
|
) : (
|
||||||
<Chevron size="sm" style={[t.atoms.text]} />
|
<Chevron size="sm" style={[t.atoms.text]} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -7,13 +7,14 @@ import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon} from '#/components
|
|||||||
import {CircleX_Stroke2_Corner0_Rounded as CircleXIcon} from '#/components/icons/CircleX'
|
import {CircleX_Stroke2_Corner0_Rounded as CircleXIcon} from '#/components/icons/CircleX'
|
||||||
import {Warning_Stroke2_Corner0_Rounded as WarningIcon} from '#/components/icons/Warning'
|
import {Warning_Stroke2_Corner0_Rounded as WarningIcon} from '#/components/icons/Warning'
|
||||||
import {Text as BaseText, type TextProps} from '#/components/Typography'
|
import {Text as BaseText, type TextProps} from '#/components/Typography'
|
||||||
|
import {EmojiSad_Stroke2_Corner0_Rounded as EmojiSadIcon} from './icons/Emoji'
|
||||||
|
|
||||||
export const colors = {
|
export const colors = {
|
||||||
warning: '#FFC404',
|
warning: '#FFC404',
|
||||||
}
|
}
|
||||||
|
|
||||||
type Context = {
|
type Context = {
|
||||||
type: 'info' | 'tip' | 'warning' | 'error'
|
type: 'info' | 'tip' | 'warning' | 'error' | 'apology'
|
||||||
}
|
}
|
||||||
|
|
||||||
const Context = createContext<Context>({
|
const Context = createContext<Context>({
|
||||||
@@ -29,12 +30,14 @@ export function Icon() {
|
|||||||
tip: CircleInfoIcon,
|
tip: CircleInfoIcon,
|
||||||
warning: WarningIcon,
|
warning: WarningIcon,
|
||||||
error: CircleXIcon,
|
error: CircleXIcon,
|
||||||
|
apology: EmojiSadIcon,
|
||||||
}[type]
|
}[type]
|
||||||
const fill = {
|
const fill = {
|
||||||
info: t.atoms.text_contrast_medium.color,
|
info: t.atoms.text_contrast_medium.color,
|
||||||
tip: t.palette.primary_500,
|
tip: t.palette.primary_500,
|
||||||
warning: colors.warning,
|
warning: colors.warning,
|
||||||
error: t.palette.negative_500,
|
error: t.palette.negative_500,
|
||||||
|
apology: t.atoms.text_contrast_medium.color,
|
||||||
}[type]
|
}[type]
|
||||||
return <Icon fill={fill} size="md" />
|
return <Icon fill={fill} size="md" />
|
||||||
}
|
}
|
||||||
@@ -87,7 +90,7 @@ export function Row({
|
|||||||
style?: StyleProp<ViewStyle>
|
style?: StyleProp<ViewStyle>
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<View style={[a.flex_1, a.flex_row, a.align_start, a.gap_sm, style]}>
|
<View style={[a.w_full, a.flex_row, a.align_start, a.gap_sm, style]}>
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
@@ -109,6 +112,7 @@ export function Outer({
|
|||||||
tip: t.palette.primary_500,
|
tip: t.palette.primary_500,
|
||||||
warning: colors.warning,
|
warning: colors.warning,
|
||||||
error: t.palette.negative_500,
|
error: t.palette.negative_500,
|
||||||
|
apology: t.atoms.border_contrast_high.borderColor,
|
||||||
}[type]
|
}[type]
|
||||||
return (
|
return (
|
||||||
<Context.Provider value={{type}}>
|
<Context.Provider value={{type}}>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
Pressable,
|
Pressable,
|
||||||
type PressableProps,
|
type PressableProps,
|
||||||
type StyleProp,
|
type StyleProp,
|
||||||
StyleSheet,
|
|
||||||
type TargetedEvent,
|
type TargetedEvent,
|
||||||
type TextProps,
|
type TextProps,
|
||||||
type TextStyle,
|
type TextStyle,
|
||||||
@@ -512,8 +511,6 @@ export const Button = React.forwardRef<View, ButtonProps>(
|
|||||||
[state, variant, color, size, disabled],
|
[state, variant, color, size, disabled],
|
||||||
)
|
)
|
||||||
|
|
||||||
const flattenedBaseStyles = flatten([baseStyles, style])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PressableComponent
|
<PressableComponent
|
||||||
role="button"
|
role="button"
|
||||||
@@ -533,9 +530,10 @@ export const Button = React.forwardRef<View, ButtonProps>(
|
|||||||
a.align_center,
|
a.align_center,
|
||||||
a.justify_center,
|
a.justify_center,
|
||||||
a.curve_continuous,
|
a.curve_continuous,
|
||||||
flattenedBaseStyles,
|
baseStyles,
|
||||||
|
style,
|
||||||
...(state.hovered || state.pressed
|
...(state.hovered || state.pressed
|
||||||
? [hoverStyles, flatten(hoverStyleProp)]
|
? [hoverStyles, hoverStyleProp]
|
||||||
: []),
|
: []),
|
||||||
]}
|
]}
|
||||||
onPressIn={onPressIn}
|
onPressIn={onPressIn}
|
||||||
@@ -726,7 +724,7 @@ export function useSharedButtonTextStyles() {
|
|||||||
baseStyles.push(a.text_xs, a.leading_snug, a.font_semi_bold)
|
baseStyles.push(a.text_xs, a.leading_snug, a.font_semi_bold)
|
||||||
}
|
}
|
||||||
|
|
||||||
return StyleSheet.flatten(baseStyles)
|
return flatten(baseStyles)
|
||||||
}, [t, variant, color, size, disabled])
|
}, [t, variant, color, size, disabled])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
import {TouchableWithoutFeedback, View} from 'react-native'
|
||||||
|
import * as Clipboard from 'expo-clipboard'
|
||||||
|
|
||||||
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
|
import * as Prompt from '#/components/Prompt'
|
||||||
|
import * as Toast from '#/components/Toast'
|
||||||
|
import {Text} from '#/components/Typography'
|
||||||
|
import {useDevMode} from '#/storage/hooks/dev-mode'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Internal-use component to display debug information supplied by the appview.
|
||||||
|
* The `debug` field only exists on some API views, and is only visible for
|
||||||
|
* internal users in dev mode. As such, none of these strings need to be
|
||||||
|
* translated.
|
||||||
|
*
|
||||||
|
* This component can be removed at any time if we don't find it useful.
|
||||||
|
*/
|
||||||
|
export function DebugFieldDisplay<T extends {debug?: {[x: string]: unknown}}>({
|
||||||
|
subject,
|
||||||
|
}: {
|
||||||
|
subject: T
|
||||||
|
}) {
|
||||||
|
const t = useTheme()
|
||||||
|
const [devMode] = useDevMode()
|
||||||
|
const prompt = Prompt.usePromptControl()
|
||||||
|
|
||||||
|
if (!devMode) return
|
||||||
|
if (!subject.debug) return
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Prompt.Basic
|
||||||
|
control={prompt}
|
||||||
|
title="Debug"
|
||||||
|
description={JSON.stringify(subject.debug, null, 2)}
|
||||||
|
cancelButtonCta="Close"
|
||||||
|
confirmButtonCta="Copy"
|
||||||
|
onConfirm={() => {
|
||||||
|
Clipboard.setStringAsync(JSON.stringify(subject.debug, null, 2))
|
||||||
|
Toast.show('Copied to clipboard', {type: 'success'})
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<TouchableWithoutFeedback
|
||||||
|
accessibilityRole="button"
|
||||||
|
onPress={e => {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
prompt.open()
|
||||||
|
return false
|
||||||
|
}}>
|
||||||
|
<View style={[a.flex_row, a.align_center, a.gap_xs, a.pt_sm, a.pb_xs]}>
|
||||||
|
<View
|
||||||
|
style={[a.py_xs, a.px_sm, a.rounded_sm, t.atoms.bg_contrast_25]}>
|
||||||
|
<Text
|
||||||
|
style={[a.font_bold, a.text_xs, t.atoms.text_contrast_medium]}>
|
||||||
|
Debug
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
<Text
|
||||||
|
numberOfLines={1}
|
||||||
|
style={[
|
||||||
|
a.flex_1,
|
||||||
|
a.text_xs,
|
||||||
|
a.leading_tight,
|
||||||
|
{fontFamily: 'monospace'},
|
||||||
|
t.atoms.text_contrast_low,
|
||||||
|
]}>
|
||||||
|
{JSON.stringify(subject.debug)}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableWithoutFeedback>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ import {RemoveScrollBar} from 'react-remove-scroll-bar'
|
|||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
import {useA11y} from '#/state/a11y'
|
import {useA11y} from '#/state/a11y'
|
||||||
import {useDialogStateControlContext} from '#/state/dialogs'
|
import {useDialogStateControlContext} from '#/state/dialogs'
|
||||||
import {atoms as a, flatten, useBreakpoints, useTheme, web} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme, web} from '#/alf'
|
||||||
import {Button, ButtonIcon} from '#/components/Button'
|
import {Button, ButtonIcon} from '#/components/Button'
|
||||||
import {Context} from '#/components/Dialog/context'
|
import {Context} from '#/components/Dialog/context'
|
||||||
import {
|
import {
|
||||||
@@ -180,7 +180,7 @@ export function Inner({
|
|||||||
onClick={stopPropagation}
|
onClick={stopPropagation}
|
||||||
onStartShouldSetResponder={_ => true}
|
onStartShouldSetResponder={_ => true}
|
||||||
onTouchEnd={stopPropagation}
|
onTouchEnd={stopPropagation}
|
||||||
style={flatten([
|
style={[
|
||||||
a.relative,
|
a.relative,
|
||||||
a.rounded_md,
|
a.rounded_md,
|
||||||
a.w_full,
|
a.w_full,
|
||||||
@@ -195,7 +195,7 @@ export function Inner({
|
|||||||
},
|
},
|
||||||
!reduceMotionEnabled && a.zoom_fade_in,
|
!reduceMotionEnabled && a.zoom_fade_in,
|
||||||
style,
|
style,
|
||||||
])}>
|
]}>
|
||||||
<DismissableLayer.DismissableLayer
|
<DismissableLayer.DismissableLayer
|
||||||
onInteractOutside={preventDefault}
|
onInteractOutside={preventDefault}
|
||||||
onFocusOutside={preventDefault}
|
onFocusOutside={preventDefault}
|
||||||
@@ -244,7 +244,7 @@ export const InnerFlatList = React.forwardRef<
|
|||||||
contentContainerStyle={[a.h_full, a.px_0, webInnerContentContainerStyle]}>
|
contentContainerStyle={[a.h_full, a.px_0, webInnerContentContainerStyle]}>
|
||||||
<FlatList
|
<FlatList
|
||||||
ref={ref}
|
ref={ref}
|
||||||
style={[a.h_full, gtMobile ? a.px_2xl : a.px_xl, flatten(style)]}
|
style={[a.h_full, gtMobile ? a.px_2xl : a.px_xl, style]}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
{footer}
|
{footer}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export function HeaderText({
|
|||||||
style?: StyleProp<TextStyle>
|
style?: StyleProp<TextStyle>
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Text style={[a.text_lg, a.text_center, a.font_bold, style]}>
|
<Text style={[a.text_lg, a.text_center, a.font_semi_bold, style]}>
|
||||||
{children}
|
{children}
|
||||||
</Text>
|
</Text>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ export function Description({
|
|||||||
return rt
|
return rt
|
||||||
}, [description])
|
}, [description])
|
||||||
if (!rt) return null
|
if (!rt) return null
|
||||||
return <RichText value={rt} style={[a.leading_snug]} disableLinks {...rest} />
|
return <RichText value={rt} disableLinks {...rest} />
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DescriptionPlaceholder() {
|
export function DescriptionPlaceholder() {
|
||||||
|
|||||||
@@ -390,7 +390,12 @@ export function ProfileGrid({
|
|||||||
{!isProfileHeaderContext && (
|
{!isProfileHeaderContext && (
|
||||||
<InlineLinkText
|
<InlineLinkText
|
||||||
label={_(msg`See more suggested profiles on the Explore page`)}
|
label={_(msg`See more suggested profiles on the Explore page`)}
|
||||||
to="/search">
|
to="/search"
|
||||||
|
onPress={() => {
|
||||||
|
logger.metric('suggestedUser:seeMore', {
|
||||||
|
logContext: isFeedContext ? 'Explore' : 'Profile',
|
||||||
|
})
|
||||||
|
}}>
|
||||||
<Trans>See more</Trans>
|
<Trans>See more</Trans>
|
||||||
</InlineLinkText>
|
</InlineLinkText>
|
||||||
)}
|
)}
|
||||||
@@ -429,6 +434,11 @@ function SeeMoreSuggestedProfilesCard() {
|
|||||||
to="/search"
|
to="/search"
|
||||||
color="primary"
|
color="primary"
|
||||||
label={_(msg`Browse more accounts on the Explore page`)}
|
label={_(msg`Browse more accounts on the Explore page`)}
|
||||||
|
onPress={() => {
|
||||||
|
logger.metric('suggestedUser:seeMore', {
|
||||||
|
logContext: 'Explore',
|
||||||
|
})
|
||||||
|
}}
|
||||||
style={[
|
style={[
|
||||||
a.flex_col,
|
a.flex_col,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import {View} from 'react-native'
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
atoms as a,
|
atoms as a,
|
||||||
flatten,
|
|
||||||
type TextStyleProp,
|
type TextStyleProp,
|
||||||
useTheme,
|
useTheme,
|
||||||
type ViewStyleProp,
|
type ViewStyleProp,
|
||||||
@@ -33,17 +32,9 @@ export function IconCircle({
|
|||||||
height: size === 'lg' ? 52 : 64,
|
height: size === 'lg' ? 52 : 64,
|
||||||
backgroundColor: t.palette.primary_50,
|
backgroundColor: t.palette.primary_50,
|
||||||
},
|
},
|
||||||
flatten(style),
|
style,
|
||||||
]}>
|
]}>
|
||||||
<Icon
|
<Icon size={size} style={[{color: t.palette.primary_500}, iconStyle]} />
|
||||||
size={size}
|
|
||||||
style={[
|
|
||||||
{
|
|
||||||
color: t.palette.primary_500,
|
|
||||||
},
|
|
||||||
flatten(iconStyle),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ export function InterestTabs({
|
|||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
t.atoms.bg,
|
t.atoms.bg,
|
||||||
a.h_full,
|
a.h_full,
|
||||||
{aspectRatio: 1},
|
a.aspect_square,
|
||||||
a.rounded_full,
|
a.rounded_full,
|
||||||
]}>
|
]}>
|
||||||
<ButtonIcon icon={ArrowLeft} />
|
<ButtonIcon icon={ArrowLeft} />
|
||||||
@@ -292,7 +292,7 @@ export function InterestTabs({
|
|||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
t.atoms.bg,
|
t.atoms.bg,
|
||||||
a.h_full,
|
a.h_full,
|
||||||
{aspectRatio: 1},
|
a.aspect_square,
|
||||||
a.rounded_full,
|
a.rounded_full,
|
||||||
]}>
|
]}>
|
||||||
<ButtonIcon icon={ArrowRight} />
|
<ButtonIcon icon={ArrowRight} />
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import {useId} from 'react'
|
||||||
|
import {useKeepAwake} from 'expo-keep-awake'
|
||||||
|
import {useIsFocused} from '@react-navigation/native'
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops the screen from sleeping. Only applies to the current screen.
|
||||||
|
*
|
||||||
|
* Note: Expo keeps the screen permanently awake when in dev mode, so
|
||||||
|
* you'll only see this do anything when in production.
|
||||||
|
*
|
||||||
|
* @platform ios, android
|
||||||
|
*/
|
||||||
|
export function KeepAwake({enabled = true}) {
|
||||||
|
const isFocused = useIsFocused()
|
||||||
|
if (enabled && isFocused) {
|
||||||
|
return <KeepAwakeInner />
|
||||||
|
} else {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function KeepAwakeInner() {
|
||||||
|
const id = useId()
|
||||||
|
// if you don't pass an explicit ID, any `useKeepAwake` hook unmounting disables them all.
|
||||||
|
// very strange behaviour, but easily fixed by passing a unique ID -sfn
|
||||||
|
useKeepAwake(id)
|
||||||
|
return null
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
export function KeepAwake() {
|
||||||
|
return null
|
||||||
|
}
|
||||||
@@ -55,7 +55,7 @@ export function Description({value, handle}: {value?: string; handle: string}) {
|
|||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
return value ? (
|
return value ? (
|
||||||
<Text numberOfLines={2}>
|
<Text numberOfLines={2}>
|
||||||
<RichText value={value} style={[a.leading_snug]} />
|
<RichText value={value} />
|
||||||
</Text>
|
</Text>
|
||||||
) : (
|
) : (
|
||||||
<Text emoji style={[a.leading_snug]}>
|
<Text emoji style={[a.leading_snug]}>
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ export function useLink({
|
|||||||
const state = navigation.getState()
|
const state = navigation.getState()
|
||||||
// if screen is not in the current navigator, it means it's
|
// if screen is not in the current navigator, it means it's
|
||||||
// most likely a tab screen. note: state can be undefined
|
// most likely a tab screen. note: state can be undefined
|
||||||
if (!state?.routeNames.includes(screen)) {
|
if (!state?.routeNames?.includes?.(screen)) {
|
||||||
const parent = navigation.getParent()
|
const parent = navigation.getParent()
|
||||||
if (
|
if (
|
||||||
parent &&
|
parent &&
|
||||||
@@ -296,7 +296,7 @@ export function Link({
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
{...rest}
|
{...rest}
|
||||||
style={[a.justify_start, flatten(rest.style)]}
|
style={[a.justify_start, rest.style]}
|
||||||
role="link"
|
role="link"
|
||||||
accessibilityRole="link"
|
accessibilityRole="link"
|
||||||
href={href}
|
href={href}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {useLingui} from '@lingui/react'
|
|||||||
|
|
||||||
import {cleanError} from '#/lib/strings/errors'
|
import {cleanError} from '#/lib/strings/errors'
|
||||||
import {CenteredView} from '#/view/com/util/Views'
|
import {CenteredView} from '#/view/com/util/Views'
|
||||||
import {atoms as a, flatten, useBreakpoints, useTheme} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
import {Button, ButtonText} from '#/components/Button'
|
||||||
import {Error} from '#/components/Error'
|
import {Error} from '#/components/Error'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
@@ -43,7 +43,7 @@ export function ListFooter({
|
|||||||
a.pb_lg,
|
a.pb_lg,
|
||||||
t.atoms.border_contrast_low,
|
t.atoms.border_contrast_low,
|
||||||
{height: height ?? 180, paddingTop: 30},
|
{height: height ?? 180, paddingTop: 30},
|
||||||
flatten(style),
|
style,
|
||||||
]}>
|
]}>
|
||||||
{isFetchingNextPage ? (
|
{isFetchingNextPage ? (
|
||||||
<Loader size="xl" />
|
<Loader size="xl" />
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import Animated, {
|
|||||||
withTiming,
|
withTiming,
|
||||||
} from 'react-native-reanimated'
|
} from 'react-native-reanimated'
|
||||||
|
|
||||||
import {atoms as a, flatten, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {type Props, useCommonSVGProps} from '#/components/icons/common'
|
import {type Props, useCommonSVGProps} from '#/components/icons/common'
|
||||||
import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader'
|
import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader'
|
||||||
|
|
||||||
@@ -37,12 +37,7 @@ export function Loader(props: Props) {
|
|||||||
]}>
|
]}>
|
||||||
<Icon
|
<Icon
|
||||||
{...props}
|
{...props}
|
||||||
style={[
|
style={[a.absolute, a.inset_0, t.atoms.text_contrast_high, props.style]}
|
||||||
a.absolute,
|
|
||||||
a.inset_0,
|
|
||||||
t.atoms.text_contrast_high,
|
|
||||||
flatten(props.style),
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
|
|
||||||
import {atoms as a, flatten, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {type Props, useCommonSVGProps} from '#/components/icons/common'
|
import {type Props, useCommonSVGProps} from '#/components/icons/common'
|
||||||
import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader'
|
import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader'
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ export function Loader(props: Props) {
|
|||||||
a.absolute,
|
a.absolute,
|
||||||
a.inset_0,
|
a.inset_0,
|
||||||
t.atoms.text_contrast_high,
|
t.atoms.text_contrast_high,
|
||||||
flatten(props.style),
|
props.style,
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
import {View, type ViewStyle} from 'react-native'
|
|
||||||
import {msg, Trans} from '@lingui/macro'
|
|
||||||
import {useLingui} from '@lingui/react'
|
|
||||||
|
|
||||||
import {type Gate} from '#/lib/statsig/gates'
|
|
||||||
import {useGate} from '#/lib/statsig/statsig'
|
|
||||||
import {isWeb} from '#/platform/detection'
|
|
||||||
import {useSession} from '#/state/session'
|
|
||||||
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
|
||||||
import {Logo} from '#/view/icons/Logo'
|
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
|
||||||
import {Button, ButtonText} from '#/components/Button'
|
|
||||||
import {Text} from '#/components/Typography'
|
|
||||||
|
|
||||||
interface LoggedOutCTAProps {
|
|
||||||
style?: ViewStyle
|
|
||||||
gateName: Gate
|
|
||||||
}
|
|
||||||
|
|
||||||
export function LoggedOutCTA({style, gateName}: LoggedOutCTAProps) {
|
|
||||||
const {hasSession} = useSession()
|
|
||||||
const {requestSwitchToAccount} = useLoggedOutViewControls()
|
|
||||||
const gate = useGate()
|
|
||||||
const t = useTheme()
|
|
||||||
const {_} = useLingui()
|
|
||||||
|
|
||||||
// Only show for logged-out users on web
|
|
||||||
if (hasSession || !isWeb) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check gate at the last possible moment to avoid counting users as exposed when they won't see the element
|
|
||||||
if (!gate(gateName)) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View style={[a.pb_md, style]}>
|
|
||||||
<View
|
|
||||||
style={[
|
|
||||||
a.flex_row,
|
|
||||||
a.align_center,
|
|
||||||
a.justify_between,
|
|
||||||
a.px_lg,
|
|
||||||
a.py_md,
|
|
||||||
a.rounded_md,
|
|
||||||
a.mb_xs,
|
|
||||||
t.atoms.bg_contrast_25,
|
|
||||||
]}>
|
|
||||||
<View style={[a.flex_row, a.align_center, a.flex_1, a.pr_md]}>
|
|
||||||
<Logo width={30} style={[a.mr_md]} />
|
|
||||||
<View style={[a.flex_1]}>
|
|
||||||
<Text style={[a.text_lg, a.font_semi_bold, a.leading_snug]}>
|
|
||||||
<Trans>Join Bluesky</Trans>
|
|
||||||
</Text>
|
|
||||||
<Text
|
|
||||||
style={[
|
|
||||||
a.text_md,
|
|
||||||
a.font_medium,
|
|
||||||
a.leading_snug,
|
|
||||||
t.atoms.text_contrast_medium,
|
|
||||||
]}>
|
|
||||||
<Trans>The open social network.</Trans>
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<Button
|
|
||||||
onPress={() => {
|
|
||||||
requestSwitchToAccount({requestedAccount: 'new'})
|
|
||||||
}}
|
|
||||||
label={_(msg`Create account`)}
|
|
||||||
size="small"
|
|
||||||
variant="solid"
|
|
||||||
color="primary">
|
|
||||||
<ButtonText>
|
|
||||||
<Trans>Create account</Trans>
|
|
||||||
</ButtonText>
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import {StyleSheet} from 'react-native'
|
||||||
import type React from 'react'
|
import type React from 'react'
|
||||||
|
|
||||||
import {atoms as a, useTheme, type ViewStyleProp} from '#/alf'
|
import {isHighDPI} from '#/lib/browser'
|
||||||
|
import {atoms as a, platform, useTheme, type ViewStyleProp} from '#/alf'
|
||||||
import {Fill} from '#/components/Fill'
|
import {Fill} from '#/components/Fill'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,7 +27,15 @@ export function MediaInsetBorder({
|
|||||||
<Fill
|
<Fill
|
||||||
style={[
|
style={[
|
||||||
a.rounded_md,
|
a.rounded_md,
|
||||||
a.border,
|
{
|
||||||
|
borderWidth: platform({
|
||||||
|
native: StyleSheet.hairlineWidth,
|
||||||
|
// while we generally use hairlineWidth (aka 1px),
|
||||||
|
// we make an exception here for high DPI screens
|
||||||
|
// as the 1px border is very noticeable -sfn
|
||||||
|
web: isHighDPI ? 0.5 : StyleSheet.hairlineWidth,
|
||||||
|
}),
|
||||||
|
},
|
||||||
opaque
|
opaque
|
||||||
? [t.atoms.border_contrast_low]
|
? [t.atoms.border_contrast_low]
|
||||||
: [
|
: [
|
||||||
@@ -34,9 +44,7 @@ export function MediaInsetBorder({
|
|||||||
: t.atoms.border_contrast_high,
|
: t.atoms.border_contrast_high,
|
||||||
{opacity: 0.6},
|
{opacity: 0.6},
|
||||||
],
|
],
|
||||||
{
|
a.pointer_events_none,
|
||||||
pointerEvents: 'none',
|
|
||||||
},
|
|
||||||
style,
|
style,
|
||||||
]}>
|
]}>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ export function ImageItem({
|
|||||||
}) {
|
}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
return (
|
return (
|
||||||
<View style={[a.relative, a.flex_1, {aspectRatio: 1, maxWidth: 100}]}>
|
<View style={[a.relative, a.flex_1, a.aspect_square, {maxWidth: 100}]}>
|
||||||
<Image
|
<Image
|
||||||
key={thumbnail}
|
key={thumbnail}
|
||||||
source={{uri: thumbnail}}
|
source={{uri: thumbnail}}
|
||||||
@@ -131,7 +131,8 @@ export function VideoItem({
|
|||||||
style={[
|
style={[
|
||||||
{backgroundColor: 'black'},
|
{backgroundColor: 'black'},
|
||||||
a.flex_1,
|
a.flex_1,
|
||||||
{aspectRatio: 1, maxWidth: 100},
|
a.aspect_square,
|
||||||
|
{maxWidth: 100},
|
||||||
a.justify_center,
|
a.justify_center,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
]}>
|
]}>
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import {
|
|||||||
useSafeAreaInsets,
|
useSafeAreaInsets,
|
||||||
} from 'react-native-safe-area-context'
|
} from 'react-native-safe-area-context'
|
||||||
import {LinearGradient} from 'expo-linear-gradient'
|
import {LinearGradient} from 'expo-linear-gradient'
|
||||||
|
import {utils} from '@bsky.app/alf'
|
||||||
|
|
||||||
import {isAndroid, isNative} from '#/platform/detection'
|
import {isAndroid, isNative} from '#/platform/detection'
|
||||||
import {useA11y} from '#/state/a11y'
|
import {useA11y} from '#/state/a11y'
|
||||||
import {atoms as a, flatten, useBreakpoints, useTheme, web} from '#/alf'
|
import {atoms as a, useBreakpoints, useTheme, web} from '#/alf'
|
||||||
import {transparentifyColor} from '#/alf/util/colorGeneration'
|
|
||||||
import {FocusScope} from '#/components/FocusScope'
|
import {FocusScope} from '#/components/FocusScope'
|
||||||
import {LockScroll} from '#/components/LockScroll'
|
import {LockScroll} from '#/components/LockScroll'
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ export function Overlay({
|
|||||||
) : (
|
) : (
|
||||||
<LinearGradient
|
<LinearGradient
|
||||||
colors={[
|
colors={[
|
||||||
transparentifyColor(t.atoms.bg.backgroundColor, 0),
|
utils.alpha(t.atoms.bg.backgroundColor, 0),
|
||||||
t.atoms.bg.backgroundColor,
|
t.atoms.bg.backgroundColor,
|
||||||
t.atoms.bg.backgroundColor,
|
t.atoms.bg.backgroundColor,
|
||||||
]}
|
]}
|
||||||
@@ -97,7 +97,7 @@ export function Overlay({
|
|||||||
]}>
|
]}>
|
||||||
<LinearGradient
|
<LinearGradient
|
||||||
colors={[
|
colors={[
|
||||||
transparentifyColor(t.atoms.bg.backgroundColor, 0),
|
utils.alpha(t.atoms.bg.backgroundColor, 0),
|
||||||
t.atoms.bg.backgroundColor,
|
t.atoms.bg.backgroundColor,
|
||||||
]}
|
]}
|
||||||
start={[0.5, 0]}
|
start={[0.5, 0]}
|
||||||
@@ -113,7 +113,7 @@ export function Overlay({
|
|||||||
role="dialog"
|
role="dialog"
|
||||||
aria-role="dialog"
|
aria-role="dialog"
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
style={flatten([
|
style={[
|
||||||
a.relative,
|
a.relative,
|
||||||
a.w_full,
|
a.w_full,
|
||||||
a.p_2xl,
|
a.p_2xl,
|
||||||
@@ -128,7 +128,7 @@ export function Overlay({
|
|||||||
maxWidth: 420,
|
maxWidth: 420,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
])}>
|
]}>
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</View>
|
||||||
</FocusScope>
|
</FocusScope>
|
||||||
|
|||||||
@@ -5,3 +5,10 @@ import {ID} from '#/components/PolicyUpdateOverlay/updates/202508/config'
|
|||||||
* the relationship is clear.
|
* the relationship is clear.
|
||||||
*/
|
*/
|
||||||
export const ACTIVE_UPDATE_ID = ID
|
export const ACTIVE_UPDATE_ID = ID
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Toggle to enable or disable the policy update overlay feature e.g. once an
|
||||||
|
* update has run its course, set this to false. For new updates, set this to
|
||||||
|
* true and change `ACTIVE_UPDATE_ID` to the new update ID.
|
||||||
|
*/
|
||||||
|
export const POLICY_UPDATE_IS_ENABLED = false
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
} from 'react'
|
} from 'react'
|
||||||
|
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
|
import {POLICY_UPDATE_IS_ENABLED} from '#/components/PolicyUpdateOverlay/config'
|
||||||
import {Provider as PortalProvider} from '#/components/PolicyUpdateOverlay/Portal'
|
import {Provider as PortalProvider} from '#/components/PolicyUpdateOverlay/Portal'
|
||||||
import {
|
import {
|
||||||
type PolicyUpdateState,
|
type PolicyUpdateState,
|
||||||
@@ -45,8 +46,15 @@ export function Provider({children}: {children?: ReactNode}) {
|
|||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
const [isReadyToShowOverlay, setIsReadyToShowOverlay] = useState(false)
|
const [isReadyToShowOverlay, setIsReadyToShowOverlay] = useState(false)
|
||||||
const state = usePolicyUpdateState({
|
const state = usePolicyUpdateState({
|
||||||
// only enable the policy update overlay in non-test environments
|
enabled:
|
||||||
enabled: isReadyToShowOverlay && hasSession && ENV !== 'e2e',
|
// if the feature is enabled
|
||||||
|
POLICY_UPDATE_IS_ENABLED &&
|
||||||
|
// once shell has rendered
|
||||||
|
isReadyToShowOverlay &&
|
||||||
|
// only once logged in
|
||||||
|
hasSession &&
|
||||||
|
// only enabled in non-test environments
|
||||||
|
ENV !== 'e2e',
|
||||||
})
|
})
|
||||||
|
|
||||||
const ctx = useMemo(
|
const ctx = useMemo(
|
||||||
|
|||||||
@@ -97,9 +97,7 @@ export const ExternalEmbed = ({
|
|||||||
]}>
|
]}>
|
||||||
{imageUri && !embedPlayerParams ? (
|
{imageUri && !embedPlayerParams ? (
|
||||||
<Image
|
<Image
|
||||||
style={{
|
style={[a.aspect_card]}
|
||||||
aspectRatio: 1.91,
|
|
||||||
}}
|
|
||||||
source={{uri: imageUri}}
|
source={{uri: imageUri}}
|
||||||
accessibilityIgnoresInvertColors
|
accessibilityIgnoresInvertColors
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function FeedEmbed({
|
|||||||
return (
|
return (
|
||||||
<FeedCard.Link
|
<FeedCard.Link
|
||||||
view={embed.view}
|
view={embed.view}
|
||||||
style={[a.border, t.atoms.border_contrast_medium, a.p_md, a.rounded_sm]}>
|
style={[a.border, t.atoms.border_contrast_low, a.p_md, a.rounded_sm]}>
|
||||||
<FeedCard.Outer>
|
<FeedCard.Outer>
|
||||||
<FeedCard.Header>
|
<FeedCard.Header>
|
||||||
<FeedCard.Avatar src={embed.view.avatar} />
|
<FeedCard.Avatar src={embed.view.avatar} />
|
||||||
|
|||||||
@@ -64,7 +64,10 @@ export function ImageEmbed({
|
|||||||
}
|
}
|
||||||
const onPressIn = (_: number) => {
|
const onPressIn = (_: number) => {
|
||||||
InteractionManager.runAfterInteractions(() => {
|
InteractionManager.runAfterInteractions(() => {
|
||||||
Image.prefetch(items.map(i => i.uri))
|
Image.prefetch(
|
||||||
|
items.map(i => i.uri),
|
||||||
|
'memory',
|
||||||
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function ListEmbed({
|
|||||||
return (
|
return (
|
||||||
<ListCard.Default
|
<ListCard.Default
|
||||||
view={embed.view}
|
view={embed.view}
|
||||||
style={[a.border, t.atoms.border_contrast_medium, a.p_md, a.rounded_sm]}
|
style={[a.border, t.atoms.border_contrast_low, a.p_md, a.rounded_sm]}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {ContentHider} from '#/components/moderation/ContentHider'
|
|||||||
import {PostAlerts} from '#/components/moderation/PostAlerts'
|
import {PostAlerts} from '#/components/moderation/PostAlerts'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {Embed as StarterPackCard} from '#/components/StarterPack/StarterPackCard'
|
import {Embed as StarterPackCard} from '#/components/StarterPack/StarterPackCard'
|
||||||
import {SubtleWebHover} from '#/components/SubtleWebHover'
|
import {SubtleHover} from '#/components/SubtleHover'
|
||||||
import * as bsky from '#/types/bsky'
|
import * as bsky from '#/types/bsky'
|
||||||
import {
|
import {
|
||||||
type Embed as TEmbed,
|
type Embed as TEmbed,
|
||||||
@@ -284,7 +284,7 @@ export function QuoteEmbed({
|
|||||||
childContainerStyle={[a.pt_sm]}>
|
childContainerStyle={[a.pt_sm]}>
|
||||||
{({active}) => (
|
{({active}) => (
|
||||||
<>
|
<>
|
||||||
{!active && <SubtleWebHover hover={hover} style={[a.rounded_md]} />}
|
{!active && <SubtleHover hover={hover} style={[a.rounded_md]} />}
|
||||||
<Link
|
<Link
|
||||||
style={[!active && a.p_md]}
|
style={[!active && a.p_md]}
|
||||||
hoverStyle={{borderColor: pal.colors.borderLinkHover}}
|
hoverStyle={{borderColor: pal.colors.borderLinkHover}}
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ export function PostRepliedTo({
|
|||||||
size="xs"
|
size="xs"
|
||||||
style={[t.atoms.text_contrast_medium, {top: -1}]}
|
style={[t.atoms.text_contrast_medium, {top: -1}]}
|
||||||
/>
|
/>
|
||||||
<Text style={textStyle}>{label}</Text>
|
<Text style={[a.flex_1, textStyle]} numberOfLines={1}>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import {t} from '@lingui/macro'
|
|||||||
import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
|
import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
|
||||||
import {useGate} from '#/lib/statsig/statsig'
|
import {useGate} from '#/lib/statsig/statsig'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
import * as Toast from '#/components/Toast'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {IS_INTERNAL} from '#/env'
|
import {IS_INTERNAL} from '#/env'
|
||||||
|
|
||||||
@@ -16,7 +16,6 @@ export function DiscoverDebug({
|
|||||||
feedContext: string | undefined
|
feedContext: string | undefined
|
||||||
}) {
|
}) {
|
||||||
const {currentAccount} = useSession()
|
const {currentAccount} = useSession()
|
||||||
const {gtMobile} = useBreakpoints()
|
|
||||||
const gate = useGate()
|
const gate = useGate()
|
||||||
const isDiscoverDebugUser =
|
const isDiscoverDebugUser =
|
||||||
IS_INTERNAL ||
|
IS_INTERNAL ||
|
||||||
@@ -30,15 +29,11 @@ export function DiscoverDebug({
|
|||||||
<Pressable
|
<Pressable
|
||||||
accessible={false}
|
accessible={false}
|
||||||
hitSlop={10}
|
hitSlop={10}
|
||||||
style={[
|
style={[a.absolute, {zIndex: 1000, maxWidth: 65, bottom: -4}, a.left_0]}
|
||||||
a.absolute,
|
|
||||||
{zIndex: 1000, maxWidth: 65, bottom: -4},
|
|
||||||
gtMobile ? a.right_0 : a.left_0,
|
|
||||||
]}
|
|
||||||
onPress={e => {
|
onPress={e => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
Clipboard.setStringAsync(feedContext)
|
Clipboard.setStringAsync(feedContext)
|
||||||
Toast.show(t`Copied to clipboard`, 'clipboard-check')
|
Toast.show(t`Copied to clipboard`)
|
||||||
}}>
|
}}>
|
||||||
<Text
|
<Text
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
|
|||||||
@@ -46,7 +46,12 @@ import {
|
|||||||
useProfileBlockMutationQueue,
|
useProfileBlockMutationQueue,
|
||||||
useProfileMuteMutationQueue,
|
useProfileMuteMutationQueue,
|
||||||
} from '#/state/queries/profile'
|
} from '#/state/queries/profile'
|
||||||
import {useToggleReplyVisibilityMutation} from '#/state/queries/threadgate'
|
import {
|
||||||
|
InvalidInteractionSettingsError,
|
||||||
|
MAX_HIDDEN_REPLIES,
|
||||||
|
MaxHiddenRepliesError,
|
||||||
|
useToggleReplyVisibilityMutation,
|
||||||
|
} from '#/state/queries/threadgate'
|
||||||
import {useRequireAuth, useSession} from '#/state/session'
|
import {useRequireAuth, useSession} from '#/state/session'
|
||||||
import {useMergedThreadgateHiddenReplies} from '#/state/threadgate-hidden-replies'
|
import {useMergedThreadgateHiddenReplies} from '#/state/threadgate-hidden-replies'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
@@ -253,6 +258,7 @@ let PostMenuItems = ({
|
|||||||
|
|
||||||
const onHidePost = () => {
|
const onHidePost = () => {
|
||||||
hidePost({uri: postUri})
|
hidePost({uri: postUri})
|
||||||
|
logEvent('thread:click:hideReplyForMe', {})
|
||||||
}
|
}
|
||||||
|
|
||||||
const hideInPWI = !!postAuthor.labels?.find(
|
const hideInPWI = !!postAuthor.labels?.find(
|
||||||
@@ -333,18 +339,44 @@ let PostMenuItems = ({
|
|||||||
replyUri: postUri,
|
replyUri: postUri,
|
||||||
action,
|
action,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Log metric only when hiding (not when showing)
|
||||||
|
if (isHide) {
|
||||||
|
logEvent('thread:click:hideReplyForEveryone', {})
|
||||||
|
}
|
||||||
|
|
||||||
Toast.show(
|
Toast.show(
|
||||||
isHide
|
isHide
|
||||||
? _(msg`Reply was successfully hidden`)
|
? _(msg`Reply was successfully hidden`)
|
||||||
: _(msg({message: 'Reply visibility updated', context: 'toast'})),
|
: _(msg({message: 'Reply visibility updated', context: 'toast'})),
|
||||||
)
|
)
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
if (e instanceof MaxHiddenRepliesError) {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
_(msg({message: 'Updating reply visibility failed', context: 'toast'})),
|
_(
|
||||||
|
msg({
|
||||||
|
message: `You can hide a maximum of ${MAX_HIDDEN_REPLIES} replies.`,
|
||||||
|
context: 'toast',
|
||||||
|
}),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
} else if (e instanceof InvalidInteractionSettingsError) {
|
||||||
|
Toast.show(
|
||||||
|
_(msg({message: 'Invalid interaction settings.', context: 'toast'})),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Toast.show(
|
||||||
|
_(
|
||||||
|
msg({
|
||||||
|
message: 'Updating reply visibility failed',
|
||||||
|
context: 'toast',
|
||||||
|
}),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
logger.error(`Failed to ${action} reply`, {safeMessage: e.message})
|
logger.error(`Failed to ${action} reply`, {safeMessage: e.message})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const onPressPin = () => {
|
const onPressPin = () => {
|
||||||
logEvent(isPinned ? 'post:unpin' : 'post:pin', {})
|
logEvent(isPinned ? 'post:unpin' : 'post:pin', {})
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ let RepostButton = ({
|
|||||||
<PostControlButton
|
<PostControlButton
|
||||||
testID="repostBtn"
|
testID="repostBtn"
|
||||||
active={isReposted}
|
active={isReposted}
|
||||||
activeColor={t.palette.positive_600}
|
activeColor={t.palette.positive_500}
|
||||||
big={big}
|
big={big}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
onLongPress={onLongPress}
|
onLongPress={onLongPress}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export const RepostButton = ({
|
|||||||
<PostControlButton
|
<PostControlButton
|
||||||
testID="repostBtn"
|
testID="repostBtn"
|
||||||
active={isReposted}
|
active={isReposted}
|
||||||
activeColor={t.palette.positive_600}
|
activeColor={t.palette.positive_500}
|
||||||
label={props.accessibilityLabel}
|
label={props.accessibilityLabel}
|
||||||
big={big}
|
big={big}
|
||||||
{...props}>
|
{...props}>
|
||||||
@@ -100,7 +100,7 @@ export const RepostButton = ({
|
|||||||
<PostControlButton
|
<PostControlButton
|
||||||
onPress={() => requireAuth(() => {})}
|
onPress={() => requireAuth(() => {})}
|
||||||
active={isReposted}
|
active={isReposted}
|
||||||
activeColor={t.palette.positive_600}
|
activeColor={t.palette.positive_500}
|
||||||
label={_(msg`Repost or quote post`)}
|
label={_(msg`Repost or quote post`)}
|
||||||
big={big}>
|
big={big}>
|
||||||
<PostControlButtonIcon icon={Repost} />
|
<PostControlButtonIcon icon={Repost} />
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export function RecentChats({postUri}: {postUri: string}) {
|
|||||||
style={[a.flex_1, a.pt_2xs, {minHeight: 98}]}
|
style={[a.flex_1, a.pt_2xs, {minHeight: 98}]}
|
||||||
contentContainerStyle={[a.gap_sm, a.px_md]}
|
contentContainerStyle={[a.gap_sm, a.px_md]}
|
||||||
showsHorizontalScrollIndicator={false}
|
showsHorizontalScrollIndicator={false}
|
||||||
fadingEdgeLength={64}
|
|
||||||
nestedScrollEnabled>
|
nestedScrollEnabled>
|
||||||
{convos && convos.length > 0 ? (
|
{convos && convos.length > 0 ? (
|
||||||
convos.map(convo => {
|
convos.map(convo => {
|
||||||
|
|||||||
@@ -136,7 +136,9 @@ let ShareMenuItems = ({
|
|||||||
{hideInPWI && (
|
{hideInPWI && (
|
||||||
<Menu.Group>
|
<Menu.Group>
|
||||||
<Menu.ContainerItem>
|
<Menu.ContainerItem>
|
||||||
<Admonition type="warning" style={[a.flex_1, a.border_0, a.p_0]}>
|
<Admonition
|
||||||
|
type="warning"
|
||||||
|
style={[a.flex_1, a.border_0, a.p_0, a.bg_transparent]}>
|
||||||
<Trans>This post is only visible to logged-in users.</Trans>
|
<Trans>This post is only visible to logged-in users.</Trans>
|
||||||
</Admonition>
|
</Admonition>
|
||||||
</Menu.ContainerItem>
|
</Menu.ContainerItem>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {memo, useState} from 'react'
|
import {memo, useMemo, useState} from 'react'
|
||||||
import {type StyleProp, View, type ViewStyle} from 'react-native'
|
import {type StyleProp, View, type ViewStyle} from 'react-native'
|
||||||
import {
|
import {
|
||||||
type AppBskyFeedDefs,
|
type AppBskyFeedDefs,
|
||||||
@@ -25,7 +25,7 @@ import {
|
|||||||
useProgressGuideControls,
|
useProgressGuideControls,
|
||||||
} from '#/state/shell/progress-guide'
|
} from '#/state/shell/progress-guide'
|
||||||
import * as Toast from '#/view/com/util/Toast'
|
import * as Toast from '#/view/com/util/Toast'
|
||||||
import {atoms as a, flatten, useBreakpoints} from '#/alf'
|
import {atoms as a, useBreakpoints} from '#/alf'
|
||||||
import {Reply as Bubble} from '#/components/icons/Reply'
|
import {Reply as Bubble} from '#/components/icons/Reply'
|
||||||
import {useFormatPostStatCount} from '#/components/PostControls/util'
|
import {useFormatPostStatCount} from '#/components/PostControls/util'
|
||||||
import * as Skele from '#/components/Skeleton'
|
import * as Skele from '#/components/Skeleton'
|
||||||
@@ -189,7 +189,7 @@ let PostControls = ({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const secondaryControlSpacingStyles = getSecondaryControlSpacingStyles({
|
const secondaryControlSpacingStyles = useSecondaryControlSpacingStyles({
|
||||||
variant,
|
variant,
|
||||||
big,
|
big,
|
||||||
gtPhone,
|
gtPhone,
|
||||||
@@ -211,7 +211,7 @@ let PostControls = ({
|
|||||||
a.flex_1,
|
a.flex_1,
|
||||||
a.align_start,
|
a.align_start,
|
||||||
{marginLeft: big ? -2 : -6},
|
{marginLeft: big ? -2 : -6},
|
||||||
replyDisabled ? {opacity: 0.5} : undefined,
|
replyDisabled ? {opacity: 0.6} : undefined,
|
||||||
]}>
|
]}>
|
||||||
<PostControlButton
|
<PostControlButton
|
||||||
testID="replyBtn"
|
testID="replyBtn"
|
||||||
@@ -353,7 +353,7 @@ export function PostControlsSkeleton({
|
|||||||
const padding = 4
|
const padding = 4
|
||||||
const size = rowHeight - padding * 2
|
const size = rowHeight - padding * 2
|
||||||
|
|
||||||
const secondaryControlSpacingStyles = getSecondaryControlSpacingStyles({
|
const secondaryControlSpacingStyles = useSecondaryControlSpacingStyles({
|
||||||
variant,
|
variant,
|
||||||
big,
|
big,
|
||||||
gtPhone,
|
gtPhone,
|
||||||
@@ -395,7 +395,7 @@ export function PostControlsSkeleton({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSecondaryControlSpacingStyles({
|
function useSecondaryControlSpacingStyles({
|
||||||
variant,
|
variant,
|
||||||
big,
|
big,
|
||||||
gtPhone,
|
gtPhone,
|
||||||
@@ -404,9 +404,10 @@ function getSecondaryControlSpacingStyles({
|
|||||||
big?: boolean
|
big?: boolean
|
||||||
gtPhone: boolean
|
gtPhone: boolean
|
||||||
}) {
|
}) {
|
||||||
return flatten([
|
return useMemo(() => {
|
||||||
{gap: 0}, // default, we want `gap` to be defined on the resulting object
|
let gap = 0 // default, we want `gap` to be defined on the resulting object
|
||||||
variant !== 'compact' && a.gap_xs,
|
if (variant !== 'compact') gap = a.gap_xs.gap
|
||||||
(big || gtPhone) && a.gap_sm,
|
if (big || gtPhone) gap = a.gap_sm.gap
|
||||||
])
|
return {gap}
|
||||||
|
}, [variant, big, gtPhone])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ export function Description({
|
|||||||
<View style={[a.pt_xs]}>
|
<View style={[a.pt_xs]}>
|
||||||
<RichText
|
<RichText
|
||||||
value={rt}
|
value={rt}
|
||||||
style={[a.leading_snug, style]}
|
style={style}
|
||||||
numberOfLines={numberOfLines}
|
numberOfLines={numberOfLines}
|
||||||
disableLinks
|
disableLinks
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -515,7 +515,12 @@ function Inner({
|
|||||||
<View style={[a.flex_row, a.align_center, a.pt_md, a.pb_xs]}>
|
<View style={[a.flex_row, a.align_center, a.pt_md, a.pb_xs]}>
|
||||||
<Text
|
<Text
|
||||||
numberOfLines={1}
|
numberOfLines={1}
|
||||||
style={[a.text_lg, a.font_semi_bold, a.self_start]}>
|
style={[
|
||||||
|
a.text_lg,
|
||||||
|
a.leading_snug,
|
||||||
|
a.font_semi_bold,
|
||||||
|
a.self_start,
|
||||||
|
]}>
|
||||||
{sanitizeDisplayName(
|
{sanitizeDisplayName(
|
||||||
profile.displayName || sanitizeHandle(profile.handle),
|
profile.displayName || sanitizeHandle(profile.handle),
|
||||||
moderation.ui('displayName'),
|
moderation.ui('displayName'),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {type ModerationOpts} from '@atproto/api'
|
|||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
|
import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
|
||||||
import {logEvent} from '#/lib/statsig/statsig'
|
import {logEvent} from '#/lib/statsig/statsig'
|
||||||
import {isWeb} from '#/platform/detection'
|
import {isWeb} from '#/platform/detection'
|
||||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||||
@@ -13,10 +14,6 @@ import {useGetSuggestedUsersQuery} from '#/state/queries/trending/useGetSuggeste
|
|||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {type Follow10ProgressGuide} from '#/state/shell/progress-guide'
|
import {type Follow10ProgressGuide} from '#/state/shell/progress-guide'
|
||||||
import {type ListMethods} from '#/view/com/util/List'
|
import {type ListMethods} from '#/view/com/util/List'
|
||||||
import {
|
|
||||||
popularInterests,
|
|
||||||
useInterestsDisplayNames,
|
|
||||||
} from '#/screens/Onboarding/state'
|
|
||||||
import {
|
import {
|
||||||
atoms as a,
|
atoms as a,
|
||||||
native,
|
native,
|
||||||
|
|||||||
@@ -48,18 +48,14 @@ export function RichText({
|
|||||||
[value],
|
[value],
|
||||||
)
|
)
|
||||||
|
|
||||||
const flattenedStyle = flatten(style)
|
const plainStyles = [a.leading_snug, style]
|
||||||
const plainStyles = [a.leading_snug, flattenedStyle]
|
const interactiveStyles = [plainStyles, interactiveStyle]
|
||||||
const interactiveStyles = [
|
|
||||||
a.leading_snug,
|
|
||||||
flatten(interactiveStyle),
|
|
||||||
flattenedStyle,
|
|
||||||
]
|
|
||||||
|
|
||||||
const {text, facets} = richText
|
const {text, facets} = richText
|
||||||
|
|
||||||
if (!facets?.length) {
|
if (!facets?.length) {
|
||||||
if (isOnlyEmoji(text)) {
|
if (isOnlyEmoji(text)) {
|
||||||
|
const flattenedStyle = flatten(style)
|
||||||
const fontSize =
|
const fontSize =
|
||||||
(flattenedStyle.fontSize ?? a.text_sm.fontSize) * emojiMultiplier
|
(flattenedStyle.fontSize ?? a.text_sm.fontSize) * emojiMultiplier
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -96,7 +96,8 @@ export function RichTextTag({
|
|||||||
onLongPress={createStaticClick(menuProps.onPress).onPress}
|
onLongPress={createStaticClick(menuProps.onPress).onPress}
|
||||||
accessibilityHint={hint}
|
accessibilityHint={hint}
|
||||||
label={label}
|
label={label}
|
||||||
style={textStyle}>
|
style={textStyle}
|
||||||
|
emoji>
|
||||||
{isNative ? (
|
{isNative ? (
|
||||||
display
|
display
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export function Text({blend, style}: TextStyleProp & SkeletonProps) {
|
|||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.rounded_md,
|
a.rounded_md,
|
||||||
t.atoms.bg_contrast_25,
|
t.atoms.bg_contrast_50,
|
||||||
{
|
{
|
||||||
height: lineHeight * 0.7,
|
height: lineHeight * 0.7,
|
||||||
opacity: blend ? 0.6 : 1,
|
opacity: blend ? 0.6 : 1,
|
||||||
@@ -57,7 +57,7 @@ export function Circle({
|
|||||||
a.justify_center,
|
a.justify_center,
|
||||||
a.align_center,
|
a.align_center,
|
||||||
a.rounded_full,
|
a.rounded_full,
|
||||||
t.atoms.bg_contrast_25,
|
t.atoms.bg_contrast_50,
|
||||||
{
|
{
|
||||||
width: size,
|
width: size,
|
||||||
height: size,
|
height: size,
|
||||||
@@ -80,7 +80,7 @@ export function Pill({
|
|||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.rounded_full,
|
a.rounded_full,
|
||||||
t.atoms.bg_contrast_25,
|
t.atoms.bg_contrast_50,
|
||||||
{
|
{
|
||||||
width: size * 1.618,
|
width: size * 1.618,
|
||||||
height: size,
|
height: size,
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ function ShareDialogInner({
|
|||||||
source={{uri: imageUrl}}
|
source={{uri: imageUrl}}
|
||||||
style={[
|
style={[
|
||||||
a.rounded_sm,
|
a.rounded_sm,
|
||||||
|
a.aspect_card,
|
||||||
{
|
{
|
||||||
aspectRatio: 1200 / 630,
|
|
||||||
transform: [{scale: gtMobile ? 0.85 : 1}],
|
transform: [{scale: gtMobile ? 0.85 : 1}],
|
||||||
marginTop: gtMobile ? -20 : 0,
|
marginTop: gtMobile ? -20 : 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ export function Embed({
|
|||||||
<Link starterPack={starterPack}>
|
<Link starterPack={starterPack}>
|
||||||
<Image
|
<Image
|
||||||
source={imageUri}
|
source={imageUri}
|
||||||
style={[a.w_full, {aspectRatio: 1.91}]}
|
style={[a.w_full, a.aspect_card]}
|
||||||
accessibilityIgnoresInvertColors={true}
|
accessibilityIgnoresInvertColors={true}
|
||||||
/>
|
/>
|
||||||
<View style={[a.px_sm, a.py_md]}>
|
<View style={[a.px_sm, a.py_md]}>
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
|
|
||||||
|
import {isTouchDevice} from '#/lib/browser'
|
||||||
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
import {atoms as a, useTheme, type ViewStyleProp} from '#/alf'
|
import {atoms as a, useTheme, type ViewStyleProp} from '#/alf'
|
||||||
|
|
||||||
export function SubtleHover({style, hover}: ViewStyleProp & {hover: boolean}) {
|
export function SubtleHover({
|
||||||
|
style,
|
||||||
|
hover,
|
||||||
|
web = true,
|
||||||
|
native = false,
|
||||||
|
}: ViewStyleProp & {hover: boolean; web?: boolean; native?: boolean}) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
|
|
||||||
let opacity: number
|
let opacity: number
|
||||||
@@ -18,17 +25,25 @@ export function SubtleHover({style, hover}: ViewStyleProp & {hover: boolean}) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
const el = (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
a.absolute,
|
a.absolute,
|
||||||
a.inset_0,
|
a.inset_0,
|
||||||
a.pointer_events_none,
|
a.pointer_events_none,
|
||||||
a.transition_opacity,
|
a.transition_opacity,
|
||||||
t.atoms.bg_contrast_25,
|
t.atoms.bg_contrast_50,
|
||||||
style,
|
style,
|
||||||
{opacity: hover ? opacity : 0},
|
{opacity: hover ? opacity : 0},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (isWeb && web) {
|
||||||
|
return isTouchDevice ? null : el
|
||||||
|
} else if (isNative && native) {
|
||||||
|
return el
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
import {type ViewStyleProp} from '#/alf'
|
|
||||||
|
|
||||||
export function SubtleWebHover({}: ViewStyleProp & {hover: boolean}) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||