Skip to content

Fix saved farm fields visibility on atlas map#368

Merged
SvenVw merged 2 commits into
mainfrom
hotfix/FDM367
Dec 5, 2025
Merged

Fix saved farm fields visibility on atlas map#368
SvenVw merged 2 commits into
mainfrom
hotfix/FDM367

Conversation

@SvenVw
Copy link
Copy Markdown
Collaborator

@SvenVw SvenVw commented Dec 5, 2025

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed an issue where saved fields were not displaying with colored outlines on the map.
  • Chores

    • Bumped version to 0.25.2.

✏️ Tip: You can customize this high-level summary in your review settings.

Closes #367

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 5, 2025

⚠️ No Changeset found

Latest commit: 49c65e9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 5, 2025

Walkthrough

This PR fixes visibility of saved fields in the Atlas map interface by adding layer existence guards in atlas-panels.tsx, introducing a FieldsSourceNotClickable wrapper component around saved fields layers in route components, and explicitly binding layer sources to ensure correct data references. Version bumped to 0.25.2.

Changes

Cohort / File(s) Summary
Atlas layer safety and rendering
fdm-app/app/components/blocks/atlas/atlas-panels.tsx, fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx, fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
Added guard to ensure main target layer exists before feature processing; reworked layerExclude logic to compute and filter existing layers; renamed style constants (removed leading underscores); wrapped saved fields rendering in FieldsSourceNotClickable container; explicitly bound Layer components to fieldsSavedId source.
Release documentation and versioning
fdm-app/CHANGELOG.md, fdm-app/package.json
Bumped version from 0.25.1 to 0.25.2; added patch release entry documenting fix for saved fields visibility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • atlas-panels.tsx: Review the layer existence guard logic and layerExclude filtering to ensure exclude-features check only runs with valid layers.
  • Route components: Verify source binding consistency across FieldsSourceNotClickable wrapper instances and ensure Layer component ordering is correct.

Possibly related PRs

  • PR #224: Modifies atlas field-selection code and layer exclusion/exclude handling alongside non-clickable saved-fields source additions.
  • PR #33: Updates atlas field rendering with FieldsSourceNotClickable component and field source/layer bindings.
  • PR #228: Adjusts atlas field rendering and layer composition by adding non-clickable saved-field layers in the same components.

Suggested reviewers

  • BoraIneviNMI
  • gerardhros

Poem

🐰 Hops with glee o'er verdant fields,
Green outlines now the map reveals!
No more hidden in the mist,
Saved fields join the atlas list!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix saved farm fields visibility on atlas map' directly aligns with the main objective of restoring visibility of saved field boundaries on the atlas map.
Linked Issues check ✅ Passed The PR addresses issue #367 by modifying layer handling, conditional rendering, and source binding to restore visibility of saved farm fields as intended.
Out of Scope Changes check ✅ Passed All changes are scoped to restoring saved field visibility: panel guard logic, layer filtering, conditional field rendering, and version/changelog updates are all directly related to the fix.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hotfix/FDM367

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f443234 and 49c65e9.

📒 Files selected for processing (2)
  • fdm-app/CHANGELOG.md (1 hunks)
  • fdm-app/package.json (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • fdm-app/CHANGELOG.md
  • fdm-app/package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 5, 2025

👋 Hotfix Branch PR Detected!

Before merging this Pull Request into main, please ensure you have finalized the hotfix by manually running the 'Release' workflow on this hotfix/FDM367 branch.

This will:

  1. Bump package versions.
  2. Generate changelogs.
  3. Create Git tags.

You can trigger the workflow from the 'Actions' tab, selecting the 'Release' workflow, and choosing this hotfix/FDM367 branch.

@SvenVw SvenVw requested a review from BoraIneviNMI December 5, 2025 15:42
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.62%. Comparing base (9d48861) to head (f443234).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #368   +/-   ##
=======================================
  Coverage   87.62%   87.62%           
=======================================
  Files          79       79           
  Lines        3959     3959           
  Branches     1145     1145           
=======================================
  Hits         3469     3469           
  Misses        490      490           
Flag Coverage Δ
fdm-calculator 87.81% <ø> (ø)
fdm-core 87.08% <ø> (ø)
fdm-data 92.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

BoraIneviNMI
BoraIneviNMI previously approved these changes Dec 5, 2025
Copy link
Copy Markdown
Collaborator

@BoraIneviNMI BoraIneviNMI left a comment

Choose a reason for hiding this comment

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

I approve. The style ids used in the atlas are just confusing, which is also something to look into later.

@coderabbitai coderabbitai Bot changed the title @coderabbitai Fix saved farm fields visibility on atlas map Dec 5, 2025
@coderabbitai coderabbitai Bot added branch:main An issue, affecting the main branch, that requires an hotfix bug Something isn't working fdm-app labels Dec 5, 2025
@SvenVw SvenVw merged commit 6a8a7e9 into main Dec 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:main An issue, affecting the main branch, that requires an hotfix bug Something isn't working fdm-app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants