Skip to content

Commit 6f76bb5

Browse files
Merge pull request #272 from JaneliaSciComp/fix-dark-styles-in-file-selector
fix: dark styles in file selector and convert file dialog
2 parents 3c5975e + cb0bf13 commit 6f76bb5

File tree

5 files changed

+23
-13
lines changed

5 files changed

+23
-13
lines changed

frontend/src/components/ui/BrowsePage/BreadcrumbSegment.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ export default function BreadcrumbSegment({
3232
// Last segment is always non-clickable text
3333
return (
3434
<Typography
35-
className={`font-medium ${
36-
isFile ? 'text-primary-default italic' : 'text-primary-default'
37-
}`}
35+
className={`font-medium text-foreground ${isFile ? 'italic' : ''}`}
3836
>
3937
{label}
4038
</Typography>
@@ -58,7 +56,7 @@ export default function BreadcrumbSegment({
5856
// Callback-based navigation (for dialogs)
5957
<BreadcrumbLink as="button" onClick={onClick}>
6058
<Typography
61-
className="font-medium text-primary-light hover:text-primary-default"
59+
className="font-medium text-primary-light hover:underline focus:underline"
6260
variant="small"
6361
>
6462
{label}

frontend/src/components/ui/BrowsePage/FileSelector/FileSelectorButton.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ export default function FileSelectorButton({
106106
<div className="my-4 h-96">
107107
{zonesQuery.isPending ? (
108108
<div className="flex items-center justify-center h-full">
109-
<Spinner text="Loading zones..." />
109+
<Spinner
110+
text="Loading zones..."
111+
textClasses="text-foreground"
112+
/>
110113
</div>
111114
) : zonesQuery.isError ? (
112115
<div className="flex items-center justify-center h-full">
@@ -117,7 +120,10 @@ export default function FileSelectorButton({
117120
) : state.currentLocation.type === 'filesystem' &&
118121
fileQuery.isPending ? (
119122
<div className="flex items-center justify-center h-full">
120-
<Spinner text="Loading files..." />
123+
<Spinner
124+
text="Loading files..."
125+
textClasses="text-foreground"
126+
/>
121127
</div>
122128
) : state.currentLocation.type === 'filesystem' &&
123129
fileQuery.isError ? (

frontend/src/components/ui/BrowsePage/FileSelector/FileSelectorTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export default function FileSelectorTable({
143143
<tr className="border-b border-surface" key={headerGroup.id}>
144144
{headerGroup.headers.map(header => (
145145
<th
146-
className="text-left p-3 font-bold text-sm"
146+
className="text-left p-3 font-bold text-sm text-foreground"
147147
key={header.id}
148148
style={{ width: header.getSize() }}
149149
>
@@ -189,7 +189,7 @@ export default function FileSelectorTable({
189189
>
190190
{row.getVisibleCells().map(cell => (
191191
<td
192-
className="p-3 text-grey-700"
192+
className="p-3 text-grey-700 text-primary-light"
193193
key={cell.id}
194194
style={{ width: cell.column.getSize() }}
195195
>

frontend/src/components/ui/Dialogs/ConvertFile.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default function ConvertFileDialog({
103103
<div className="flex gap-2 items-center">
104104
<input
105105
autoFocus
106-
className="flex-1 p-2 text-foreground text-lg border border-primary-light rounded-sm focus:outline-none focus:border-primary bg-background disabled:cursor-not-allowed disabled:opacity-50"
106+
className="flex-1 p-2 text-foreground dark:placeholder:text-surface-light text-lg border border-primary-light rounded-sm focus:outline-none focus:border-primary bg-background disabled:cursor-not-allowed disabled:opacity-50"
107107
disabled={!tasksEnabled}
108108
id="destination_folder"
109109
onChange={(event: ChangeEvent<HTMLInputElement>) => {
@@ -143,7 +143,7 @@ export default function ConvertFileDialog({
143143
Output File or Folder Name
144144
</Typography>
145145
<input
146-
className="p-2 text-foreground text-lg border border-primary-light rounded-sm focus:outline-none focus:border-primary bg-background disabled:cursor-not-allowed disabled:opacity-50"
146+
className="p-2 text-foreground dark:placeholder:text-surface-light text-lg border border-primary-light rounded-sm focus:outline-none focus:border-primary bg-background disabled:cursor-not-allowed disabled:opacity-50"
147147
disabled={!tasksEnabled}
148148
id="output_filename"
149149
onChange={(event: ChangeEvent<HTMLInputElement>) => {
@@ -178,7 +178,11 @@ export default function ConvertFileDialog({
178178
type="submit"
179179
>
180180
{createTicketMutation.isPending || allTicketsQuery.isFetching ? (
181-
<Spinner customClasses="border-white" text="Processing..." />
181+
<Spinner
182+
customClasses="border-white"
183+
text="Processing..."
184+
textClasses="text-white"
185+
/>
182186
) : (
183187
'Submit'
184188
)}

frontend/src/components/ui/widgets/Loaders.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ import { Typography } from '@material-tailwind/react';
22

33
function Spinner({
44
customClasses,
5-
text
5+
text,
6+
textClasses
67
}: {
78
readonly customClasses?: string;
89
readonly text?: string;
10+
readonly textClasses?: string;
911
}) {
1012
return (
1113
<div className="flex items-center gap-2">
1214
<div
1315
className={`w-5 h-5 border-4 border-surface-foreground border-t-transparent rounded-full animate-spin ${customClasses}`}
1416
title="Loading spinner"
1517
/>
16-
<Typography>{text}</Typography>
18+
<Typography className={textClasses}>{text}</Typography>
1719
</div>
1820
);
1921
}

0 commit comments

Comments
 (0)