For any UI devs:

I’ve starting working on a lemmy front end called lemmy-ui-leptos using leptos, a Rust UI framework with isomorphic support, and tailwind + daisyUI for the component styling. This could eventually replace the frankenstein’s monster that lemmy-ui has become.

Some reasons for doing this:

  • lemmy-ui uses infernojs, which is based on the react model. IMO is largely superseded by signal-based reactivity in use in android jetpack-compose, SolidJS, and most new UI frameworks.
  • I had to hack on isomorphic support / server-side-rendering to infernoJS, and it’s very messy. Leptos has isomorphic support out of the box.
  • All the benefits of Rust over javascript.
    • Since leptos is in Rust, we can import the lemmy types directly.
    • I’ve been waiting for years for a good rust UI framework, and I think we’re finally here with leptos or sycamore.
  • lemmy-ui uses bootstrap, which is showing its age and limitations. Tailwind (and daisyUI) seem to be much more future-proof.

I plan on leaving the site design and component styling to other, more skilled UI devs, while I work mostly on the auth, services, params, and overall back-end structure.

  • Please use daisyUI classes tho whenever possible over exhaustive tailwind ones.
  • I’d also like it if the UI could match that of jerboa’s (whenever possible), so that a change in one could be represented in the other, and so that things like badge appearance for admins, could be recognizeable across lemmy’s front ends.

You don’t really need to learn rust to help out with this, as the components look very similar to JSX. Instructions for running it are in the CONTRIBUTING.md . Feel free to contribute!

Right now only the home page, and post pages are working, but ready to be styled.

  • rhymepurple@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 years ago

    I know the project may still be in its infancy, but are there any current/prospective screenshots or design files for this initiative? Even better - is a live demo available?

  • pedroapero@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    I’m struggling to get something done with this stack. This will certainly provide some inspiration, thanks!

  • tesfabpel@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 years ago

    lemmy-ui uses bootstrap, which is showing its age and limitations.

    We’re currently using bootstrap at work, why do you say so?
    I’m asking because it’s the first time I heard about Tailwind CSS and DaisyUI… 😅
    Aside from them creating a barebone .css for production, what advantages do they have against Bootstrap?

    • dinckel@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 years ago

      It has the same issue as pretty much any other CSS library from that era. It’s a gigantic bundle, with a gigantic list of patches applied to each object, which also expects you to have 100% satisfaction with what it provides out of the box. The moment you start ripping things out to customize something, it becomes a massive drag, at which point you could have just written plain CSS to begin with

    • Dessalines@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Check out the tailwind site examples for how much more versatile tailwind is over bootstrap sites.

  • wintermute@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 years ago

    Personally I 'd prefer windy over tailwind, also I wonder if there is any significant userbase behind leptos. Infernojs was already a strange choice in that matter, compared to e.g. vuejs.

    • morrowind@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      First thing on the windy site is that it’s shutting down. Pribay not a good idea to start adopting it now.

  • esscew@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    edit-2
    2 years ago

    why? You can codegen from rs to ts for types. I fully understand wanting to learn Rust or test frameworks. It’s a great language, but it feels like a huge risk to bet on an unproven framework (and currently proven to be slower WASM) as the future of front-end, especially when there are existing frameworks that would garner more support and expertise on the front-end.

  • Mostafa Ahangarha@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    2 years ago

    Moving to Tailwindcss make it hard to implement bidirectional text support unless we define new rules to use logical styles.