diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index b8028c5ce..7e93d2a2d 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -69,6 +69,30 @@ const emit = defineEmits(["routeToName"]); useRouteToName(emit); ``` +### Breakpoints + +activist uses Tailwind for CSS, and some parts of components will be conditionally rendered based on Tailwind breakpoints, but we want to avoid using it to show and hide whole components. The reason for this is that using CSS in this way means that unneeded TypeScript for the hidden components will still run on page load. Please use `useBreakpoint` for all conditional rendering of full components. + +- ✅ No TS ran: + + ```vue + + + + ``` +- ❌ TS still ran: + + ```vue + + ``` + ## TypeScript [`⇧`](#contents) diff --git a/frontend/components/card/CardTextEntry.vue b/frontend/components/card/CardTextArea.vue similarity index 90% rename from frontend/components/card/CardTextEntry.vue rename to frontend/components/card/CardTextArea.vue index 341ef0ae3..221994e8a 100644 --- a/frontend/components/card/CardTextEntry.vue +++ b/frontend/components/card/CardTextArea.vue @@ -8,9 +8,9 @@ {{ description }}

- + - +