From 58a1578492591fd66f774cdb62f5ebf0b2367dac Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 19:13:35 -0600 Subject: [PATCH 01/27] fix(gitignore): Add the .env file to the .gitignore file --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index a413a1e..09f971d 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ settings.json style/ public/sitemap.xml + +.env From d70800ba9e06c1995169027f80db812580f9c4dc Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 19:22:32 -0600 Subject: [PATCH 02/27] POC(CI): only in types ready for review and add the component rustfmt in minimal manually --- .github/workflows/clippy.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 5b7c679..5ceffc7 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -2,6 +2,8 @@ name: clippy on: workflow_dispatch: pull_request: + types: + - ready_for_review push: branches: - main @@ -19,13 +21,14 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly-2024-02-12 target: wasm32-unknown-unknown - override: true + override: false + components: rustfmt - uses: actions-rs/cargo@v1 with: command: fmt @@ -62,7 +65,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - uses: actions-rs/toolchain@v1 with: profile: minimal From 6dd7a567e1e3f1fc743478a0b18e9dcaf939ded7 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 19:23:16 -0600 Subject: [PATCH 03/27] test: fmt --- .github/workflows/clippy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 5ceffc7..211a687 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -2,8 +2,7 @@ name: clippy on: workflow_dispatch: pull_request: - types: - - ready_for_review + push: branches: - main From 29c8152a5b8443e504283dc9053ee1f318ec7591 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 19:31:48 -0600 Subject: [PATCH 04/27] test: Change the toolchain --- .github/workflows/clippy.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 211a687..35ecd8c 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -21,12 +21,10 @@ jobs: uses: actions/checkout@v3 with: submodules: "recursive" - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@nightly with: - profile: minimal toolchain: nightly-2024-02-12 target: wasm32-unknown-unknown - override: false components: rustfmt - uses: actions-rs/cargo@v1 with: @@ -44,7 +42,7 @@ jobs: override: true components: clippy - name: Cache .cargo and target - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.cargo From 20a71be88d9671833c10fb332c39f644b8954d77 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 19:40:39 -0600 Subject: [PATCH 05/27] test: without action-rs/cargo --- .github/workflows/clippy.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 35ecd8c..a32fb7f 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -21,21 +21,21 @@ jobs: uses: actions/checkout@v3 with: submodules: "recursive" + - uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly-2024-02-12 target: wasm32-unknown-unknown components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + + - name: Check formatting + run: cargo fmt --all -- --check leptosfmt: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@nightly with: profile: minimal toolchain: nightly @@ -71,8 +71,5 @@ jobs: components: clippy - uses: Swatinem/rust-cache@v2 - - name: cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --features=ssr,hydrate -- -D warnings + - name: Run clippy + run: cargo clippy --features=ssr,hydrate -- -D warnings From 0583e6fd6eca86acce6f3f41312dfdf8a9b928b9 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 19:42:26 -0600 Subject: [PATCH 06/27] typo in targets --- .github/workflows/clippy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index a32fb7f..2691bfe 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -25,7 +25,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: toolchain: nightly-2024-02-12 - target: wasm32-unknown-unknown + targets: wasm32-unknown-unknown components: rustfmt - name: Check formatting From 9d83941718889e8f4ab3149668c6bdf9b776dc74 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 19:46:06 -0600 Subject: [PATCH 07/27] test: override the toolchain --- .github/workflows/clippy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 2691bfe..5e3018e 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -28,6 +28,9 @@ jobs: targets: wasm32-unknown-unknown components: rustfmt + - name: Set toolchain override + run: rustup override set nightly-2024-02-12 + - name: Check formatting run: cargo fmt --all -- --check From c87e38b97b47f53fc991a3beb3549a48d09d557f Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 20:15:32 -0600 Subject: [PATCH 08/27] test: formatting the code that don't make claude, thanks Claude for: --- Cargo.toml | 6 ++-- README.md | 48 ++++++++++++++++++----------- rust-toolchain.toml | 2 +- src/app.rs | 2 +- src/components/community_project.rs | 17 +++++++--- src/components/head_information.rs | 2 +- src/components/header.rs | 2 +- src/components/project_card.rs | 4 ++- src/context/theme_provider.rs | 6 ++-- src/pages/communities.rs | 15 +++++++-- 10 files changed, 68 insertions(+), 36 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b025b53..d4a1e69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rust-lang-es" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib", "rlib"] @@ -55,12 +55,12 @@ toml = "0.9" serde = { version = "1", features = ["derive"] } [package.metadata.leptos] -# The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name +# The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name output-name = "leptos_start" # The site root folder is where cargo-leptos generate all output. WARNING: all content of this folder will be erased on a rebuild. Use it in your server setup. site-root = "dist" # The site-root relative folder where all compiled output (JS, WASM and CSS) is written -# Defaults to pkg +# Defaults to pkg site-pkg-dir = "pkg" # [Optional] The source CSS file. If it ends with .sass or .scss then it will be compiled by dart-sass into CSS. The CSS is optimized by Lightning CSS before being written to //app.css # style-file = "input.css" diff --git a/README.md b/README.md index 4b35b32..66946f5 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,41 @@ -![image](https://github.com/RustLangES/RustLangES.github.io/assets/56278796/cc7009a2-a11b-4847-a561-fcc6807e1d98) - +# ![image](https://github.com/RustLangES/RustLangES.github.io/assets/56278796/cc7009a2-a11b-4847-a561-fcc6807e1d98) +

-GitHub Workflow Status (with event) -GitHub Workflow Status (with event) + +GitHub Workflow Status (with event) + +GitHub Workflow Status (with event)

