app

Local-first trade for farms and co-ops
git clone https://radroots.dev/git/app.git
Log | Files | Refs | README | LICENSE

commit 3ab4d01b707ced301e96cc97ee404b1ae0a465c8
parent ee0f4439b3e7a398a4ee84e44191ad43150033ec
Author: triesap <tyson@radroots.org>
Date:   Sun,  7 Jun 2026 15:57:39 -0700

ui: remove farm profile completeness card

Diffstat:
Mcrates/desktop/src/source_guards.rs | 11-----------
Mcrates/desktop/src/window.rs | 172+------------------------------------------------------------------------------
Mcrates/i18n/src/keys.rs | 11-----------
Mi18n/locales/en/messages.json | 11-----------
4 files changed, 1 insertion(+), 204 deletions(-)

diff --git a/crates/desktop/src/source_guards.rs b/crates/desktop/src/source_guards.rs @@ -427,17 +427,6 @@ const REQUIRED_WINDOW_COPY_KEYS: &[&str] = &[ "AppTextKey::AccountFarmDetailsAboutFarmValue", "AppTextKey::AccountFarmDetailsFarmLocationValue", "AppTextKey::AccountFarmDetailsRequiredFieldNote", - "AppTextKey::AccountFarmDetailsCompletenessTitle", - "AppTextKey::AccountFarmDetailsCompletenessPercent", - "AppTextKey::AccountFarmDetailsCompletenessCallout", - "AppTextKey::AccountFarmDetailsCompletenessBody", - "AppTextKey::AccountFarmDetailsStepFarmProfile", - "AppTextKey::AccountFarmDetailsStepLocation", - "AppTextKey::AccountFarmDetailsStepOperatingDetails", - "AppTextKey::AccountFarmDetailsStepPickupFulfillment", - "AppTextKey::AccountFarmDetailsStepReviewPublish", - "AppTextKey::AccountFarmDetailsStatusInProgress", - "AppTextKey::AccountFarmDetailsStatusNotStarted", "AppTextKey::AccountFarmDetailsSummaryTitle", "AppTextKey::AccountFarmDetailsFarmTypeSummaryLabel", "AppTextKey::AccountFarmDetailsEstablishedSummaryLabel", diff --git a/crates/desktop/src/window.rs b/crates/desktop/src/window.rs @@ -9750,10 +9750,7 @@ fn account_farm_profile_panel( )) .child(account_farm_profile_section_row( account_farm_profile_main_card(form, is_textarea_wrap_ready, cx), - app_stack_v(APP_UI_THEME.shells.home_stack_gap_px) - .w_full() - .child(account_farm_profile_completeness_card()) - .child(account_farm_profile_summary_card(cx)), + account_farm_profile_summary_card(cx), )) .child(account_farm_profile_section_row( account_farm_location_card(form), @@ -10639,173 +10636,6 @@ fn account_farm_date_range_fields( ) } -fn account_farm_profile_completeness_card() -> impl IntoElement { - account_farm_profile_card( - app_stack_v(APP_UI_THEME.shells.home_stack_gap_px) - .w_full() - .child( - div() - .w_full() - .text_size(px(APP_UI_THEME.foundation.typography.body_text_px * 1.1)) - .font_weight(gpui::FontWeight::BOLD) - .text_color(rgb(APP_UI_THEME.foundation.text.primary)) - .child(app_shared_text( - AppTextKey::AccountFarmDetailsCompletenessTitle, - )), - ) - .child( - div() - .w_full() - .flex() - .items_center() - .gap(px(APP_UI_THEME.shells.home_stack_gap_px)) - .child(account_farm_profile_progress_badge()) - .child( - app_stack_v(6.0) - .flex_1() - .min_w_0() - .child( - div() - .text_size(px(APP_UI_THEME.foundation.typography.body_text_px)) - .font_weight(gpui::FontWeight::BOLD) - .text_color(rgb(APP_UI_THEME.foundation.text.primary)) - .child(app_shared_text( - AppTextKey::AccountFarmDetailsCompletenessCallout, - )), - ) - .child( - div() - .line_height(relative(1.3)) - .text_size(px(APP_UI_THEME.foundation.typography.body_text_px)) - .text_color(rgb(APP_UI_THEME.foundation.text.secondary)) - .child(app_shared_text( - AppTextKey::AccountFarmDetailsCompletenessBody, - )), - ), - ), - ) - .child(account_farm_profile_step_list()), - ) -} - -fn account_farm_profile_progress_badge() -> impl IntoElement { - div() - .size(px(72.0)) - .rounded(px(36.0)) - .border_1() - .border_color(rgb(APP_UI_THEME - .components - .app_button - .primary_colors - .background)) - .bg(transparent_black()) - .flex() - .items_center() - .justify_center() - .text_size(px(APP_UI_THEME.foundation.typography.body_text_px * 1.25)) - .font_weight(gpui::FontWeight::BOLD) - .text_color(rgb(APP_UI_THEME.foundation.text.primary)) - .child(app_shared_text( - AppTextKey::AccountFarmDetailsCompletenessPercent, - )) -} - -fn account_farm_profile_step_list() -> impl IntoElement { - app_stack_v(8.0) - .w_full() - .child(account_farm_profile_step_row( - 1, - AppTextKey::AccountFarmDetailsStepFarmProfile, - AppTextKey::AccountFarmDetailsStatusInProgress, - true, - )) - .child(account_farm_profile_step_row( - 2, - AppTextKey::AccountFarmDetailsStepLocation, - AppTextKey::AccountFarmDetailsStatusNotStarted, - false, - )) - .child(account_farm_profile_step_row( - 3, - AppTextKey::AccountFarmDetailsStepOperatingDetails, - AppTextKey::AccountFarmDetailsStatusNotStarted, - false, - )) - .child(account_farm_profile_step_row( - 4, - AppTextKey::AccountFarmDetailsStepPickupFulfillment, - AppTextKey::AccountFarmDetailsStatusNotStarted, - false, - )) - .child(account_farm_profile_step_row( - 5, - AppTextKey::AccountFarmDetailsStepReviewPublish, - AppTextKey::AccountFarmDetailsStatusNotStarted, - false, - )) -} - -fn account_farm_profile_step_row( - number: usize, - label_key: AppTextKey, - status_key: AppTextKey, - active: bool, -) -> impl IntoElement { - let marker_bg = if active { - APP_UI_THEME.components.app_button.primary_colors.background - } else { - APP_UI_THEME.foundation.surfaces.divider - }; - let marker_fg = if active { - APP_UI_THEME.components.app_button.primary_colors.foreground - } else { - APP_UI_THEME.foundation.text.secondary - }; - let row_bg = if active { - APP_UI_THEME.foundation.surfaces.card_background - } else { - APP_UI_THEME.foundation.surfaces.window_background - }; - - div() - .w_full() - .rounded(px(APP_UI_THEME.foundation.radii.medium_px)) - .bg(rgb(row_bg)) - .px(px(8.0)) - .py(px(6.0)) - .flex() - .items_center() - .gap(px(8.0)) - .child( - div() - .size(px(18.0)) - .rounded(px(9.0)) - .bg(rgb(marker_bg)) - .flex() - .items_center() - .justify_center() - .text_size(px(APP_UI_THEME.foundation.typography.utility_title_text_px)) - .font_weight(gpui::FontWeight::BOLD) - .text_color(rgb(marker_fg)) - .child(number.to_string()), - ) - .child( - div() - .flex_1() - .min_w_0() - .text_size(px(APP_UI_THEME.foundation.typography.body_text_px)) - .font_weight(gpui::FontWeight::MEDIUM) - .text_color(rgb(APP_UI_THEME.foundation.text.primary)) - .child(app_shared_text(label_key)), - ) - .child( - div() - .text_size(px(APP_UI_THEME.foundation.typography.utility_title_text_px)) - .text_color(rgb(APP_UI_THEME.foundation.text.secondary)) - .child(app_shared_text(status_key)), - ) -} - fn account_farm_profile_summary_card(cx: &mut Context<HomeView>) -> impl IntoElement { account_farm_profile_card( app_stack_v(APP_UI_THEME.shells.home_stack_gap_px) diff --git a/crates/i18n/src/keys.rs b/crates/i18n/src/keys.rs @@ -79,17 +79,6 @@ define_app_text_keys! { AccountFarmDetailsAboutFarmValue => "account.farm_details.about_farm.value", AccountFarmDetailsFarmLocationValue => "account.farm_details.farm_location.value", AccountFarmDetailsRequiredFieldNote => "account.farm_details.required_field.note", - AccountFarmDetailsCompletenessTitle => "account.farm_details.completeness.title", - AccountFarmDetailsCompletenessPercent => "account.farm_details.completeness.percent", - AccountFarmDetailsCompletenessCallout => "account.farm_details.completeness.callout", - AccountFarmDetailsCompletenessBody => "account.farm_details.completeness.body", - AccountFarmDetailsStepFarmProfile => "account.farm_details.step.farm_profile", - AccountFarmDetailsStepLocation => "account.farm_details.step.location", - AccountFarmDetailsStepOperatingDetails => "account.farm_details.step.operating_details", - AccountFarmDetailsStepPickupFulfillment => "account.farm_details.step.pickup_fulfillment", - AccountFarmDetailsStepReviewPublish => "account.farm_details.step.review_publish", - AccountFarmDetailsStatusInProgress => "account.farm_details.status.in_progress", - AccountFarmDetailsStatusNotStarted => "account.farm_details.status.not_started", AccountFarmDetailsSummaryTitle => "account.farm_details.summary.title", AccountFarmDetailsFarmTypeSummaryLabel => "account.farm_details.summary.farm_type.label", AccountFarmDetailsEstablishedSummaryLabel => "account.farm_details.summary.established.label", diff --git a/i18n/locales/en/messages.json b/i18n/locales/en/messages.json @@ -58,17 +58,6 @@ "account.farm_details.about_farm.value": "We're a family-run farm in Victoria, British Columbia growing fresh, sustainable produce. Our mission is to nourish our community with high-quality vegetables while caring for the land.", "account.farm_details.farm_location.value": "Victoria, BC, Canada", "account.farm_details.required_field.note": "* Required field", - "account.farm_details.completeness.title": "Profile completeness", - "account.farm_details.completeness.percent": "18%", - "account.farm_details.completeness.callout": "Let's build a great profile.", - "account.farm_details.completeness.body": "Complete these steps to publish your farm profile.", - "account.farm_details.step.farm_profile": "Farm profile", - "account.farm_details.step.location": "Location", - "account.farm_details.step.operating_details": "Operating details", - "account.farm_details.step.pickup_fulfillment": "Pickup & fulfillment", - "account.farm_details.step.review_publish": "Review & publish", - "account.farm_details.status.in_progress": "In progress", - "account.farm_details.status.not_started": "Not started", "account.farm_details.summary.title": "Farm summary", "account.farm_details.summary.farm_type.label": "Farm type", "account.farm_details.summary.established.label": "Established",