Skip to content

Commit

Permalink
Fix border on some listing screens (#5115)
Browse files Browse the repository at this point in the history
* Fix border on PostQuotes, add debug atom

* Add util_screen_outer, apply to h_full_vh here needed
  • Loading branch information
estrattonbailey authored Sep 3, 2024
1 parent 5c2e9f0 commit ddda612
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
20 changes: 19 additions & 1 deletion src/alf/atoms.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import {Platform, StyleSheet} from 'react-native'
import {Platform, StyleSheet, ViewStyle} from 'react-native'

import * as tokens from '#/alf/tokens'
import {native, web} from '#/alf/util/platform'

export const atoms = {
debug: {
borderColor: 'red',
borderWidth: 1,
},

/*
* Positioning
*/
Expand Down Expand Up @@ -55,6 +60,19 @@ export const atoms = {
height: '100vh',
}),

/**
* Used for the outermost components on screens, to ensure that they can fill
* the screen and extend beyond.
*/
util_screen_outer: [
web({
minHeight: '100vh',
}),
native({
height: '100%',
}),
] as ViewStyle,

/*
* Theme-independent bg colors
*/
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Post/PostLikedBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const PostLikedByScreen = ({route}: Props) => {
)

return (
<CenteredView style={a.h_full_vh} sideBorders={true}>
<CenteredView style={a.util_screen_outer} sideBorders={true}>
<ListHeaderDesktop title={_(msg`Liked By`)} />
<ViewHeader title={_(msg`Liked By`)} showBorder={!isWeb} />
<PostLikedByComponent uri={uri} />
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Post/PostQuotes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const PostQuotesScreen = ({route}: Props) => {
)

return (
<CenteredView style={a.h_full_vh} sideBorders={true}>
<CenteredView style={a.util_screen_outer} sideBorders={true}>
<ListHeaderDesktop title={_(msg`Quotes`)} />
<ViewHeader title={_(msg`Quotes`)} showBorder={!isWeb} />
<PostQuotesComponent uri={uri} />
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Post/PostRepostedBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const PostRepostedByScreen = ({route}: Props) => {
)

return (
<CenteredView style={a.h_full_vh} sideBorders={true}>
<CenteredView style={a.util_screen_outer} sideBorders={true}>
<ListHeaderDesktop title={_(msg`Reposted By`)} />
<ViewHeader title={_(msg`Reposted By`)} showBorder={!isWeb} />
<PostRepostedByComponent uri={uri} />
Expand Down
2 changes: 1 addition & 1 deletion src/view/screens/ProfileFollowers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const ProfileFollowersScreen = ({route}: Props) => {
)

return (
<CenteredView style={a.h_full_vh} sideBorders={true}>
<CenteredView style={a.util_screen_outer} sideBorders={true}>
<ListHeaderDesktop title={_(msg`Followers`)} />
<ViewHeader title={_(msg`Followers`)} showBorder={!isWeb} />
<ProfileFollowersComponent name={name} />
Expand Down
2 changes: 1 addition & 1 deletion src/view/screens/ProfileFollows.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const ProfileFollowsScreen = ({route}: Props) => {
)

return (
<CenteredView style={a.h_full_vh} sideBorders={true}>
<CenteredView style={a.util_screen_outer} sideBorders={true}>
<ListHeaderDesktop title={_(msg`Following`)} />
<ViewHeader title={_(msg`Following`)} showBorder={!isWeb} />
<ProfileFollowsComponent name={name} />
Expand Down

0 comments on commit ddda612

Please sign in to comment.