Comments (1)
Went with "Page" as a suffix instead of "Activity". Not a diehard on this change, but I'm unfamiliar with the convention of calling these "activities" instead of "pages", which threw me off at first.
page is fine. The main thing is to make sure Page / Activity / Routes / Screen (s) are easily distinguishable from inner components.
It arguably makes more sense to colocate these with the relevant components instead of throwing them in the common serverfns directory.
You never know where these might be used elsewhere tho, and its best to keep them separate from UI items. In android these are called viewmodels (a place to fetch and persist reactive data across screens), and the top-level pages can use one or more of them. For example an AccountServerFns
or a CommunityServerFns
will probably be used for multiple screens. So it does make sense to have them in their own folder separate from ui/components
, even if most of the time its 1 route using 1 component.
As for top level screens tho, it does make sense to put those in a ui/components
So I'd recommend:
- src
- ui
- components
- home
- home_page.rs
- home.rs (for extras specific to home)
- common (shared UI components)
- utils (UI-specific utils)
- home
- components
- serverfns
- home_fns.rs
- utils
- ui
The other things look fine to me.
from lemmy-ui-leptos.
Related Issues (16)
- Add woodpecker / CI jobs
- Add translations via leptos_i18n HOT 2
- Is leptos the right choice for the UI rewrite? HOT 15
- Create Error types
- Issue with new lemmy_client HOT 3
- Translation namespaces HOT 7
- Preferred icon pack(s)? HOT 3
- Create login / auth service HOT 1
- Discussion: Is there a point to keeping the gloo-net client? HOT 3
- Communities Page HOT 2
- Add dependency on lemmy-client HOT 1
- Make playwright testing work accross machines HOT 1
- Dependency Dashboard
- Homepage as close as possible to lemmy-ui homepage in functionality HOT 19
- Make post page and post listings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lemmy-ui-leptos.