Refactor routes into functional groupings #12

Merged
notplants merged 7 commits from routes-refactor into main 2021-11-03 10:24:28 +00:00
Owner

This PR refactors routes into functional groupings, inspired by the architecture of Delta (https://github.com/revoltchat/delta/tree/master/src/routes/channels) and Plume (https://github.com/Plume-org/Plume).

json_api.rs, context.rs and forms.rs were removed, and these parts are combined into files along with the routes they are used by.

as discussed on the call, this is just a first pass, revise as inspired.

some outstanding things I'm aware of:

  • didn't finish organizing settings/network.rs into commented sections
  • didn't organize templates into folders yet either (similar to correspondence with URLs, with templates it would be nice if there was a correspondence between template folder structure and route structure, but I didn't want to invest too much time into organizing it yet, while the route structure was not finalized either). this could also be done as a separate PR.
This PR refactors routes into functional groupings, inspired by the architecture of Delta (https://github.com/revoltchat/delta/tree/master/src/routes/channels) and Plume (https://github.com/Plume-org/Plume). json_api.rs, context.rs and forms.rs were removed, and these parts are combined into files along with the routes they are used by. as discussed on the call, this is just a first pass, revise as inspired. some outstanding things I'm aware of: - didn't finish organizing settings/network.rs into commented sections - didn't organize templates into folders yet either (similar to correspondence with URLs, with templates it would be nice if there was a correspondence between template folder structure and route structure, but I didn't want to invest too much time into organizing it yet, while the route structure was not finalized either). this could also be done as a separate PR.
notplants added 4 commits 2021-11-02 10:40:26 +00:00
notplants requested review from glyph 2021-11-02 10:41:13 +00:00
glyph added the
refactor
peach-web
labels 2021-11-02 11:40:22 +00:00
Owner

@notplants

Thanks for the PR! This is already looking so much neater and easier to navigate.

didn't finish organizing settings/network.rs into commented sections

I'll work on this and push commits to this PR.

didn't organize templates into folders yet either [..] this could also be done as a separate PR

Agreed. I can always do that when I start working on the new templates :)

@notplants Thanks for the PR! This is already looking so much neater and easier to navigate. > didn't finish organizing settings/network.rs into commented sections I'll work on this and push commits to this PR. > didn't organize templates into folders yet either [..] this could also be done as a separate PR Agreed. I can always do that when I start working on the new templates :)
glyph added 3 commits 2021-11-03 09:53:04 +00:00
glyph approved these changes 2021-11-03 09:57:58 +00:00
glyph left a comment
Owner

Looking good. I just made 3 commits to carry this a bit further forward:

  • Cleaned-up the comments a bit. Lots of work still to be done but we can focus on this at a later stage. For now, we can make our lives easier by ensuring that all new code additions are thoroughly documented. I really like cargo doc --no-deps --open for this kind of work...it allows me to quickly see where the gaps are.

  • Added a few more section headers for src/routes/settings/network.rs. I think we could eventually improve the section names so that they refer to functional grouping and not routes.

  • Removed lockfiles for two crates

  • Updated the main lockfile

Looking good. I just made 3 commits to carry this a bit further forward: - Cleaned-up the comments a bit. Lots of work still to be done but we can focus on this at a later stage. For now, we can make our lives easier by ensuring that all new code additions are thoroughly documented. I really like `cargo doc --no-deps --open` for this kind of work...it allows me to quickly see where the gaps are. - Added a few more section headers for `src/routes/settings/network.rs`. I think we could eventually improve the section names so that they refer to functional grouping and not routes. - Removed lockfiles for two crates - Updated the main lockfile
notplants merged commit 1aa5821adf into main 2021-11-03 10:24:28 +00:00
notplants deleted branch routes-refactor 2021-11-03 10:24:36 +00:00
Sign in to join this conversation.
No description provided.