Skip to content

refactor: unify reusable add bed icon in hierarchy table and hint#185

Merged
stipsitzm merged 16 commits intomainfrom
codex/create-reusable-addbedicon-component
May 1, 2026
Merged

refactor: unify reusable add bed icon in hierarchy table and hint#185
stipsitzm merged 16 commits intomainfrom
codex/create-reusable-addbedicon-component

Conversation

@stipsitzm
Copy link
Copy Markdown
Owner

Motivation

  • Reduce the visual dominance of the inline "+" add control and make it a secondary, subtle action across the hierarchy UI.
  • Ensure the exact same visual is reused in both the table action and the informational hint to guarantee perfect visual consistency.
  • Centralize styling and interactive behavior so the control can be toggled between interactive and decorative modes without duplicating styles.

Description

  • Add a new shared component AddBedIcon that encapsulates all visual rules and interaction props (24x24 container, 14px icon, circular border, subtle green palette, 150ms transitions, interactive prop). (frontend/src/components/hierarchy/AddBedIcon.tsx)
  • Replace the field-row add-bed action in the hierarchy table with the shared AddBedIcon used as an interactive control and wrapped in a Tooltip, preserving aria-label support and click handling. (frontend/src/components/hierarchy/HierarchyColumns.tsx)
  • Replace the plain "+" in the missing-beds info box with the same AddBedIcon rendered as non-interactive/decorative (interactive={false}, aria-hidden) and aligned with text baseline. (frontend/src/pages/FieldsBedsPage.tsx)
  • Split the German i18n hint string into before/after segments so the inline icon can be embedded without changing localized sentence flow. (frontend/src/i18n/locales/de/hierarchy.json)

Testing

  • No automated tests were run for this change (per request).

Codex Task

@github-actions github-actions Bot added the release:minor Triggers minor version bump label Apr 30, 2026
@stipsitzm stipsitzm merged commit b669b87 into main May 1, 2026
3 of 4 checks passed
@stipsitzm stipsitzm deleted the codex/create-reusable-addbedicon-component branch May 1, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex release:minor Triggers minor version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant