From 681740f9ee279a7acb3bcc5fef82da07d5c82a2f Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Mon, 14 Sep 2026 15:49:34 +0200 Subject: [PATCH 1/2] small tweaks for package CodeBrowser tree --- .../CodeBrowser/CodeBrowserFileRow.tsx | 27 ++++++++++--------- styles/styles.css | 3 ++- util/codeBrowser.ts | 4 +-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/components/Package/CodeBrowser/CodeBrowserFileRow.tsx b/components/Package/CodeBrowser/CodeBrowserFileRow.tsx index 0f148ff83..36fe4be82 100644 --- a/components/Package/CodeBrowser/CodeBrowserFileRow.tsx +++ b/components/Package/CodeBrowser/CodeBrowserFileRow.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { Pressable, View } from 'react-native'; -import { P } from '~/common/styleguide'; +import { Label, P } from '~/common/styleguide'; import { ArrowIcon, WarningBlockquoteIcon } from '~/components/Icons'; import { Tooltip } from '~/components/Tooltip'; import { getDirectoryWarning, getFileWarning } from '~/util/codeBrowser'; @@ -34,9 +34,11 @@ export default function CodeBrowserFileRow({ const rowStyle = [ tw`flex flex-row items-center gap-1.5 px-3 py-[3px] last:mb-20`, isDirectory && tw`pl-1.5`, + warning && { + backgroundImage: 'linear-gradient(45deg, transparent 80%, var(--warning-dark-bg) 95%)', + }, { paddingLeft: (isNested ? 6 : 10) + depth * 8 }, ]; - const hasTrailingContent = warning != null || isDirectory; const content = ( <> @@ -44,6 +46,7 @@ export default function CodeBrowserFileRow({ @@ -68,18 +71,16 @@ export default function CodeBrowserFileRow({ ]}> {label}

- {hasTrailingContent && ( + {warning && ( - {warning && ( - - - - }> -

{warning.message}

- - )} + + + + }> + {warning.message} + )} diff --git a/styles/styles.css b/styles/styles.css index 13630f3f9..ac38f1bfd 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -64,6 +64,7 @@ --warning-light: #fef7d6; --warning-dark: #995e00; --warning-border: #995e0044; + --warning-dark-bg: #995e0022; --error: #ff5555; --success: #4caf50; @@ -109,6 +110,7 @@ --warning: #9a720c; --warning-light: #2f2304; --warning-border: #9a720c44; + --warning-dark-bg: #9a720c16; --background: #19191f; --border: var(--accented); @@ -833,7 +835,6 @@ select { #codeBrowserList { background-color: var(--table-alt-row); scrollbar-color: var(--icon) var(--gray-1); - scrollbar-gutter: stable; } #markdownContentWrapper { diff --git a/util/codeBrowser.ts b/util/codeBrowser.ts index acc8ebe5a..d15c26220 100644 --- a/util/codeBrowser.ts +++ b/util/codeBrowser.ts @@ -40,7 +40,7 @@ export const IMAGE_FILES = ['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'ico']; export const FILE_WARNINGS = [ { - message: 'This file should not be part of the bundle and can be safely ignored.', + message: 'This file probably should not be part of the bundle and can be safely ignored.', fileNames: [ '*.iml', '*.keystore', @@ -109,7 +109,7 @@ export const FILE_WARNINGS = [ export const DIRECTORY_WARNINGS = [ { - message: 'This directory should not be part of the bundle and can be safely ignored.', + message: 'This directory probably should not be part of the bundle and can be safely ignored.', fileNames: [ '.github', '.gradle', From 9937ac45f186baf2bc4d5c4dc0dc15d05bec1a5a Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Mon, 14 Sep 2026 15:53:51 +0200 Subject: [PATCH 2/2] fix lint --- components/Package/CodeBrowser/CodeBrowserFileRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Package/CodeBrowser/CodeBrowserFileRow.tsx b/components/Package/CodeBrowser/CodeBrowserFileRow.tsx index 36fe4be82..90e9bdcde 100644 --- a/components/Package/CodeBrowser/CodeBrowserFileRow.tsx +++ b/components/Package/CodeBrowser/CodeBrowserFileRow.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { Pressable, View } from 'react-native'; -import { Label, P } from '~/common/styleguide'; +import { P } from '~/common/styleguide'; import { ArrowIcon, WarningBlockquoteIcon } from '~/components/Icons'; import { Tooltip } from '~/components/Tooltip'; import { getDirectoryWarning, getFileWarning } from '~/util/codeBrowser';