Skip to content

Commit

Permalink
refactor: improve UI clarity and consistency
Browse files Browse the repository at this point in the history
- Remove redundant CSV upload alert
- Add descriptive text to CSV information button
- Update delete all button styling
  • Loading branch information
ligsnf committed Dec 25, 2024
1 parent 463c256 commit 5130ced
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/components/csv/csv-information-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export function CSVInformationDialog() {
return (
<Dialog>
<DialogTrigger asChild>
<Button variant="outline" size="icon" className="min-w-10">
<Button variant="outline" className="min-w-10">
<Info className="text-primary" strokeWidth={2.5} />
<span className="hidden sm:inline">Import Results Guide</span>
</Button>
</DialogTrigger>
<DialogContent className="max-h-[80vh]">
Expand Down
4 changes: 2 additions & 2 deletions src/components/results/delete-all-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export function DeleteAllDialog({ onConfirm }: DeleteAllDialogProps) {
<AlertDialogTrigger asChild>
<Button
type="button"
variant="destructive"
className="opacity-80 h-8 px-2 md:h-10 md:px-3"
variant="outline"
className="border-destructive text-destructive hover:text-destructive h-8 px-2 md:h-10 md:px-3"
>
<X strokeWidth={3} />
</Button>
Expand Down
6 changes: 2 additions & 4 deletions src/routes/index.lazy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import { calculateWAM, calculateGPA, calculateTotalCredits } from "@/lib/calcula
import { ProcessingResult } from '@/lib/csv-parser'

import { StatCard } from "@/components/stat-card"
import { CSVUploadAlert } from "@/components/csv/csv-upload-alert"
import { CSVUploadDialog } from '@/components/csv/csv-upload-dialog'
import { CSVInformationDialog } from '@/components/csv/csv-information-dialog'
import { CSVUploadDialog } from '@/components/csv/csv-upload-dialog'
import { ResultTable } from "@/components/results/result-table"
import { Button } from "@/components/ui/button"
import {
Expand Down Expand Up @@ -159,13 +158,12 @@ function Index() {
<span className="font-mono font-semibold text-lg sm:text-xl">{totalCredits}</span>
</div>
<div className="flex items-center gap-2">
<CSVUploadAlert className="hidden md:flex" />
<CSVInformationDialog />
<CSVUploadDialog
onCSVUpload={handleCSVUpload}
open={uploadDialogOpen}
onOpenChange={setUploadDialogOpen}
/>
<CSVInformationDialog />
</div>
</div>
</CardHeader>
Expand Down

0 comments on commit 5130ced

Please sign in to comment.