autofires
autofires
DDeno
Created by anggoran on 4/30/2024 in #help
Writing CSS in Fresh
Sometimes improving processes requires learning up front for a longer term payoff (see Typescript). But Tailwind is very basic compared to something like Typescript (but no less valuable in Web). If you have a CSS background once you see the mapping patterns you’ll rarely need the docs. I reference them mainly to teach me CSS features (picking up the listed Native CSS as a side effect). In my experience far more effort was wasted fixing issues and learning patterns & strategies to mitigate the maintenance nightmare that is CSS at scale (BEM etc). JSX elements that have a lot of TW classes are trivially easy to understand and maintain, if not it’s a sign the component is doing too many things. Large sites take a long time to pivot and Tailwind is relatively new (most Websites are still PHP!). Just try it see if it clicks. It does for everyone I teach (experienced Web Dev or not).
10 replies
DDeno
Created by anggoran on 4/30/2024 in #help
Writing CSS in Fresh
Honestly you should really give Tailwind another chance. From what I read most people hate the idea of it, then use it and can’t live without it. React/Preact is modelled around the “Separation of Concerns” model where “Component” is that separation area. You already co-locate structure and behaviour in a component, excluding styles from this encapsulation is just going to lead to more long-term friction. And Tailwind is one of the best solutions for co-locating styles right within structure.
10 replies
DDeno
Created by avem on 12/3/2024 in #help
Worried about cold start
Distance between DB server and Web Server is an issue for all Edge hosting approaches (not Deno deploy specifically). One solution is a colocated/replicated data store (e.g Deno KV).
12 replies
DDeno
Created by anggoran on 4/14/2024 in #help
Partial with Forms
No worries, appreciate you’re a one man band going over and above at the moment! I’m sure I can do something clever with islands in the mean time.
15 replies
DDeno
Created by anggoran on 4/14/2024 in #help
Partial with Forms
Are there any non-island reliant patterns for demonstrating a post is ongoing to the user? As it’s a background action there’s no obvious browser loading behaviours so it can be a bit confusing to users. Apparently hx-indicator is how this problem is handled in HTMX https://htmx.org/attributes/hx-indicator/
15 replies
DDeno
Created by anggoran on 4/14/2024 in #help
Partial with Forms
I don’t think it’s mentioned in the docs (yet), but make sure your partial route for the form POST also has a GET handler redirecting back to original page or you’ll get odd behaviours (in dev anyway). The partial form post url isn’t “hidden” in the same way as it is with partial nav on anchor tags. Possibly just an issue during dev watch mode when a change will kick off a reload of the partial url as a page.
15 replies