Skip to content

Commit

Permalink
fix(mobile): improve item separator background color
Browse files Browse the repository at this point in the history
Update ItemSeparator components in entry-list and subscription modules to use a secondary system grouped background, ensuring consistent visual styling across different list views.

Signed-off-by: Innei <[email protected]>
  • Loading branch information
Innei committed Feb 28, 2025
1 parent 7de1132 commit 84b44b3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
24 changes: 14 additions & 10 deletions apps/mobile/src/modules/entry-list/ItemSeparator.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
import { View } from "react-native"

const el = (
<View
className="bg-opaque-separator mx-4 h-px"
style={{ transform: [{ scaleY: 0.5 }] }}
collapsable={false}
/>
<View className="bg-secondary-system-grouped-background">
<View
className="bg-opaque-separator mx-4 h-px"
style={{ transform: [{ scaleY: 0.5 }] }}
collapsable={false}
/>
</View>
)

export const ItemSeparator = () => {
return el
}
const el2 = (
<View
className="bg-opaque-separator h-px w-full"
style={{ transform: [{ scaleY: 0.5 }] }}
collapsable={false}
/>
<View className="bg-secondary-system-grouped-background">
<View
className="bg-opaque-separator h-px w-full"
style={{ transform: [{ scaleY: 0.5 }] }}
collapsable={false}
/>
</View>
)
export const ItemSeparatorFullWidth = () => {
return el2
Expand Down
12 changes: 7 additions & 5 deletions apps/mobile/src/modules/subscription/ItemSeparator.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { View } from "react-native"

const el = (
<View
className="bg-opaque-separator ml-12 h-px flex-1"
collapsable={false}
style={{ transform: [{ scaleY: 0.5 }] }}
/>
<View className="bg-secondary-system-grouped-background">
<View
className="bg-opaque-separator ml-12 h-px flex-1"
collapsable={false}
style={{ transform: [{ scaleY: 0.5 }] }}
/>
</View>
)
export const ItemSeparator = () => {
return el
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/src/modules/subscription/SubscriptionLists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const SubscriptionList = ({ view }: { view: FeedViewType }) => {
setRefreshing(false)
})
}}
className="bg-system-grouped-background"
isRefetching={refreshing}
ItemSeparatorComponent={ItemSeparator}
data={data}
Expand Down

0 comments on commit 84b44b3

Please sign in to comment.