Skip to content

Commit

Permalink
Merge branch 'main' into idn-handles
Browse files Browse the repository at this point in the history
* main: (58 commits)
  Fix tests
  Layout tweaks (bluesky-social#7150)
  Trending (Beta) (bluesky-social#7144)
  Fix emoji picker position (bluesky-social#7146)
  Tweak Follow dialog Search placeholder (bluesky-social#7147)
  New progress guide - 10 follows (bluesky-social#7128)
  Pipe statsig events to logger (bluesky-social#7141)
  Fix notifications borders (bluesky-social#7140)
  Refetch empty feed on focus (bluesky-social#7139)
  Read storage on window.onstorage (bluesky-social#7137)
  [ELI5] Tweak wording on the signup screen (bluesky-social#7136)
  alf error screen (bluesky-social#7135)
  add safe area view to profile error screen (bluesky-social#7134)
  Adjust gates (bluesky-social#7132)
  disable automaticallAdjustsScrollIndicatorInsets (bluesky-social#7131)
  Bump more native deps (bluesky-social#7129)
  Update more Expo packages (bluesky-social#7127)
  feat: widen recent search profile link for mobile devices (bluesky-social#7119)
  Fix video uploads on native (bluesky-social#7126)
  Fix post time localization on Android (bluesky-social#6742)
  ...

# Conflicts:
#	src/view/com/profile/ProfileSubpageHeader.tsx
#	src/view/screens/ProfileList.tsx
  • Loading branch information
drash-course committed Dec 18, 2024
2 parents 3abeeed + 3262b83 commit e98df45
Show file tree
Hide file tree
Showing 219 changed files with 6,151 additions and 2,681 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copy this to `.env` and `.env.test` files

BITDRIFT_API_KEY=
SENTRY_AUTH_TOKEN=
EXPO_PUBLIC_ENV=development
EXPO_PUBLIC_LOG_LEVEL=debug
EXPO_PUBLIC_LOG_DEBUG=
EXPO_PUBLIC_BUNDLE_IDENTIFIER=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ jobs:
run: yarn intl:build
- name: Run tests
run: |
NODE_ENV=test EXPO_PUBLIC_ENV=test yarn test --forceExit
NODE_ENV=test yarn test --forceExit
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ build-web-embed: ## Compile web embed bundle, copy to bskyweb/embedr* directorie

.PHONY: test
test: ## Run all tests
NODE_ENV=test EXPO_PUBLIC_ENV=test yarn test
NODE_ENV=test yarn test

.PHONY: lint
lint: ## Run style checks and verify syntax
Expand Down
8 changes: 4 additions & 4 deletions __e2e__/flows/curate-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ appId: xyz.blueskyweb.app
- tapOn: "Save"
- assertNotVisible:
id: "createOrEditListModal"
- tapOn: "About"
- tapOn: "People"
- assertVisible: "Good Ppl"
- assertVisible: "They good"

Expand Down Expand Up @@ -93,10 +93,10 @@ appId: xyz.blueskyweb.app
- tapOn: "Save"
- assertNotVisible:
id: "createOrEditListModal"
- tapOn: "About"
- tapOn: "People"
- assertVisible: "Good Ppl"
- assertVisible: "They good"
- tapOn: "About"
- tapOn: "People"

- tapOn:
label: "Adds users on curatelists from the list"
Expand Down Expand Up @@ -145,7 +145,7 @@ appId: xyz.blueskyweb.app
id: "e2eGotoLists"
- tapOn: "Good Ppl"

- tapOn: "About"
- tapOn: "People"
- assertVisible:
label: "Removes users on curatelists from the list"
id: "user-bob.test"
Expand Down
24 changes: 8 additions & 16 deletions __e2e__/flows/feed-reorder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ appId: xyz.blueskyweb.app

# Pin alice's feed
- extendedWaitUntil:
visible:
id: "viewHeaderDrawerBtn"
- tapOn:
id: "viewHeaderDrawerBtn"
visible: "Open drawer menu"
- tapOn: "Open drawer menu"
- tapOn:
id: "profileCardButton"
- tapOn:
Expand All @@ -32,8 +30,7 @@ appId: xyz.blueskyweb.app
text: "alice-favs"

# Set alice-favs first
- tapOn:
id: "viewHeaderDrawerBtn"
- tapOn: "Open drawer menu"
- tapOn:
id: "menuItemButton-Feeds"
- tapOn:
Expand All @@ -44,8 +41,7 @@ appId: xyz.blueskyweb.app
- tapOn:
label: "Save button"
id: "saveChangesBtn"
- tapOn:
id: "viewHeaderDrawerBtn"
- tapOn: "Go back"
- assertVisible:
id: "homeScreenFeedTabs-selector-0"
text: "alice-favs"
Expand All @@ -54,8 +50,7 @@ appId: xyz.blueskyweb.app
text: "Following"

# Set following first
- tapOn:
id: "viewHeaderDrawerBtn"
- tapOn: "Open drawer menu"
- tapOn:
id: "menuItemButton-Feeds"
- tapOn:
Expand All @@ -66,8 +61,7 @@ appId: xyz.blueskyweb.app
- tapOn:
label: "Save button"
id: "saveChangesBtn"
- tapOn:
id: "viewHeaderDrawerBtn"
- tapOn: "Go back"
- assertVisible:
id: "homeScreenFeedTabs-selector-0"
text: "Following"
Expand All @@ -76,8 +70,7 @@ appId: xyz.blueskyweb.app
text: "alice-favs"

# Remove following
- tapOn:
id: "viewHeaderDrawerBtn"
- tapOn: "Open drawer menu"
- tapOn:
id: "menuItemButton-Feeds"
- tapOn:
Expand All @@ -88,8 +81,7 @@ appId: xyz.blueskyweb.app
- tapOn:
label: "Save button"
id: "saveChangesBtn"
- tapOn:
id: "viewHeaderDrawerBtn"
- tapOn: "Go back"
- assertVisible:
id: "homeScreenFeedTabs-selector-0"
text: "alice-favs"
Expand Down
4 changes: 3 additions & 1 deletion __e2e__/flows/home-screen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ appId: xyz.blueskyweb.app
- tapOn:
id: "bottomBarHomeBtn"
- tapOn:
id: "viewHeaderDrawerBtn"
id: "bottomBarHomeBtn"
- tapOn:
id: "bottomBarHomeBtn"
- assertNotVisible: "Feeds ✨"

- tapOn:
Expand Down
2 changes: 1 addition & 1 deletion __e2e__/flows/mod-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ appId: xyz.blueskyweb.app
id: "e2eGotoModeration"
- tapOn:
id: "moderationlistsBtn"
- tapOn: "New"
- tapOn: "New list"
- tapOn:
id: "editNameInput"
- inputText: "Muted Users"
Expand Down
2 changes: 2 additions & 0 deletions __e2e__/setupApp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ appId: xyz.blueskyweb.app
- waitForAnimationToEnd
- tapOn: "http://localhost:8081"
- waitForAnimationToEnd
- extendedWaitUntil:
visible: "Continue"
- swipe:
from: "Bluesky"
direction: DOWN
3 changes: 2 additions & 1 deletion app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ module.exports = function (config) {
*/
const PLATFORM = process.env.EAS_BUILD_PLATFORM

const IS_DEV = process.env.EXPO_PUBLIC_ENV === 'development'
const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
const IS_PRODUCTION = process.env.EXPO_PUBLIC_ENV === 'production'
const IS_DEV = !IS_TESTFLIGHT || !IS_PRODUCTION

const ASSOCIATED_DOMAINS = [
'applinks:bsky.app',
Expand Down Expand Up @@ -222,6 +222,7 @@ module.exports = function (config) {
},
],
'react-native-compressor',
'@bitdrift/react-native',
'./plugins/starterPackAppClipExtension/withStarterPackAppClip.js',
'./plugins/withAndroidManifestPlugin.js',
'./plugins/withAndroidManifestFCMIconPlugin.js',
Expand Down
1 change: 1 addition & 0 deletions assets/icons/pin_filled_stroke2_corner0_rounded.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion bskyembed/snippet/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ window.addEventListener('message', event => {
return
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const id = (event.data as {id: string}).id
if (!id) {
return
Expand All @@ -33,6 +34,7 @@ window.addEventListener('message', event => {
return
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const height = (event.data as {height: number}).height
if (height) {
embed.style.height = `${height}px`
Expand All @@ -47,7 +49,7 @@ window.addEventListener('message', event => {
* @returns
*/
function scan(node = document) {
const embeds = node.querySelectorAll('[data-bluesky-uri]')
const embeds = node.querySelectorAll<HTMLIFrameElement>('[data-bluesky-uri]')

for (let i = 0; i < embeds.length; i++) {
const id = String(Math.random()).slice(2)
Expand Down
17 changes: 17 additions & 0 deletions bskyembed/src/color-mode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export function applyTheme(theme: 'light' | 'dark') {
document.documentElement.classList.remove('light', 'dark')
document.documentElement.classList.add(theme)
}

export function initColorMode() {
applyTheme(
window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light',
)
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', mql => {
applyTheme(mql.matches ? 'dark' : 'light')
})
}
2 changes: 1 addition & 1 deletion bskyembed/src/components/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function Container({
return (
<div
ref={ref}
className="w-full bg-white hover:bg-neutral-50 relative transition-colors max-w-[600px] min-w-[300px] flex border rounded-xl"
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"
onClick={() => {
if (ref.current && href) {
// forwardRef requires preact/compat - let's keep it simple
Expand Down
34 changes: 20 additions & 14 deletions bskyembed/src/components/embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ export function Embed({
return (
<Link
href={`/profile/${record.author.did}/post/${getRkey(record)}`}
className="transition-colors hover:bg-neutral-100 border rounded-lg p-2 gap-1.5 w-full flex flex-col">
className="transition-colors hover:bg-neutral-100 dark:hover:bg-slate-700 border dark:border-slate-600 rounded-lg p-2 gap-1.5 w-full flex flex-col">
<div className="flex gap-1.5 items-center">
<div className="w-4 h-4 overflow-hidden rounded-full bg-neutral-300 shrink-0">
<div className="w-4 h-4 overflow-hidden rounded-full bg-neutral-300 dark:bg-slate-700 shrink-0">
<img
src={record.author.avatar}
style={isAuthorLabeled ? {filter: 'blur(1.5px)'} : undefined}
/>
</div>
<p className="line-clamp-1 text-sm">
<span className="font-bold">{record.author.displayName}</span>
<span className="text-textLight ml-1">
<span className="text-textLight dark:text-textDimmed ml-1">
@{record.author.handle}
</span>
</p>
Expand Down Expand Up @@ -209,7 +209,7 @@ function Info({children}: {children: ComponentChildren}) {
return (
<div className="w-full rounded-lg border py-2 px-2.5 flex-row flex gap-2 bg-neutral-50">
<img src={infoIcon} className="w-4 h-4 shrink-0 mt-0.5" />
<p className="text-sm text-textLight">{children}</p>
<p className="text-sm text-textLight dark:text-textDimmed">{children}</p>
</div>
)
}
Expand Down Expand Up @@ -308,7 +308,7 @@ function ExternalEmbed({
return (
<Link
href={content.external.uri}
className="w-full rounded-lg overflow-hidden border flex flex-col items-stretch"
className="w-full rounded-lg overflow-hidden border dark:border-slate-600 flex flex-col items-stretch"
disableTracking>
{content.external.thumb && (
<img
Expand All @@ -317,11 +317,11 @@ function ExternalEmbed({
/>
)}
<div className="py-3 px-4">
<p className="text-sm text-textLight line-clamp-1">
<p className="text-sm text-textLight dark:text-textDimmed line-clamp-1">
{toNiceDomain(content.external.uri)}
</p>
<p className="font-semibold line-clamp-3">{content.external.title}</p>
<p className="text-sm text-textLight line-clamp-2 mt-0.5">
<p className="text-sm text-textLight dark:text-textDimmed line-clamp-2 mt-0.5">
{content.external.description}
</p>
</div>
Expand All @@ -345,23 +345,29 @@ function GenericWithImageEmbed({
return (
<Link
href={href}
className="w-full rounded-lg border py-2 px-3 flex flex-col gap-2">
className="w-full rounded-lg border dark:border-slate-600 py-2 px-3 flex flex-col gap-2">
<div className="flex gap-2.5 items-center">
{image ? (
<img
src={image}
alt={title}
className="w-8 h-8 rounded-md bg-neutral-300 shrink-0"
className="w-8 h-8 rounded-md bg-neutral-300 dark:bg-slate-700 shrink-0"
/>
) : (
<div className="w-8 h-8 rounded-md bg-brand shrink-0" />
)}
<div className="flex-1">
<p className="font-bold text-sm">{title}</p>
<p className="text-textLight text-sm">{subtitle}</p>
<p className="text-textLight dark:text-textDimmed text-sm">
{subtitle}
</p>
</div>
</div>
{description && <p className="text-textLight text-sm">{description}</p>}
{description && (
<p className="text-textLight dark:text-textDimmed text-sm">
{description}
</p>
)}
</Link>
)
}
Expand Down Expand Up @@ -406,7 +412,7 @@ function StarterPackEmbed({
return (
<Link
href={starterPackHref}
className="w-full rounded-lg overflow-hidden border flex flex-col items-stretch">
className="w-full rounded-lg overflow-hidden border dark:border-slate-600 flex flex-col items-stretch">
<img src={imageUri} className="aspect-[1.91/1] object-cover" />
<div className="py-3 px-4">
<div className="flex space-x-2 items-center">
Expand All @@ -415,7 +421,7 @@ function StarterPackEmbed({
<p className="font-semibold leading-[21px]">
{content.record.name}
</p>
<p className="text-sm text-textLight line-clamp-2 leading-[18px]">
<p className="text-sm text-textLight dark:text-textDimmed line-clamp-2 leading-[18px]">
Starter pack by{' '}
{content.creator.displayName || `@${content.creator.handle}`}
</p>
Expand All @@ -425,7 +431,7 @@ function StarterPackEmbed({
<p className="text-sm mt-1">{content.record.description}</p>
)}
{!!content.joinedAllTimeCount && content.joinedAllTimeCount > 50 && (
<p className="text-sm font-semibold text-textLight mt-1">
<p className="text-sm font-semibold text-textLight dark:text-textDimmed mt-1">
{content.joinedAllTimeCount} users have joined!
</p>
)}
Expand Down
Loading

0 comments on commit e98df45

Please sign in to comment.