Made ctrl shortcut go straight to typing.

This commit is contained in:
2026-01-30 14:00:53 -06:00
parent e4f52e4b9f
commit 266f6eeb4e
6 changed files with 24 additions and 14 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ interface NavItem {
const navItems: NavItem[] = [ const navItems: NavItem[] = [
{ icon: ListTodo, label: "Focus", view: "critical" }, { icon: ListTodo, label: "Focus", view: "critical" },
{ icon: Clock, label: "Time", view: "urgency" }, { icon: Clock, label: "Time", view: "urgency" },
{ icon: ArrowUpCircle, label: "Impact", view: "priority" }, { icon: ArrowUpCircle, label: "Priority", view: "priority" },
{ icon: LayoutDashboard, label: "Matrix", view: "matrix" }, { icon: LayoutDashboard, label: "Matrix", view: "matrix" },
{ icon: Settings, label: "Settings", view: "settings" }, { icon: Settings, label: "Settings", view: "settings" },
]; ];
+15 -3
View File
@@ -32,11 +32,23 @@ export const QuickEntry: Component = () => {
// Explicit date string for the input (YYYY-MM-DDTHH:mm) // Explicit date string for the input (YYYY-MM-DDTHH:mm)
const [dateString, setDateString] = createSignal<string>(""); const [dateString, setDateString] = createSignal<string>("");
let inputRef: HTMLInputElement | undefined;
createEffect(() => {
if (isOpen()) {
// Slight delay to ensure DOM is ready and animations don't interfere
setTimeout(() => inputRef?.focus(), 50);
}
});
const handleKeyDown = (e: KeyboardEvent) => { const handleKeyDown = (e: KeyboardEvent) => {
if ((e.metaKey || e.ctrlKey) && e.key === "k") { if ((e.metaKey || e.ctrlKey) && e.key === "k") {
e.preventDefault(); e.preventDefault();
setIsOpen(true); if (isOpen()) {
inputRef?.focus();
} else {
setIsOpen(true);
}
} }
if (e.key === "Escape") { if (e.key === "Escape") {
setIsOpen(false); setIsOpen(false);
@@ -142,7 +154,7 @@ export const QuickEntry: Component = () => {
<Search class="text-muted-foreground mr-3" size={20} /> <Search class="text-muted-foreground mr-3" size={20} />
<TextField class="flex-1"> <TextField class="flex-1">
<TextFieldInput <TextFieldInput
autofocus ref={inputRef}
value={input()} value={input()}
onInput={(e) => setInput(e.currentTarget.value)} onInput={(e) => setInput(e.currentTarget.value)}
onKeyDown={(e) => e.key === "Enter" && parseAndAdd()} onKeyDown={(e) => e.key === "Enter" && parseAndAdd()}
@@ -154,7 +166,7 @@ export const QuickEntry: Component = () => {
<div class="flex flex-col md:flex-row items-stretch md:items-center p-4 gap-4 border-b border-border bg-muted/10"> <div class="flex flex-col md:flex-row items-stretch md:items-center p-4 gap-4 border-b border-border bg-muted/10">
<div class="flex-1 space-y-1.5"> <div class="flex-1 space-y-1.5">
<label class="text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1">Priority (Impact)</label> <label class="text-[10px] font-bold uppercase tracking-wider text-muted-foreground ml-1">Priority</label>
<Select <Select
value={priority()} value={priority()}
onChange={(val) => val && setPriority(val)} onChange={(val) => val && setPriority(val)}
+5 -7
View File
@@ -1,7 +1,7 @@
import { type Component, createMemo } from "solid-js"; import { type Component, createMemo } from "solid-js";
import { type Task, toggleTask, calculateUrgencyFromDate, setActiveTaskId } from "@/store"; import { type Task, toggleTask, calculateUrgencyFromDate, setActiveTaskId } from "@/store";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { CheckCircle2, Circle, Clock } from "lucide-solid"; import { CheckCircle2, Circle, Clock, ArrowUpCircle } from "lucide-solid";
export const TaskCard: Component<{ task: Task }> = (props) => { export const TaskCard: Component<{ task: Task }> = (props) => {
const urgencyLevel = createMemo(() => calculateUrgencyFromDate(props.task.dueDate)); const urgencyLevel = createMemo(() => calculateUrgencyFromDate(props.task.dueDate));
@@ -46,12 +46,10 @@ export const TaskCard: Component<{ task: Task }> = (props) => {
{props.task.title} {props.task.title}
</h3> </h3>
<div class="flex items-center space-x-4 mt-1"> <div class="flex items-center space-x-4 mt-1">
{/* Priority (Impact) */} {/* Priority */}
<div class="flex items-center space-x-1.5 text-xs text-muted-foreground font-medium"> <div class="flex items-center gap-1.5 min-w-[32px]">
<div class="w-2 h-2 rounded-full bg-primary/20 flex items-center justify-center"> <ArrowUpCircle size={12} class="text-primary opacity-60" />
<div class="w-1 h-1 rounded-full bg-primary" /> <span>P{props.task.priority}</span>
</div>
<span>Impact {props.task.priority}</span>
</div> </div>
{/* Due Date + Urgency Slide-out */} {/* Due Date + Urgency Slide-out */}
+1 -1
View File
@@ -98,7 +98,7 @@ export const TaskDetail: Component<TaskDetailProps> = (props) => {
<div class="flex flex-row items-center gap-1.5 sm:gap-4 mt-2 text-sm overflow-x-auto no-scrollbar flex-nowrap"> <div class="flex flex-row items-center gap-1.5 sm:gap-4 mt-2 text-sm overflow-x-auto no-scrollbar flex-nowrap">
{/* Priority */} {/* Priority */}
<div class="flex items-center gap-1 group shrink-0"> <div class="flex items-center gap-1 group shrink-0">
<span class="text-[10px] uppercase font-bold tracking-wider text-muted-foreground/70 hidden sm:inline">Impact</span> <span class="text-[10px] uppercase font-bold tracking-wider text-muted-foreground/70 hidden sm:inline">Priority</span>
<Select <Select
value={props.task.priority.toString()} value={props.task.priority.toString()}
onChange={(val) => val && updatePriority(val)} onChange={(val) => val && updatePriority(val)}
+1 -1
View File
@@ -12,7 +12,7 @@ export const MatrixView: Component = () => {
<div class="h-[calc(100vh-12rem)] md:h-[calc(100vh-8rem)] flex flex-col"> <div class="h-[calc(100vh-12rem)] md:h-[calc(100vh-8rem)] flex flex-col">
<header class="mb-6"> <header class="mb-6">
<h2 class="text-3xl font-bold tracking-tight">Strategy Matrix</h2> <h2 class="text-3xl font-bold tracking-tight">Strategy Matrix</h2>
<p class="text-muted-foreground mt-1 text-lg">Urgency vs Impact mapping.</p> <p class="text-muted-foreground mt-1 text-lg">Urgency vs Priority mapping.</p>
</header> </header>
<div class="flex-1 relative border-2 border-dashed border-muted rounded-3xl overflow-hidden bg-muted/20"> <div class="flex-1 relative border-2 border-dashed border-muted rounded-3xl overflow-hidden bg-muted/20">
+1 -1
View File
@@ -16,7 +16,7 @@ export const PriorityView: Component = () => {
return ( return (
<div class="space-y-6"> <div class="space-y-6">
<header> <header>
<h2 class="text-3xl font-bold tracking-tight">Impact</h2> <h2 class="text-3xl font-bold tracking-tight">Priority</h2>
<p class="text-muted-foreground mt-1 text-lg">Your tasks ordered by priority.</p> <p class="text-muted-foreground mt-1 text-lg">Your tasks ordered by priority.</p>
</header> </header>