#1229-generic-themed-buttons #1253

Open
c22abdal wants to merge 3 commits from #1229-generic-themed-buttons into main
Collaborator

Summary

Updates dashboard card buttons to use the shared Button component so they follow the selected website theme and light/dark mode consistently.

Changes

  • Improved the shared Button component and theme-aware styling
  • Added primary, secondary, danger and ghost variants
  • Added selected, focus and disabled states
  • Applied shared buttons to:
    • Map
    • Parking
    • Västtrafik
    • History
    • Translator
    • Temperature views
    • Energy sensor
    • SMHI forecast
    • Add Card modal
  • Added accessibility labels to arrow-only navigation buttons
  • Preserved specialized controls with complex local styling

Testing

  • Manually verify card button interactions
  • Verify selected button states
  • Verify light and dark modes
  • Verify the available website color themes

Notes

Specialized controls such as To-do, Text editor, Sudoku and Login buttons were left unchanged to avoid affecting their existing layouts and behavior.

## Summary Updates dashboard card buttons to use the shared _Button_ component so they follow the selected website theme and light/dark mode consistently. ## Changes - Improved the shared Button component and theme-aware styling - Added primary, secondary, danger and ghost variants - Added selected, focus and disabled states - Applied shared buttons to: - Map - Parking - Västtrafik - History - Translator - Temperature views - Energy sensor - SMHI forecast - Add Card modal - Added accessibility labels to arrow-only navigation buttons - Preserved specialized controls with complex local styling ## Testing - Manually verify card button interactions - Verify selected button states - Verify light and dark modes - Verify the available website color themes ## Notes Specialized controls such as To-do, Text editor, Sudoku and Login buttons were left unchanged to avoid affecting their existing layouts and behavior.
applied button to cards
Some checks failed
Playwright Tests / test (pull_request) Has been cancelled
c237575a8b
Fixed formatting + added Button
Some checks failed
Playwright Tests / test (pull_request) Has been cancelled
cd1b5ba540
Fixed prettier formatting, and added the Button on the missing classes and removed some overlapping borders and stylings
Author
Collaborator

Review on #1229

Whats done

Tested on Windows via Firefox

  • App starts

  • Verified that themed buttons are applied to the intended cards.

  • Checked selected, disabled, hover and keyboard-focus styling in the code.

  • Interactive browser testing was unavailable.

  • Automated Jest tests are blocked by the repository’s existing JSX transformation configuration.
    Inspected following files

  • Button.js and Button.css

    • Indentation follows Prettier.
    • CSS uses isolated .themed-button classes to avoid conflicts with legacy Dashboard styles.
    • Primary, secondary, danger, ghost, selected, disabled and focus states are defined.
    • Naming is clear and consistent.
    • Standard button properties are forwarded correctly.
    • Duplicate CSS declarations were removed.
  • Map, Parking, History and Västtrafik views

    • Shared themed buttons are applied correctly.
    • Selected states use the correct active value.
    • Existing behavior and localization were preserved.
    • Formatting follows Prettier.
  • Temperature and Energy views

    • Navigation arrows use shared ghost buttons.
    • Accessible labels are localized in English and Swedish.
    • Local CSS contains only necessary sizing and spacing.
    • Navigation logic remains unchanged.
  • Translator and SMHI views

    • Translator correctly disables lookup for empty input and while loading.
    • SMHI show/hide controls use themed buttons.
    • The unused SMHI import was removed.
    • Printed text follows localization standards.
  • Add Card modal

    • Category and footer actions use the shared button.
    • Complex card-selector styling was intentionally preserved.
    • Existing modal behavior remains unchanged.
  • package.json and package-lock.json

    • No dependencies were introduced by the button work.
    • No unapproved packages were found.

What needs to be done

  • Manual browser testing

    • Verify every website theme in light and dark mode.
    • Test all changed card controls and selected states.
    • Confirm keyboard focus is clearly visible.
  • Automated tests

    • The repository’s Jest configuration must eventually be updated to transform JSX correctly. This is an existing project-level issue, not introduced by #1229.

Conclusion

  • The reviewed code follows the project’s formatting, CSS, naming and localization conventions.
  • No blocking code issues were found in the button implementation.
  • The branch is ready for merge after a final manual browser check.
# Review on #1229 ## Whats done Tested on Windows via Firefox - App starts - Verified that themed buttons are applied to the intended cards. - Checked selected, disabled, hover and keyboard-focus styling in the code. - Interactive browser testing was unavailable. - Automated Jest tests are blocked by the repository’s existing JSX transformation configuration. Inspected following files - Button.js and Button.css - Indentation follows Prettier. - CSS uses isolated .themed-button classes to avoid conflicts with legacy Dashboard styles. - Primary, secondary, danger, ghost, selected, disabled and focus states are defined. - Naming is clear and consistent. - Standard button properties are forwarded correctly. - Duplicate CSS declarations were removed. - Map, Parking, History and Västtrafik views - Shared themed buttons are applied correctly. - Selected states use the correct active value. - Existing behavior and localization were preserved. - Formatting follows Prettier. - Temperature and Energy views - Navigation arrows use shared ghost buttons. - Accessible labels are localized in English and Swedish. - Local CSS contains only necessary sizing and spacing. - Navigation logic remains unchanged. - Translator and SMHI views - Translator correctly disables lookup for empty input and while loading. - SMHI show/hide controls use themed buttons. - The unused SMHI import was removed. - Printed text follows localization standards. - Add Card modal - Category and footer actions use the shared button. - Complex card-selector styling was intentionally preserved. - Existing modal behavior remains unchanged. - package.json and package-lock.json - No dependencies were introduced by the button work. - No unapproved packages were found. ## What needs to be done - Manual browser testing - Verify every website theme in light and dark mode. - Test all changed card controls and selected states. - Confirm keyboard focus is clearly visible. - Automated tests - The repository’s Jest configuration must eventually be updated to transform JSX correctly. This is an existing project-level issue, not introduced by #1229. ## Conclusion - The reviewed code follows the project’s formatting, CSS, naming and localization conventions. - No blocking code issues were found in the button implementation. - The branch is ready for merge after a final manual browser check.
Some checks failed
Playwright Tests / test (pull_request) Has been cancelled
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin #1229-generic-themed-buttons:#1229-generic-themed-buttons
git switch #1229-generic-themed-buttons

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff #1229-generic-themed-buttons
git switch #1229-generic-themed-buttons
git rebase main
git switch main
git merge --ff-only #1229-generic-themed-buttons
git switch #1229-generic-themed-buttons
git rebase main
git switch main
git merge --no-ff #1229-generic-themed-buttons
git switch main
git merge --squash #1229-generic-themed-buttons
git switch main
git merge --ff-only #1229-generic-themed-buttons
git switch main
git merge #1229-generic-themed-buttons
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!1253
No description provided.