Skip to content

Commit 2eaff08

Browse files
chore(lint): keep mobile theme escape-hatch allowlist honest (pingdotgg#13146)
1 parent 96c4bfa commit 2eaff08

3 files changed

Lines changed: 3 additions & 17 deletions

File tree

‎apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ export function ThreadFilesTreeScreen(props: ThreadFilesRouteScreenProps) {
417417
const { fileInspector, layout, showAuxiliaryPane } = useAdaptiveWorkspaceLayout();
418418
const [searchQuery, setSearchQuery] = useState("");
419419
const { themeAppearance: highlightTheme } = useAppearancePreferences();
420-
const headerColor = useUniwindTheme()["--color-header"];
421420
const { cwd, environmentId, projectName, selectedThread, threadId } = useThreadFilesWorkspace(
422421
props.route.params,
423422
);
@@ -554,13 +553,7 @@ export function ThreadFilesTreeScreen(props: ThreadFilesRouteScreenProps) {
554553
</>
555554
);
556555

557-
return Platform.OS === "android" ? (
558-
<View className="flex-1" style={{ backgroundColor: headerColor }}>
559-
{content}
560-
</View>
561-
) : (
562-
content
563-
);
556+
return Platform.OS === "android" ? <View className="flex-1 bg-header">{content}</View> : content;
564557
}
565558

566559
export function ThreadFileScreen(props: ThreadFileRouteScreenProps) {

‎apps/mobile/src/features/settings/appearance/components/AppearancePreviews.tsx‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
resolveMarkdownFontSizes,
66
resolveMobileCodeSurface,
77
} from "../../../../lib/appearancePreferences";
8-
import { useUniwindTheme } from "../../../../lib/useUniwindTheme";
98
import { getMobileTerminalTheme } from "../../../terminal/terminalTheme";
109
import { useAppearancePreferences } from "../AppearancePreferencesProvider";
1110

@@ -138,16 +137,12 @@ export function CodeAppearancePreview(props: {
138137
readonly wordBreak: boolean;
139138
}) {
140139
const surface = resolveMobileCodeSurface(props.fontSize);
141-
const theme = useUniwindTheme();
142-
const lineNumberColor = theme["--color-icon-subtle"];
143-
const keywordColor = theme["--color-md-link"];
144140

145141
const lineNumber = (line: CodePreviewLine, index: number) => (
146142
<Text
147-
className="text-right"
143+
className="text-right text-icon-subtle"
148144
key={line.id}
149145
style={{
150-
color: lineNumberColor,
151146
fontFamily: CODE_FONT_FAMILY,
152147
fontSize: surface.lineNumberFontSize,
153148
lineHeight: surface.rowHeight,
@@ -172,8 +167,8 @@ export function CodeAppearancePreview(props: {
172167
{line.tokens.map((token) => (
173168
<Text
174169
key={token.text}
170+
className={token.keyword ? "text-md-link" : undefined}
175171
style={{
176-
color: token.keyword ? keywordColor : undefined,
177172
fontFamily: CODE_FONT_FAMILY,
178173
fontSize: surface.fontSize,
179174
lineHeight: surface.rowHeight,

‎vite.config.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,13 @@ export default defineConfig({
215215
"apps/mobile/src/features/connection/ConnectionsNewRouteScreen.tsx",
216216
"apps/mobile/src/features/files/FileMarkdownPreview.tsx",
217217
"apps/mobile/src/features/files/SourceFileSurface.tsx",
218-
"apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx",
219218
"apps/mobile/src/features/files/AttachmentFileScreen.tsx",
220219
"apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx",
221220
"apps/mobile/src/features/files/thread-file-navigator-pane.tsx",
222221
"apps/mobile/src/features/home/HomeHeader.tsx",
223222
"apps/mobile/src/features/review/ReviewSheet.tsx",
224223
"apps/mobile/src/features/review/useNativeReviewDiffBridge.ts",
225224
"apps/mobile/src/features/settings/SettingsEnvironmentsRouteScreen.tsx",
226-
"apps/mobile/src/features/settings/appearance/components/AppearancePreviews.tsx",
227225
"apps/mobile/src/features/threads/GitActionProgressOverlay.tsx",
228226
"apps/mobile/src/features/threads/NewTaskDraftScreen.tsx",
229227
"apps/mobile/src/features/threads/ThreadComposer.tsx",

0 commit comments

Comments
 (0)