Dashboard button #25

Merged
meraghon merged 8 commits from feat/dashboard-button into main 2025-12-05 13:35:07 +00:00
2 changed files with 9 additions and 3 deletions
Showing only changes of commit 647e7d88a6 - Show all commits

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
use leptos::prelude::*;
BobdaFett commented 2025-11-27 21:22:23 +00:00 (Migrated from github.com)
Review

These should not be Optional values. When we use #[prop(optional), it just means that we either have a value, or the default value. For something like this (a String) that would mean we either have a specific value passed in or just the empty string.

These should not be Optional values. When we use `#[prop(optional)`, it just means that we either have a value, or the default value. For something like this (a String) that would mean we either have a specific value passed in or just the empty string.
BobdaFett commented 2025-11-27 21:23:30 +00:00 (Migrated from github.com)
Review

Setting up the #[prop] the right way above should mean that you just print the string value here, no mapping needed.

Setting up the `#[prop]` the right way above should mean that you just print the string value here, no mapping needed.
BobdaFett commented 2025-11-27 21:26:03 +00:00 (Migrated from github.com)
Review

Depending on your desired behavior, leaving this as an Option<String> might be fine. What I'd like to know is the mindset behind it - if this is a None value, how are you handling it? Should this even be optional at all? Why?

I'd recommend documenting this properly (refer to Leptos documentation for how to add doc comments to components).

Depending on your desired behavior, leaving this as an `Option<String>` might be fine. What I'd like to know is the mindset behind it - if this is a `None` value, how are you handling it? Should this even be optional at all? Why? I'd recommend documenting this properly (refer to Leptos documentation for how to add doc comments to components).
BobdaFett commented 2025-12-05 13:07:30 +00:00 (Migrated from github.com)
Review

These props should also have comments. They just have the /// comment one line above.

These props should also have comments. They just have the `/// comment` one line above.
BobdaFett commented 2025-12-05 13:08:03 +00:00 (Migrated from github.com)
Review

There should always be a space after the # in headers.

There should always be a space after the `#` in headers.
#[component]
pub fn DashboardButton() -> impl IntoView {
view! {}
}
+4 -3
View File
@@ -1,5 +1,7 @@
mod action_button; mod action_button;
mod checkbox; mod checkbox;
mod chips;
mod dashboard_button;
mod loading; mod loading;
mod multi_entry; mod multi_entry;
mod panel; mod panel;
@@ -7,9 +9,8 @@ mod radio;
mod row; mod row;
mod select; mod select;
mod text_field; mod text_field;
mod chips;
pub use self::{ pub use self::{
action_button::*, checkbox::*, loading::*, multi_entry::*, panel::*, radio::*, row::*, action_button::*, checkbox::*, chips::*, loading::*, multi_entry::*, panel::*, radio::*,
select::*, text_field::*, chips::* row::*, select::*, text_field::*,
}; };