lemmynet / lemmy-ui-leptos Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
in a previous code review @dessalines mentioned that name-spacing did not turn out well for a previous UI project:
https://github.com/LemmyNet/lemmy-ui-leptos/pull/20/files#r1346348901
just wanted to highlight this so we can come to a consensus openly
I use an Arch spin as my daily driver, and playwright tests are not supported on that platform. This makes it impossible for me to run tests locally. We definitely want end to ends tests to make sure we don't introduce regressions. There are docs for running playwright in docker, which seems like the most obvious viable option.
Opening an issue from this discussion as promised.
For simplicity, I didn't list every file that exists in the project. Some things to call out:
mod.rs
strewn throughout the codebase.login_form.rs
and get_post.rs
, a component and serverfn respectively, listed above)There are some things I'm still not sure of in this suggestion. For example, in this hierarchy, several serverfns (e.g. vote, save, etc.) are only relevant to one or a few components (vote buttons, content actions). It arguably makes more sense to colocate these with the relevant components instead of throwing them in the common serverfns directory. A similar case can be made for colocating the navbars and the logout serverfn with the BaseLayout
since they're only ever used there. If we did do this approach, I could see a hierarchy like:
Or perhaps:
Thoughts?
Now that there is a rust library specifically for making requests for lemmy, it makes sense to shift to using that instead of the hand-spun one currently used in this repo.
Hello! I've been learning Rust for the last couple of years and just so happen to have used Leptos in my last personal project.
My background is in decades of web development of all types so I would very much like to contribute to Lemmy, specifically the new Leptos UI to start.
I have already been working on my own branch for a week or so to get familiar with the code base and dev environment. Things are going fine!
I was wondering how work pieces are managed in the project and it seemed sensible to start with an Issue to indicate that I would like to work on a part of the new app so that other people also working on the app can organize themselves with that in mind.
I've been working on bringing the Leptos homepage up to the function and graphic design of the current UI but using the SSR and hydration of Leptos and the widgets and tools of Daisy and Tailwind.
I'm happy to carry on with this and it would be great to have the blessing of the team. I'm also totally happy to move on to another part of the app or just collaborate and help with work other people have already started.
@phiresky mentioned in the maintainer chat that he has concerns about using leptos for the UI repo. While I think leptos is definitely a step up from inferno, I have my own concerns about it. To spur discussion, I'll make some pros/cons lists for leptos, solidjs with solid start (my first choice of leptos alternative), and nextjs (popular fullstack framework with many compatible libraries).
This list was made off the top of my head from my experience working with these frameworks. I'm likely forgetting to include other useful information about them. Then, of course, there are many other frameworks to choose from (I'd say too many). I've heard svelte/sveltekit is both nice to develop with and fairly performant, although I have no first hand experience with it.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
Cargo.toml
leptos 0.6
leptos_meta 0.6
leptos_router 0.6
leptos_i18n 0
cfg-if 1
lemmy-client 1.0.0
serde 1
serde_json 1
wasm-bindgen 0.2
console_error_panic_hook 0
leptos_actix 0.6
actix-files 0
actix-web 4
actix-session 0.9
tokio 1.37
strum 0.26.2
trait-set 0.3.0
leptos-use 0.10.10
si_format 0.1.1
docker/docker-compose.yml
nginx 1-alpine
dessalines/lemmy 0.19.0-beta.7
asonix/pictrs 0.5.0-rc.2
postgres 16-alpine
end2end/docker-compose.yml
dessalines/lemmy 0.19.4-rc.5
asonix/pictrs 0.5.16
postgres 16-alpine
Dockerfile
end2end/package.json
@playwright/test ^1.44.1
@types/node ^20.13.0
typescript ^5.4.5
package.json
daisyui ^4.12.2
prettier ^3.3.2
tailwindcss ^3.4.4
pnpm 9.3.0+sha512.ee7b93e0c2bd11409c6424f92b866f31d3ea1bef5fbe47d3c7500cdc3c9668833d2e55681ad66df5b640c61fa9dc25d546efa54d76d7f8bf54b13614ac293631
.woodpecker.yml
tmknom/prettier 3.2.5
tamasfe/taplo 0.8.1
postgres 16-alpine
dessalines/lemmy 0.19.4-beta.7
alpine 3
alpine 3
i was unable to get the new lemmy client to make any successful request apart from the home page content (list_posts) on the server side only.
i noticed the home page content has been commented out completely so i assume this was a known issue.
i have left all the code there and only added some prototype code to add the authentication header.
I noticed we're currently using icons from the charm icon pack, but it looks like our icon library supports a lot of different icon packages: https://github.com/Carlosted/icondata#icon-packages
It might be good to standardize or pick which ones we like going forward.
I've always been partial to either feather icons, but tailwind's hero icons look like they might be a good choice too.
Currently, the LemmyClient
trait is implemented for both the awc
client and a placeholder Fetch
struct which uses gloo-net
. I take it that the point of the browser client is to be able to make requests from the browser when needed. However, with Leptos's server function feature, I question if this is necessary: browser-side calls of server functions use a stub that uses the browser's native fetch
API. With this in mind, is there a reason to keep this logic? Stripping it would make the client implementation much simpler.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.