Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions components/Package/CodeBrowser/CodeBrowserFileRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,19 @@ 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 = (
<>
{isDirectory ? (
<ArrowIcon
style={[
tw`size-2.5 shrink-0 text-palette-gray4 dark:text-palette-gray5`,
isHovered && tw`opacity-70`,
isCollapsed ? tw`rotate-90` : tw`rotate-270`,
]}
/>
Expand All @@ -68,18 +71,16 @@ export default function CodeBrowserFileRow({
]}>
{label}
</P>
{hasTrailingContent && (
{warning && (
<View style={tw`ml-auto flex-row items-center gap-1.5`}>
{warning && (
<Tooltip
trigger={
<View>
<WarningBlockquoteIcon style={tw`size-3.5 text-warning-dark dark:text-warning`} />
</View>
}>
<P style={tw`text-[12px] font-light`}>{warning.message}</P>
</Tooltip>
)}
<Tooltip
trigger={
<View>
<WarningBlockquoteIcon style={tw`size-3.5 text-warning-dark dark:text-warning`} />
</View>
}>
<span className="text-[12px]">{warning.message}</span>
</Tooltip>
</View>
)}
</>
Expand Down
3 changes: 2 additions & 1 deletion styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
--warning-light: #fef7d6;
--warning-dark: #995e00;
--warning-border: #995e0044;
--warning-dark-bg: #995e0022;

--error: #ff5555;
--success: #4caf50;
Expand Down Expand Up @@ -109,6 +110,7 @@
--warning: #9a720c;
--warning-light: #2f2304;
--warning-border: #9a720c44;
--warning-dark-bg: #9a720c16;

--background: #19191f;
--border: var(--accented);
Expand Down Expand Up @@ -833,7 +835,6 @@ select {
#codeBrowserList {
background-color: var(--table-alt-row);
scrollbar-color: var(--icon) var(--gray-1);
scrollbar-gutter: stable;
}

#markdownContentWrapper {
Expand Down
4 changes: 2 additions & 2 deletions util/codeBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down