From fda4aabd276b83fbf5917c3232db8f0237424c59 Mon Sep 17 00:00:00 2001 From: Luke Weaver Date: Fri, 29 May 2026 15:29:40 -0400 Subject: [PATCH 1/6] Fix blog post being out of order with keyboard navigation --- package-lock.json | 19 +------------------ src/private-problems | 2 +- src/routes/root.tsx | 6 ++++-- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71532dc9..b370adb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4861,7 +4861,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", "@typescript-eslint/scope-manager": "5.62.0", @@ -17975,23 +17974,6 @@ } } }, - "node_modules/tailwindcss/node_modules/yaml": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.4.tgz", - "integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==", - "license": "ISC", - "optional": true, - "peer": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14.6" - }, - "funding": { - "url": "https://github.com/sponsors/eemeli" - } - }, "node_modules/tapable": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", @@ -18408,6 +18390,7 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "license": "(MIT OR CC0-1.0)", + "peer": true, "engines": { "node": ">=10" }, diff --git a/src/private-problems b/src/private-problems index c13d814d..2f120490 160000 --- a/src/private-problems +++ b/src/private-problems @@ -1 +1 @@ -Subproject commit c13d814d60ea7d14c2c84b5a44b95e421c3405c0 +Subproject commit 2f12049087e1f5470f60aca905108ef1bf7ed5ce diff --git a/src/routes/root.tsx b/src/routes/root.tsx index 7d96aff0..1c7bbb1a 100644 --- a/src/routes/root.tsx +++ b/src/routes/root.tsx @@ -18,6 +18,8 @@ import AppHeader from '../components/layout/AppHeader'; import sortProblems from '../utils/sortProblems'; import { categorizeCategories } from '../utils/categorizeCategories'; import { getCategoryListOrdered } from '../utils/getCategoryListOrdered'; +import getBlogCategory from '../utils/blogs/getBlogCategory'; +import { getOrderedBlogPosts } from '../utils/blogs/getOrderedBlogPosts'; export default function App() { const problems = useLoaderData() as Problem[]; @@ -203,12 +205,12 @@ export default function App() { else { if (activeCategory === 'blogs') { // navigating through blog posts - const blogSlugs = searchedBlogs + const blogSlugs = getOrderedBlogPosts(searchedBlogs .filter(b => { // filters by selectedTab if there are any return availableTabs.length > 0 && b.meta.category === selectedTab.toLowerCase(); - }) + })) .map(b => b.meta.blog_slug); // up / down selects blog post if (event.key === "ArrowUp") { From 717da5cc08416a8bfe45e4b1bd7a78231a8ff860 Mon Sep 17 00:00:00 2001 From: Luke Weaver Date: Fri, 29 May 2026 15:40:55 -0400 Subject: [PATCH 2/6] Add some sign-posting for keybinds --- src/components/layout/MainLayout.tsx | 5 ++++- src/components/layout/SidebarDrawer.tsx | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/layout/MainLayout.tsx b/src/components/layout/MainLayout.tsx index 93e76d2a..51e2121b 100644 --- a/src/components/layout/MainLayout.tsx +++ b/src/components/layout/MainLayout.tsx @@ -16,6 +16,7 @@ export default function MainLayout({ openDrawer, children }: Props) { width: '6em', cursor: 'pointer', alignItems: 'center', + justifyContent: 'center', position: 'relative', '&::after': { content: '""', @@ -35,7 +36,9 @@ export default function MainLayout({ openDrawer, children }: Props) { }} className="desktop-bar" onClick={() => openDrawer()} - /> + > + (Ctrl + D) + {children} diff --git a/src/components/layout/SidebarDrawer.tsx b/src/components/layout/SidebarDrawer.tsx index b780cbca..baba26da 100644 --- a/src/components/layout/SidebarDrawer.tsx +++ b/src/components/layout/SidebarDrawer.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Drawer, ModalClose, DialogTitle, DialogContent, Select, Option, Stack, Box, Button } from '@mui/joy'; +import { Drawer, ModalClose, DialogTitle, DialogContent, Select, Option, Stack, Box, Button, Typography } from '@mui/joy'; import CategoryList from '../CategoryList'; import CustomSearch from '../ProblemSearch'; import ProblemList from '../ProblemList'; @@ -52,7 +52,8 @@ export default function SidebarDrawer({ Coding Cat - + + Use the Arrow Keys to navigate and Enter to select