Skip to content

Conversation

@edenhaus
Copy link
Member

@edenhaus edenhaus commented Nov 2, 2025

Decreased stroke width to get a better result in HA

Before After
grafik grafik

Copilot AI review requested due to automatic review settings November 2, 2025 14:56
@edenhaus edenhaus added the pr: refactor PR with code refactoring label Nov 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors CSS styling to extract stroke-width properties into a separate reusable CSS class (StrokeWidth2). The change enables composable styling by allowing multiple CSS classes to be combined instead of hardcoding stroke width values in individual class definitions.

Key changes:

  • Introduced a new StrokeWidth2 CSS class with stroke-width: 2
  • Removed inline stroke-width values from OutlineStroke and WallBase classes
  • Added get_class_names function to concatenate multiple CSS class names
  • Applied the new StrokeWidth2 class to outlines and walls that previously had hardcoded stroke widths

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/map/style.rs Added StrokeWidth2 enum variant, created get_class_names helper function, removed hardcoded stroke-width values from OutlineStroke and WallBase CSS entries
src/map/mod.rs Updated wall rendering to use array of CSS classes and get_class_names instead of single class
src/map/map_info.rs Added StrokeWidth2 to outline layers to maintain stroke width after removal from OutlineStroke definition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.58%. Comparing base (961b1fa) to head (2be2b6c).
⚠️ Report is 1 commits behind head on dev.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1283      +/-   ##
==========================================
+ Coverage   94.54%   94.58%   +0.03%     
==========================================
  Files         148      148              
  Lines        5775     5814      +39     
  Branches      350      350              
==========================================
+ Hits         5460     5499      +39     
  Misses        253      253              
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 2, 2025

CodSpeed Performance Report

Merging #1283 will not alter performance

Comparing adjust-stroke-width (2be2b6c) with dev (961b1fa)

Summary

✅ 107 untouched

@edenhaus edenhaus merged commit d4b6cb3 into dev Nov 2, 2025
42 checks passed
@edenhaus edenhaus deleted the adjust-stroke-width branch November 2, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: refactor PR with code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants