diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..78accc5f --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,4 @@ + +## 2024-10-21 - Native Search Inputs for Better UX +**Learning:** Using `type="search"` instead of `type="text"` or omitting the type for search inputs natively triggers specialized mobile search keyboards (with "Search" or "Go" buttons instead of "Return") and provides built-in browser features like the clear ("x") button without requiring custom JavaScript or CSS. +**Action:** Always apply the `type="search"` attribute to inputs meant for filtering or searching lists, especially since this application features hardware catalogues likely to be searched from mobile devices on-the-go. diff --git a/src/pages/hardware.tsx b/src/pages/hardware.tsx index 8edea871..532e24e2 100644 --- a/src/pages/hardware.tsx +++ b/src/pages/hardware.tsx @@ -18,6 +18,7 @@ export default function HardwareCatalogue() {

{t("catalogue")}

setSearch(event.target.value)} diff --git a/src/pages/internal/hardware.tsx b/src/pages/internal/hardware.tsx index 559e3f8d..0093d647 100644 --- a/src/pages/internal/hardware.tsx +++ b/src/pages/internal/hardware.tsx @@ -56,6 +56,7 @@ export default function HardwareDesk() {

{t("inventory")}

)}