> [!CAUTION] > Esta pagina no se publicará hasta que el nuevo diseño se encuentre listo -> https://www.figma.com/design/S9yCZSaZ9q54XSojWNhJft/Rust-Lang-ES?node-id=0-1&p=f&t=Cn6Q0QzGflLYCOgo-0 +> ## Como ejecutar +### Requisitos Generales -### Requisitos Generales Antes de empezar es necesario tener estos programas + - [Rust](https://rust-lang.org/tools/install) - [NodeJs](https://nodejs.org) -### Requisitos Windows >= 10 +### Requisitos Windows >= 10 + -[BusyBox](https://busybox.net/) - - Usando scoop `scoop install busybox` - - Usando choco `choco install busybox` + +- Usando scoop `scoop install busybox` +- Usando choco `choco install busybox` ### Desarrollo -> [!NOTE] -> necesitas fetch git submodules para clonar los assets externos para el desarrollo +> [!NOTE] +> necesitas fetch git submodules para clonar los assets externos para el desarrollo Con estos comandos podrá empezar a desarrollar @@ -51,32 +60,34 @@ cargo install cargo-make cargo make serve ``` - --- - ### Si usas nix > [!NOTE] > Asegúrate de tener los flakes activados. Si usas nix es bastante sencillo, solo necesitas este comando: + ```bash nix develop ``` Ahora podemos iniciar el servidor con: + ```bash cargo make serve ``` Para hacer un commit: + ```bash cargo install rusty-hook cargo install leptosfmt --version 0.1.13 ``` ## Configura tu VSCode + Agrega esto en tu `settings.json` ```json @@ -101,11 +112,12 @@ Agrega esto en tu `settings.json` } ``` +## Resumen +Este proyecto utiliza una rama personalizada de Leptos para poder servir +directamente el directorio de salida como un sitio web estático. -# Resumen -Este proyecto utiliza una rama personalizada de Leptos para poder servir directamente el directorio de salida como un sitio web estático. - -`cargo make serve` sirve el directorio div con watch mode y hot-reload. -`cargo make build` compila el proyecto en release. La salida estará en el directorio `dist` y el comando no lo servirá, sino que se cerrará. +`cargo make serve` sirve el directorio div con watch mode y hot-reload. +`cargo make build` compila el proyecto en release. La salida estará en el +directorio `dist` y el comando no lo servirá, sino que se cerrará. `cargo make fmt` formatea con `rustfmt` y `leptosfmt`. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 8643fc2..b10e34c 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] channel = "nightly-2025-07-12" profile = "minimal" -components = ["rust-src","rust-analyzer"] +components = ["rust-src","rust-analyzer", "rustfmt"] targets = ["wasm32-unknown-unknown"] diff --git a/src/app.rs b/src/app.rs index c613bb6..7f53070 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,6 +1,6 @@ use crate::context::theme_provider::ThemeProvider; use leptos::{leptos_dom::logging::console_log, prelude::*}; -use leptos_meta::{provide_meta_context, MetaTags}; +use leptos_meta::{MetaTags, provide_meta_context}; use leptos_router::{ components::{Route, Router, Routes}, path, diff --git a/src/components/community_project.rs b/src/components/community_project.rs index f7603e3..f8559d6 100644 --- a/src/components/community_project.rs +++ b/src/components/community_project.rs @@ -7,7 +7,7 @@ use rustlanges_components::{ }; use crate::{ - components::{project_card::ProjectCard, GithubIcon}, + components::{GithubIcon, project_card::ProjectCard}, models::GithubUser, }; @@ -15,9 +15,18 @@ use crate::{ pub fn CommunityProjectSection( #[prop(into, default = false)] many_projects: bool, ) -> impl IntoView { - let juanperas = GithubUser{ username: "juanperas", avatar: "https://avatars.githubusercontent.com/u/136520331?u=7353ba372f09091049692d6e95f5a8cd8a42565f&v=4" }; - let apika = GithubUser { username: "ApikaLucas", avatar: "https://avatars.githubusercontent.com/u/70247585?u=513513290efb6dc162afc899646e8e0467cedfc2&v=4"}; - let sergio = GithubUser { username: "Sergio", avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4"}; + let juanperas = GithubUser { + username: "juanperas", + avatar: "https://avatars.githubusercontent.com/u/136520331?u=7353ba372f09091049692d6e95f5a8cd8a42565f&v=4", + }; + let apika = GithubUser { + username: "ApikaLucas", + avatar: "https://avatars.githubusercontent.com/u/70247585?u=513513290efb6dc162afc899646e8e0467cedfc2&v=4", + }; + let sergio = GithubUser { + username: "Sergio", + avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4", + }; let users = vec![juanperas, apika, sergio]; diff --git a/src/components/head_information.rs b/src/components/head_information.rs index e2a19f8..96d4ef7 100644 --- a/src/components/head_information.rs +++ b/src/components/head_information.rs @@ -1,4 +1,4 @@ -use leptos::{component, prelude::*, view, IntoView}; +use leptos::{IntoView, component, prelude::*, view}; use leptos_meta::{Link, Meta, Stylesheet, Title}; use leptos_router::hooks::use_location; diff --git a/src/components/header.rs b/src/components/header.rs index 82b15a6..920edec 100644 --- a/src/components/header.rs +++ b/src/components/header.rs @@ -1,6 +1,6 @@ use crate::{ components::icons::{NewLogoRustDarkPageIcon, NewLogoRustLightPageIcon}, - context::theme_provider::{use_theme, Theme}, + context::theme_provider::{Theme, use_theme}, }; use leptos::{leptos_dom::logging::console_log, prelude::*}; use leptos_router::{components::A, hooks::use_url}; diff --git a/src/components/project_card.rs b/src/components/project_card.rs index 8b70dc2..9bdee72 100644 --- a/src/components/project_card.rs +++ b/src/components/project_card.rs @@ -19,7 +19,9 @@ pub fn ProjectCard( }) .collect_view(); - let badge_classes = format!("flex w-fit project-card-badge ml-6 px-5 pb-1 pt-2 items-center justify-center gap-2 text-black border-2 border-b-0 border-black before:bg-orange-400 {badge_color}"); + let badge_classes = format!( + "flex w-fit project-card-badge ml-6 px-5 pb-1 pt-2 items-center justify-center gap-2 text-black border-2 border-b-0 border-black before:bg-orange-400 {badge_color}" + ); view! {
diff --git a/src/context/theme_provider.rs b/src/context/theme_provider.rs index 626d6c0..f07ffd3 100644 --- a/src/context/theme_provider.rs +++ b/src/context/theme_provider.rs @@ -2,13 +2,13 @@ use leptos::{ children::Children, leptos_dom::logging::console_log, logging::log, - prelude::{use_context, RwSignal, *}, + prelude::{RwSignal, use_context, *}, server::codee::string::JsonSerdeCodec, *, }; use leptos_use::{ - storage::use_local_storage, use_media_query, use_preferred_dark, watch_with_options, - WatchOptions, + WatchOptions, storage::use_local_storage, use_media_query, use_preferred_dark, + watch_with_options, }; use serde::{Deserialize, Serialize}; /// Defines an enumeration for UI themes. diff --git a/src/pages/communities.rs b/src/pages/communities.rs index 4cd5ead..4397dde 100644 --- a/src/pages/communities.rs +++ b/src/pages/communities.rs @@ -11,9 +11,18 @@ use crate::{ #[component] pub fn Communities() -> impl IntoView { - let juanperas = GithubUser{ username: "juanperas", avatar: "https://avatars.githubusercontent.com/u/136520331?u=7353ba372f09091049692d6e95f5a8cd8a42565f&v=4" }; - let apika = GithubUser { username: "ApikaLucas", avatar: "https://avatars.githubusercontent.com/u/70247585?u=513513290efb6dc162afc899646e8e0467cedfc2&v=4"}; - let sergio = GithubUser { username: "Sergio", avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4"}; + let juanperas = GithubUser { + username: "juanperas", + avatar: "https://avatars.githubusercontent.com/u/136520331?u=7353ba372f09091049692d6e95f5a8cd8a42565f&v=4", + }; + let apika = GithubUser { + username: "ApikaLucas", + avatar: "https://avatars.githubusercontent.com/u/70247585?u=513513290efb6dc162afc899646e8e0467cedfc2&v=4", + }; + let sergio = GithubUser { + username: "Sergio", + avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4", + }; let users = vec![ juanperas.clone(), From 8c9b291acb1720e9d11f194a584a4c5801cd93ae Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 20:17:35 -0600 Subject: [PATCH 09/27] fix: return to the 2021 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d4a1e69..75100f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rust-lang-es" version = "0.1.0" -edition = "2024" +edition = "2021" [lib] crate-type = ["cdylib", "rlib"] From e419792e71896c1357f7e9f0b3629f6ece18465a Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 20:18:37 -0600 Subject: [PATCH 10/27] format again --- src/app.rs | 2 +- src/components/community_project.rs | 2 +- src/components/head_information.rs | 2 +- src/components/header.rs | 2 +- src/context/theme_provider.rs | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app.rs b/src/app.rs index 7f53070..c613bb6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,6 +1,6 @@ use crate::context::theme_provider::ThemeProvider; use leptos::{leptos_dom::logging::console_log, prelude::*}; -use leptos_meta::{MetaTags, provide_meta_context}; +use leptos_meta::{provide_meta_context, MetaTags}; use leptos_router::{ components::{Route, Router, Routes}, path, diff --git a/src/components/community_project.rs b/src/components/community_project.rs index f8559d6..48936f8 100644 --- a/src/components/community_project.rs +++ b/src/components/community_project.rs @@ -7,7 +7,7 @@ use rustlanges_components::{ }; use crate::{ - components::{GithubIcon, project_card::ProjectCard}, + components::{project_card::ProjectCard, GithubIcon}, models::GithubUser, }; diff --git a/src/components/head_information.rs b/src/components/head_information.rs index 96d4ef7..e2a19f8 100644 --- a/src/components/head_information.rs +++ b/src/components/head_information.rs @@ -1,4 +1,4 @@ -use leptos::{IntoView, component, prelude::*, view}; +use leptos::{component, prelude::*, view, IntoView}; use leptos_meta::{Link, Meta, Stylesheet, Title}; use leptos_router::hooks::use_location; diff --git a/src/components/header.rs b/src/components/header.rs index 920edec..82b15a6 100644 --- a/src/components/header.rs +++ b/src/components/header.rs @@ -1,6 +1,6 @@ use crate::{ components::icons::{NewLogoRustDarkPageIcon, NewLogoRustLightPageIcon}, - context::theme_provider::{Theme, use_theme}, + context::theme_provider::{use_theme, Theme}, }; use leptos::{leptos_dom::logging::console_log, prelude::*}; use leptos_router::{components::A, hooks::use_url}; diff --git a/src/context/theme_provider.rs b/src/context/theme_provider.rs index f07ffd3..626d6c0 100644 --- a/src/context/theme_provider.rs +++ b/src/context/theme_provider.rs @@ -2,13 +2,13 @@ use leptos::{ children::Children, leptos_dom::logging::console_log, logging::log, - prelude::{RwSignal, use_context, *}, + prelude::{use_context, RwSignal, *}, server::codee::string::JsonSerdeCodec, *, }; use leptos_use::{ - WatchOptions, storage::use_local_storage, use_media_query, use_preferred_dark, - watch_with_options, + storage::use_local_storage, use_media_query, use_preferred_dark, watch_with_options, + WatchOptions, }; use serde::{Deserialize, Serialize}; /// Defines an enumeration for UI themes. From 00f3311adde2264d6b520c7d9714451cc580cf8e Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 20:26:16 -0600 Subject: [PATCH 11/27] test: check leptos 0.1.33 --- .github/workflows/clippy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 5e3018e..b648c69 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -54,7 +54,7 @@ jobs: ${{ runner.os }}-cargo-leptos-${{ hashFiles('**/Cargo.lock') }} ${{ runner.os }}-cargo-leptos - name: Install LeptosFmt - run: cargo install leptosfmt --version 0.1.13 + run: cargo install leptosfmt --version 0.1.33 - name: Check LeptosFmt run: leptosfmt --check . From 6b4e12caf61aa70decef67ccb95b4a88f236e4cb Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 20:47:53 -0600 Subject: [PATCH 12/27] test: watch wich submodules area --- .github/workflows/clippy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index b648c69..7fa84c2 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -21,6 +21,8 @@ jobs: uses: actions/checkout@v3 with: submodules: "recursive" + - name: Verify submodules + run: git submodule status - uses: dtolnay/rust-toolchain@nightly with: From a6094d6d60fd7aa0525db470b94ed7b7df8ff43c Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 20:52:02 -0600 Subject: [PATCH 13/27] fix: move to the right place the submodules check --- .github/workflows/clippy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 7fa84c2..33548dd 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -21,8 +21,6 @@ jobs: uses: actions/checkout@v3 with: submodules: "recursive" - - name: Verify submodules - run: git submodule status - uses: dtolnay/rust-toolchain@nightly with: @@ -68,6 +66,8 @@ jobs: uses: actions/checkout@v3 with: submodules: "recursive" + - name: Verify submodules + run: git submodule status - uses: actions-rs/toolchain@v1 with: profile: minimal From eee43bd8bc2e5482c7891ef2b257a145fd530b2d Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 20:57:12 -0600 Subject: [PATCH 14/27] test: update the toolchain for clippy stage --- .github/workflows/clippy.yml | 2 +- .gitmodules | 3 +++ design-system-components | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 design-system-components diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 33548dd..ccb410e 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -68,7 +68,7 @@ jobs: submodules: "recursive" - name: Verify submodules run: git submodule status - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@nightly with: profile: minimal toolchain: nightly diff --git a/.gitmodules b/.gitmodules index c89d3a5..f7f70dc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "extras"] path = extras url = https://github.com/RustLangES/proyectos-comunitarios.git +[submodule "design-system-components"] + path = design-system-components + url = https://github.com/RustLangES/design-system-components diff --git a/design-system-components b/design-system-components new file mode 160000 index 0000000..bf13d34 --- /dev/null +++ b/design-system-components @@ -0,0 +1 @@ +Subproject commit bf13d347b83d2e4cd41ace49e4be9fc0be293ece From dc976b1afcbbf5073f4e99e053b27c75876ef1ca Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 21:00:02 -0600 Subject: [PATCH 15/27] Add clippy to the toolchain file --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index b10e34c..d77efc1 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] channel = "nightly-2025-07-12" profile = "minimal" -components = ["rust-src","rust-analyzer", "rustfmt"] +components = ["rust-src","rust-analyzer", "rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] From f5fe61dbf228a9cfb975965dcacc2f14e5dd2d22 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 21:03:53 -0600 Subject: [PATCH 16/27] test: path of design-system-components --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 75100f3..e4be89d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ reqwest = { version = "0.12.23", features = [ "rustls-tls", ], default-features = false } # rustlanges-components = { version = "0.1.0", features = ["leptos"] } -rustlanges-components = { path="../design-system-components", features = ["leptos"] } +rustlanges-components = { path="design-system-components", features = ["leptos"] } leptos-use = { version = "0.16.3", features = [] } console_error_panic_hook = { version = "0.1.7", optional = true } # leptos_theme = "0.1.2" From 94f6942042eeaabbdbb7ee51f6298a15efbcea92 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 21:10:40 -0600 Subject: [PATCH 17/27] Upgrading yiyi --- .github/workflows/clippy.yml | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index ccb410e..64abfc3 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -24,7 +24,7 @@ jobs: - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly-2024-02-12 + toolchain: nightly-2025-07-12 targets: wasm32-unknown-unknown components: rustfmt diff --git a/Cargo.toml b/Cargo.toml index e4be89d..2847c50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rust-lang-es" version = "0.1.0" -edition = "2021" +edition = "2024" [lib] crate-type = ["cdylib", "rlib"] From 10e15b05d08aa9017e8c87ba734d069b2801834f Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 21:12:46 -0600 Subject: [PATCH 18/27] test: change the overide version --- .github/workflows/clippy.yml | 2 +- src/app.rs | 2 +- src/components/community_project.rs | 2 +- src/components/head_information.rs | 2 +- src/components/header.rs | 2 +- src/context/theme_provider.rs | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 64abfc3..14c2d4e 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -29,7 +29,7 @@ jobs: components: rustfmt - name: Set toolchain override - run: rustup override set nightly-2024-02-12 + run: rustup override set nightly-2025-07-12 - name: Check formatting run: cargo fmt --all -- --check diff --git a/src/app.rs b/src/app.rs index c613bb6..7f53070 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,6 +1,6 @@ use crate::context::theme_provider::ThemeProvider; use leptos::{leptos_dom::logging::console_log, prelude::*}; -use leptos_meta::{provide_meta_context, MetaTags}; +use leptos_meta::{MetaTags, provide_meta_context}; use leptos_router::{ components::{Route, Router, Routes}, path, diff --git a/src/components/community_project.rs b/src/components/community_project.rs index 48936f8..f8559d6 100644 --- a/src/components/community_project.rs +++ b/src/components/community_project.rs @@ -7,7 +7,7 @@ use rustlanges_components::{ }; use crate::{ - components::{project_card::ProjectCard, GithubIcon}, + components::{GithubIcon, project_card::ProjectCard}, models::GithubUser, }; diff --git a/src/components/head_information.rs b/src/components/head_information.rs index e2a19f8..96d4ef7 100644 --- a/src/components/head_information.rs +++ b/src/components/head_information.rs @@ -1,4 +1,4 @@ -use leptos::{component, prelude::*, view, IntoView}; +use leptos::{IntoView, component, prelude::*, view}; use leptos_meta::{Link, Meta, Stylesheet, Title}; use leptos_router::hooks::use_location; diff --git a/src/components/header.rs b/src/components/header.rs index 82b15a6..920edec 100644 --- a/src/components/header.rs +++ b/src/components/header.rs @@ -1,6 +1,6 @@ use crate::{ components::icons::{NewLogoRustDarkPageIcon, NewLogoRustLightPageIcon}, - context::theme_provider::{use_theme, Theme}, + context::theme_provider::{Theme, use_theme}, }; use leptos::{leptos_dom::logging::console_log, prelude::*}; use leptos_router::{components::A, hooks::use_url}; diff --git a/src/context/theme_provider.rs b/src/context/theme_provider.rs index 626d6c0..f07ffd3 100644 --- a/src/context/theme_provider.rs +++ b/src/context/theme_provider.rs @@ -2,13 +2,13 @@ use leptos::{ children::Children, leptos_dom::logging::console_log, logging::log, - prelude::{use_context, RwSignal, *}, + prelude::{RwSignal, use_context, *}, server::codee::string::JsonSerdeCodec, *, }; use leptos_use::{ - storage::use_local_storage, use_media_query, use_preferred_dark, watch_with_options, - WatchOptions, + WatchOptions, storage::use_local_storage, use_media_query, use_preferred_dark, + watch_with_options, }; use serde::{Deserialize, Serialize}; /// Defines an enumeration for UI themes. From d6c0b65e7da4512ee8aec28724a5cdbd4b2752af Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Wed, 13 May 2026 21:33:02 -0600 Subject: [PATCH 19/27] chore: change design-system-components submodule url to ssh --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index f7f70dc..30d19ae 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,4 +3,4 @@ url = https://github.com/RustLangES/proyectos-comunitarios.git [submodule "design-system-components"] path = design-system-components - url = https://github.com/RustLangES/design-system-components + url = git@github.com:RustLangES/design-system-components.git From f162dffc0abb7991abe439263605ce72aa1ac161 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 18:18:52 -0600 Subject: [PATCH 20/27] test: only formatting in src --- .github/workflows/clippy.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 14c2d4e..120234e 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -56,7 +56,7 @@ jobs: - name: Install LeptosFmt run: cargo install leptosfmt --version 0.1.33 - name: Check LeptosFmt - run: leptosfmt --check . + run: leptosfmt --check src clippy: needs: [fmt, leptosfmt] @@ -66,8 +66,6 @@ jobs: uses: actions/checkout@v3 with: submodules: "recursive" - - name: Verify submodules - run: git submodule status - uses: dtolnay/rust-toolchain@nightly with: profile: minimal From 02e0c1597a7d3eddf361e33a5823e70ff5c0a6c4 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 18:29:08 -0600 Subject: [PATCH 21/27] test: exclude formatting in design system components --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2847c50..1668276 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,9 @@ name = "rust-lang-es" version = "0.1.0" edition = "2024" +[workspace] +exclude = ["design-system-components"] + [lib] crate-type = ["cdylib", "rlib"] From 88f33d3dac42222bb03c108fc26dd897d0364892 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 18:30:15 -0600 Subject: [PATCH 22/27] test: remove flag all --- .github/workflows/clippy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 120234e..72b83d6 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -32,7 +32,7 @@ jobs: run: rustup override set nightly-2025-07-12 - name: Check formatting - run: cargo fmt --all -- --check + run: cargo fmt -- --check leptosfmt: runs-on: ubuntu-22.04 From 2ddc6e1252aa5084a2cc44a774d88d7b6ba7d26f Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 18:36:58 -0600 Subject: [PATCH 23/27] Remove if nested and change for &&, thanks clippy for: --- build.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.rs b/build.rs index 674d47d..7e82922 100644 --- a/build.rs +++ b/build.rs @@ -10,10 +10,10 @@ fn main() { println!("cargo:rerun-if-changed=extras"); let folders = fs::read_dir("extras").unwrap(); - if let Err(e) = fs::create_dir("src/extras") { - if e.kind() != std::io::ErrorKind::AlreadyExists { - println!("{e:?}"); - } + if let Err(e) = fs::create_dir("src/extras") + && e.kind() != std::io::ErrorKind::AlreadyExists + { + println!("{e:?}"); } copy_dir_all("extras/proyectos/assets", "assets/gen_assets").unwrap(); From df0012d490228e0949eb965272eb188855b08549 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 18:58:30 -0600 Subject: [PATCH 24/27] clippy: refactor simplify expression in if --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 7e82922..371d400 100644 --- a/build.rs +++ b/build.rs @@ -145,7 +145,7 @@ fn generate_projects(path: &Path) { } let file_path = file.path(); - if !file_path.extension().is_some_and(|e| e == "toml") { + if file_path.extension().is_none_or(|e| e != "toml") { let file_name = file.file_name(); let file_name = file_name.to_str().unwrap(); // Copy images or other files From 99640694d56592aeb9c82e3e34ae2ec2cd778bb8 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 19:36:01 -0600 Subject: [PATCH 25/27] clippy: lo di todo --- src/app.rs | 4 ++-- src/components/became_sponsor.rs | 2 +- src/components/challenges.rs | 3 ++- src/components/channels.rs | 1 + src/components/community_project.rs | 11 +++++------ src/components/footer.rs | 2 +- src/components/header.rs | 5 ++--- src/components/icons/logo_rust_page.rs | 10 +++++----- src/components/icons/mod.rs | 2 -- src/components/icons/web_icon.rs | 10 +++++----- src/components/our_sponsors.rs | 2 +- src/components/project_card.rs | 5 +++-- src/components/resources.rs | 2 +- src/components/sponsor_block.rs | 2 +- src/components/why_rust.rs | 7 ++----- src/context/theme_provider.rs | 16 +++++----------- src/lib.rs | 2 +- src/pages/communities.rs | 6 ++---- src/pages/contributors.rs | 10 ++++------ src/pages/index.rs | 7 ++----- 20 files changed, 46 insertions(+), 63 deletions(-) diff --git a/src/app.rs b/src/app.rs index 7f53070..8a80195 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,5 +1,5 @@ use crate::context::theme_provider::ThemeProvider; -use leptos::{leptos_dom::logging::console_log, prelude::*}; +use leptos::prelude::*; use leptos_meta::{MetaTags, provide_meta_context}; use leptos_router::{ components::{Route, Router, Routes}, @@ -8,7 +8,7 @@ use leptos_router::{ use crate::{ components::{HeadInformation, Header}, - pages::{Aprende, Communities, Contributors, Index, Projects}, + pages::{Aprende, Communities, Index}, }; pub fn shell(options: LeptosOptions) -> impl IntoView { diff --git a/src/components/became_sponsor.rs b/src/components/became_sponsor.rs index db3b707..ef857d5 100644 --- a/src/components/became_sponsor.rs +++ b/src/components/became_sponsor.rs @@ -1,4 +1,4 @@ -use leptos::{prelude::*, *}; +use leptos::prelude::*; use rustlanges_components::button::{Button, Variant as ButtonVariant}; #[component] diff --git a/src/components/challenges.rs b/src/components/challenges.rs index 2e688dd..569e4f2 100644 --- a/src/components/challenges.rs +++ b/src/components/challenges.rs @@ -1,6 +1,7 @@ -use leptos::{component, prelude::*}; +use leptos::prelude::*; use rustlanges_components::button::{Button, Variant as ButtonVariant}; +#[allow(non_snake_case)] pub fn DailyChallenges() -> impl IntoView { view! {
diff --git a/src/components/channels.rs b/src/components/channels.rs index db19c79..4ae9645 100644 --- a/src/components/channels.rs +++ b/src/components/channels.rs @@ -6,6 +6,7 @@ use rustlanges_components::{ icons::Youtube, }; +#[allow(non_snake_case)] pub fn Channels() -> impl IntoView { view! {
diff --git a/src/components/community_project.rs b/src/components/community_project.rs index f8559d6..92bdd76 100644 --- a/src/components/community_project.rs +++ b/src/components/community_project.rs @@ -1,13 +1,11 @@ -use leptos::{prelude::*, *}; +use leptos::prelude::*; use rustlanges_components::{ - avatar::Avatar, button::{Button, Variant}, - card::Card, - icons::{Book, Github, Project, Roadmap, StarBold}, + icons::{Github, StarBold}, }; use crate::{ - components::{GithubIcon, project_card::ProjectCard}, + components::project_card::ProjectCard, models::GithubUser, }; @@ -103,7 +101,8 @@ pub fn CommunityProjectSection( } .into_any() } else { - view! { <> }.into_any() + let _: () = view! { <> }; + ().into_any() }}
diff --git a/src/components/footer.rs b/src/components/footer.rs index 06c6469..6a9fe38 100644 --- a/src/components/footer.rs +++ b/src/components/footer.rs @@ -1,4 +1,4 @@ -use leptos::{prelude::*, *}; +use leptos::prelude::*; use rustlanges_components::{ button::{Button, Variant as ButtonVariant}, icons::{Discord, Github, Linkedin, Telegram}, diff --git a/src/components/header.rs b/src/components/header.rs index 920edec..63f806f 100644 --- a/src/components/header.rs +++ b/src/components/header.rs @@ -3,7 +3,6 @@ use crate::{ context::theme_provider::{Theme, use_theme}, }; use leptos::{leptos_dom::logging::console_log, prelude::*}; -use leptos_router::{components::A, hooks::use_url}; use leptos_use::{use_media_query, use_window}; use rustlanges_components::{ button::{Button, Variant}, @@ -30,7 +29,7 @@ pub fn Header() -> impl IntoView { let logo = move || match theme.get() { Theme::Dark => view! { }.into_any(), Theme::Light => view! { }.into_any(), - Theme::System if (move || is_dark_preferred_signal())() => { + Theme::System if is_dark_preferred_signal() => { view! { }.into_any() } Theme::System => view! { }.into_any(), @@ -43,7 +42,7 @@ pub fn Header() -> impl IntoView { }; let active_link_class = move |link: &str| { - if path() == format!("{:?}", link) { + if path() == format!("{link:?}") { "text-red-500 dark:text-orange-300" } else { "" diff --git a/src/components/icons/logo_rust_page.rs b/src/components/icons/logo_rust_page.rs index 8d75476..dcdc65a 100644 --- a/src/components/icons/logo_rust_page.rs +++ b/src/components/icons/logo_rust_page.rs @@ -2,14 +2,14 @@ use leptos::prelude::*; #[component] pub fn LogoRustPageIcon( - #[prop(default = 40)] size: u32, - #[prop(default = "dark:fill-[#e2cea9]")] class: &'static str, + #[prop(default = 40)] _size: u32, + #[prop(default = "dark:fill-[#e2cea9]")] _class: &'static str, ) -> impl IntoView { view! { diff --git a/src/components/icons/mod.rs b/src/components/icons/mod.rs index 8b89d93..0349f17 100644 --- a/src/components/icons/mod.rs +++ b/src/components/icons/mod.rs @@ -16,10 +16,8 @@ pub use discord_icon::*; pub use github_icon::*; pub use linkedin_icon::*; pub use location_icon::*; -pub use logo_rust_page::*; pub use next::*; pub use telegram_icon::*; pub use twitter_icon::*; -pub use web_icon::*; pub use new::{logo_rust_dark_page::*, logo_rust_light_page::*}; diff --git a/src/components/icons/web_icon.rs b/src/components/icons/web_icon.rs index 79126c9..82c749e 100644 --- a/src/components/icons/web_icon.rs +++ b/src/components/icons/web_icon.rs @@ -2,15 +2,15 @@ use leptos::prelude::*; #[component] pub fn WebIcon( - #[prop(default = 40)] size: u32, - #[prop(default = "fill-black dark:fill-[#bf8821]")] class: &'static str, + #[prop(default = 40)] _size: u32, + #[prop(default = "fill-black dark:fill-[#bf8821]")] _class: &'static str, ) -> impl IntoView { view! { diff --git a/src/components/our_sponsors.rs b/src/components/our_sponsors.rs index f405b1b..70e3524 100644 --- a/src/components/our_sponsors.rs +++ b/src/components/our_sponsors.rs @@ -1,4 +1,4 @@ -use leptos::{prelude::*, *}; +use leptos::prelude::*; use crate::components::sponsor_block::SponsorBlock; diff --git a/src/components/project_card.rs b/src/components/project_card.rs index 9bdee72..af7503a 100644 --- a/src/components/project_card.rs +++ b/src/components/project_card.rs @@ -1,8 +1,9 @@ -use leptos::{children::Children, prelude::*, *}; +use leptos::prelude::*; use rustlanges_components::{avatar::Avatar, card::Card, icons::Github}; -use crate::{components::GithubIcon, models::GithubUser}; +use crate::models::GithubUser; +#[allow(unused_variables)] #[component] pub fn ProjectCard( #[prop(into)] title: &'static str, diff --git a/src/components/resources.rs b/src/components/resources.rs index 2faa3f1..14bb3b8 100644 --- a/src/components/resources.rs +++ b/src/components/resources.rs @@ -1,6 +1,5 @@ use leptos::{component, prelude::*}; use rustlanges_components::{ - badge::Badge, card::{Card, Variant as CardVariant}, chip::{Chip, Variant as ChipVariant}, input::{Filter, InputSearch}, @@ -9,6 +8,7 @@ use rustlanges_components::{ type ResourceAlias = Vec; +#[allow(unused_variables)] #[component] pub fn Resources() -> impl IntoView { let (resources, set_resources) = signal(vec![Filter { diff --git a/src/components/sponsor_block.rs b/src/components/sponsor_block.rs index 7fd9fc4..b862a60 100644 --- a/src/components/sponsor_block.rs +++ b/src/components/sponsor_block.rs @@ -1,4 +1,4 @@ -use leptos::{prelude::*, *}; +use leptos::prelude::*; #[component] pub fn SponsorBlock( diff --git a/src/components/why_rust.rs b/src/components/why_rust.rs index 33ceef7..49a38bd 100644 --- a/src/components/why_rust.rs +++ b/src/components/why_rust.rs @@ -1,10 +1,7 @@ use leptos::prelude::*; -use rustlanges_components::{ - avatar::Avatar, - button::{Button, Variant as ButtonVariant}, - card::Card, -}; +use rustlanges_components::card::Card; +#[allow(non_snake_case)] pub fn WhyRust() -> impl IntoView { view! {
diff --git a/src/context/theme_provider.rs b/src/context/theme_provider.rs index f07ffd3..6a1c0fa 100644 --- a/src/context/theme_provider.rs +++ b/src/context/theme_provider.rs @@ -1,15 +1,10 @@ use leptos::{ children::Children, - leptos_dom::logging::console_log, - logging::log, prelude::{RwSignal, use_context, *}, server::codee::string::JsonSerdeCodec, *, }; -use leptos_use::{ - WatchOptions, storage::use_local_storage, use_media_query, use_preferred_dark, - watch_with_options, -}; +use leptos_use::{storage::use_local_storage, use_media_query}; use serde::{Deserialize, Serialize}; /// Defines an enumeration for UI themes. /// @@ -30,6 +25,7 @@ impl Default for Theme { } } +#[allow(clippy::inherent_to_string)] impl Theme { /// Converts the `Theme` variant into a corresponding string. pub fn to_string(self) -> String { @@ -42,7 +38,7 @@ impl Theme { } /// Define a constant for the local storage key used to store the theme setting. -const STORAGE_KEY: &'static str = "theme"; +const STORAGE_KEY: &str = "theme"; /// Updates the class selector for the respective theme. /// This function is responsible for applying the correct CSS class to the HTML and body elements based on the current theme. @@ -92,8 +88,6 @@ pub fn use_theme() -> RwSignal { use_context::>().expect("there should be a global theme state") } -use leptos::prelude::*; - /// The `ThemeProvider` component. /// /// This component provides a theme context to its children, allowing them to access and react to theme changes. @@ -112,12 +106,12 @@ pub fn ThemeProvider(children: Children) -> impl IntoView { use_local_storage::(STORAGE_KEY); let theme_state = RwSignal::new(theme_storage_state.get_untracked()); - provide_context(theme_state.clone()); + provide_context(theme_state); // Update local storage and CSS whenever the theme state changes Effect::new(move |_| { let current_theme = theme_state(); - set_theme_storage_state.set(current_theme.clone()); + set_theme_storage_state.set(current_theme); update_css_for_theme( current_theme, is_dark_preferred_signal(), diff --git a/src/lib.rs b/src/lib.rs index 6f154ef..ecabc3a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,7 @@ macro_rules! error { #[cfg(feature = "hydrate")] #[wasm_bindgen::prelude::wasm_bindgen] pub fn hydrate() { - use crate::app::*; + console_error_panic_hook::set_once(); leptos::mount::hydrate_islands(); } diff --git a/src/pages/communities.rs b/src/pages/communities.rs index 4397dde..0adc3c2 100644 --- a/src/pages/communities.rs +++ b/src/pages/communities.rs @@ -24,12 +24,10 @@ pub fn Communities() -> impl IntoView { avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4", }; - let users = vec![ - juanperas.clone(), + let users = [juanperas.clone(), apika.clone(), sergio.clone(), - juanperas.clone(), - ]; + juanperas.clone()]; let avatars = users .iter() diff --git a/src/pages/contributors.rs b/src/pages/contributors.rs index e7f4521..83b4cb8 100644 --- a/src/pages/contributors.rs +++ b/src/pages/contributors.rs @@ -4,7 +4,7 @@ use leptos::prelude::*; use serde::{Deserialize, Serialize}; // Test this query on: https://docs.github.com/es/graphql/overview/explorer -const GRAPH_QUERY: &str = r#" +const _GRAPH_QUERY: &str = r#" query OrganizationContributors { organization(login: "RustLangES") { repositories(first: 100) { @@ -59,6 +59,7 @@ pub struct ContributionCollection { total: u64, } +#[allow(dead_code)] pub async fn fetch_contributors() -> Vec { // let request_body = json!({ // "query": GRAPH_QUERY, @@ -92,11 +93,8 @@ pub async fn fetch_contributors() -> Vec { .as_array() .unwrap_or(&Vec::new()) .iter() - .filter_map(|repo| { - (!repo["collaborators"].is_null()) - .then(|| repo["collaborators"]["nodes"].as_array().unwrap()) - }) - .flatten() + .filter(|&repo| !repo["collaborators"].is_null()) + .flat_map(|repo| repo["collaborators"]["nodes"].as_array().unwrap()) .filter_map(|c| leptos::serde_json::from_value::(c.clone()).ok()) .fold(HashMap::new(), |prev, c| { let mut prev = prev; diff --git a/src/pages/index.rs b/src/pages/index.rs index 415d93b..782196a 100644 --- a/src/pages/index.rs +++ b/src/pages/index.rs @@ -1,15 +1,12 @@ use leptos::prelude::*; -use leptos_router::hooks::use_url; -use rustlanges_components::{ - badge::{Type, Variant}, - button::{Button, Variant as ButtonVariant}, -}; +use rustlanges_components::button::{Button, Variant as ButtonVariant}; use crate::components::{ became_sponsor::BecameSponsorSection, community_project::CommunityProjectSection, footer::Footer, our_community::OurCommunitySection, our_sponsors::OurSponsorsSection, }; +#[allow(unused_variables)] #[component] pub fn Index() -> impl IntoView { let (gcount, wcount) = signal(20); From 26d80e90d660384883d0cc9be62664fb3421ad7d Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 19:36:32 -0600 Subject: [PATCH 26/27] clippy: lo di todo x2 --- src/components/community_project.rs | 5 +---- src/lib.rs | 1 - src/pages/communities.rs | 6 ++++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/community_project.rs b/src/components/community_project.rs index 92bdd76..d9451a6 100644 --- a/src/components/community_project.rs +++ b/src/components/community_project.rs @@ -4,10 +4,7 @@ use rustlanges_components::{ icons::{Github, StarBold}, }; -use crate::{ - components::project_card::ProjectCard, - models::GithubUser, -}; +use crate::{components::project_card::ProjectCard, models::GithubUser}; #[component] pub fn CommunityProjectSection( diff --git a/src/lib.rs b/src/lib.rs index ecabc3a..d7eb39f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,6 @@ macro_rules! error { #[cfg(feature = "hydrate")] #[wasm_bindgen::prelude::wasm_bindgen] pub fn hydrate() { - console_error_panic_hook::set_once(); leptos::mount::hydrate_islands(); } diff --git a/src/pages/communities.rs b/src/pages/communities.rs index 0adc3c2..fd1fc88 100644 --- a/src/pages/communities.rs +++ b/src/pages/communities.rs @@ -24,10 +24,12 @@ pub fn Communities() -> impl IntoView { avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4", }; - let users = [juanperas.clone(), + let users = [ + juanperas.clone(), apika.clone(), sergio.clone(), - juanperas.clone()]; + juanperas.clone(), + ]; let avatars = users .iter() From 6e48a8e62b40f4cd808d46483ebb18a62a901ab0 Mon Sep 17 00:00:00 2001 From: MarioYellowy Date: Thu, 14 May 2026 19:42:23 -0600 Subject: [PATCH 27/27] feat(clippy.yml): Only in ready for review --- .github/workflows/clippy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 72b83d6..b99a2a6 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -2,6 +2,8 @@ name: clippy on: workflow_dispatch: pull_request: + types: + - ready_for_review push: branches: