Skip to content

Add MapTilerAttribution component to atlas routes#381

Merged
SvenVw merged 2 commits into
developmentfrom
maptiler-attribution
Dec 17, 2025
Merged

Add MapTilerAttribution component to atlas routes#381
SvenVw merged 2 commits into
developmentfrom
maptiler-attribution

Conversation

@SvenVw
Copy link
Copy Markdown
Collaborator

@SvenVw SvenVw commented Dec 17, 2025

Summary by CodeRabbit

  • New Features
    • MapTiler attribution is now shown across all map interfaces — elevation maps, field management screens, field detail views, and farm creation workflows.

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

@SvenVw SvenVw self-assigned this Dec 17, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 17, 2025

⚠️ No Changeset found

Latest commit: e6b6033

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 17, 2025

Walkthrough

Adds a new MapTilerAttribution React component that conditionally renders MapTiler attribution when configured, and integrates it into multiple Atlas MapGL-based route views to display the attribution UI.

Changes

Cohort / File(s) Summary
New Attribution Component
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx
Added MapTilerAttribution function component that conditionally renders an absolutely positioned MapTiler attribution link/logo based on clientConfig.integrations.map.provider.
Atlas map route integrations
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx, fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx, fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx, fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx, fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx, fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
Imported and rendered <MapTilerAttribution /> inside the MapGL rendering trees across atlas route pages (single-line insertion per file).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Repetitive pattern: same import + single-line JSX insertion across multiple files.
  • Checkpoints for review:
    • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx — ensure conditional logic and styling are correct and accessible.
    • Each atlas route file — verify import paths, placement inside MapGL, and no unintended layout overlap with existing controls (e.g., z-index).
    • Confirm no runtime errors when clientConfig.integrations.map is undefined.

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • gerardhros
  • BoraIneviNMI

Poem

🐇 I hop where map tiles meet the ground,
A tiny credit gently found.
When MapTiler's set, I'll proudly show,
A logo link where breezes blow.
Hooray for maps — small hop, big glow!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a MapTilerAttribution component to multiple atlas route files. It is concise, specific, and clearly summarizes the primary purpose of the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch maptiler-attribution

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd9c002 and e6b6033.

📒 Files selected for processing (1)
  • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: core (24)

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.41%. Comparing base (c39d0fe) to head (e6b6033).
⚠️ Report is 3 commits behind head on development.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #381   +/-   ##
============================================
  Coverage        87.41%   87.41%           
============================================
  Files               91       91           
  Lines             4497     4497           
  Branches          1345     1345           
============================================
  Hits              3931     3931           
  Misses             566      566           
Flag Coverage Δ
fdm-calculator 87.36% <ø> (ø)
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.

@coderabbitai coderabbitai Bot changed the title @coderabbitai Add MapTilerAttribution component to atlas routes Dec 17, 2025
@coderabbitai coderabbitai Bot added branch:development Issue only affecting development, not the main branch (yet) fdm-app labels Dec 17, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1)

3-19: Consider improvements for robustness and maintainability.

The component implementation is functional but could benefit from these enhancements:

  1. External image reliability: The MapTiler logo is loaded from an external URL without error handling. Consider adding an onError handler or using a fallback.

  2. High zIndex value: The zIndex: 999 is quite high and might conflict with modals, tooltips, or other overlays. Consider using a more moderate value or defining it in a central theme/constants file.

  3. Hardcoded positioning: The absolute positioning (left: 10, bottom: 10) might overlap with other map controls. Consider making this configurable or using CSS classes for better maintainability.

  4. Accessibility: While the alt text is provided, consider adding rel="noopener noreferrer" to the anchor tag for security when opening external links.

Example improvement:

 export function MapTilerAttribution() {
     if (clientConfig.integrations.map.provider !== "maptiler") {
         return null
     }

     return (
         <a
             href="https://www.maptiler.com"
-            style={{ position: "absolute", left: 10, bottom: 10, zIndex: 999 }}
+            style={{ position: "absolute", left: 10, bottom: 10, zIndex: 50 }}
+            rel="noopener noreferrer"
+            target="_blank"
         >
             <img
                 src="https://api.maptiler.com/resources/logo.svg"
                 alt="MapTiler logo"
+                onError={(e) => { e.currentTarget.style.display = 'none' }}
             />
         </a>
     )
 }
📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c39d0fe and bd9c002.

📒 Files selected for processing (7)
  • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1 hunks)
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx (2 hunks)
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx (2 hunks)
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx (2 hunks)
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx (2 hunks)
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx (2 hunks)
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx (2 hunks)
🧰 Additional context used
🧠 Learnings (25)
📓 Common learnings
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 161
File: fdm-app/app/components/blocks/field-map.tsx:68-68
Timestamp: 2025-06-10T12:20:38.360Z
Learning: When using MapGL component from react-map-gl, the correct prop name for the Mapbox access token is `mapboxApiAccessToken` as verified by checking the MapboxProps interface. This should be consistent across all usages of the MapGL component.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 161
File: fdm-app/app/components/blocks/field-map.tsx:0-0
Timestamp: 2025-06-10T13:10:03.154Z
Learning: When facing prop name inconsistencies with react-map-gl (like mapboxAccessToken vs mapboxApiAccessToken), using different import statements can resolve the issue more elegantly than changing prop names across multiple files.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/components/custom/atlas/atlas.d.tsx:8-8
Timestamp: 2025-01-31T14:29:37.599Z
Learning: In the Atlas component's MapFieldsProps interface, mapStyle is intentionally restricted to "mapbox://styles/mapbox/satellite-streets-v12" as it's currently the only supported style option.
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 161
File: fdm-app/app/components/blocks/field-map.tsx:68-68
Timestamp: 2025-06-10T12:20:38.360Z
Learning: In react-map-gl v8.0.4, the correct prop name for the Mapbox access token in the MapGL component is `mapboxApiAccessToken`, not `mapboxAccessToken` as verified by checking the MapboxProps interface.
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A shared layout component `FarmLayoutBase` has been created in `components/custom/farm-layout-base.tsx` to maintain consistency across farm-related pages. The component handles farm selection dropdown, breadcrumb navigation, and provides a common layout structure.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2024-11-25T14:42:26.660Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 6
File: fdm-app/app/components/blocks/field-map.tsx:0-0
Timestamp: 2024-11-25T14:42:26.660Z
Learning: In `fdm-app/app/components/blocks/field-map.tsx`, explicit cleanup of Mapbox GL resources is not necessary, as `react-map-gl` handles it automatically upon component unmount, and `MapRef` does not have a `remove` method.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: The `FarmLayout` component in `components/custom/farm-layout.tsx` provides a reusable layout structure for farm-related pages, with support for farm selection dropdown, customizable breadcrumb titles, and flexible content rendering through either children or Outlet components.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-08-11T12:24:32.200Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 233
File: fdm-app/app/components/blocks/atlas-fields/cultivation-history.tsx:53-53
Timestamp: 2025-08-11T12:24:32.200Z
Learning: In `fdm-app/app/components/blocks/atlas-fields/cultivation-history.tsx`, the NMI API for cultivations guarantees that each year will be unique in the cultivation history data, so using `cultivation.year` as a React list key is safe and won't cause duplicate key warnings.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-06-10T13:10:03.154Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 161
File: fdm-app/app/components/blocks/field-map.tsx:0-0
Timestamp: 2025-06-10T13:10:03.154Z
Learning: When facing prop name inconsistencies with react-map-gl (like mapboxAccessToken vs mapboxApiAccessToken), using different import statements can resolve the issue more elegantly than changing prop names across multiple files.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-01-31T14:29:37.599Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/components/custom/atlas/atlas.d.tsx:8-8
Timestamp: 2025-01-31T14:29:37.599Z
Learning: In the Atlas component's MapFieldsProps interface, mapStyle is intentionally restricted to "mapbox://styles/mapbox/satellite-streets-v12" as it's currently the only supported style option.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-01-31T16:06:33.810Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/routes/farm.create.$b_id_farm.atlas.tsx:164-212
Timestamp: 2025-01-31T16:06:33.810Z
Learning: Map configuration in the application should be modularized using the `useMapConfig` hook and `MapControls` component to maintain consistency across all MapGL instances.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-12-15T12:19:47.858Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 376
File: fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx:187-213
Timestamp: 2025-12-15T12:19:47.858Z
Learning: When reviewing code, prefer storing only non-sensitive UI/state data in sessionStorage. For map viewState (e.g., longitude/latitude), ensure it represents non-personal business data and that persistence across sessions is justified, documented, and respects user privacy. If persisting, use a clearly scoped, namespaced key, guard access with try/catch, and avoid syncing with servers or exposing data to third-party scripts. Apply this guideline to all TSX files that manage client-side UI state.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2024-12-16T10:56:07.561Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 16
File: fdm-app/app/routes/app.addfarm.$b_id_farm.cultivations.$b_lu_catalogue.fertilizers.tsx:1-1
Timestamp: 2024-12-16T10:56:07.561Z
Learning: The project uses `react-router` v7, and the `data` function is exported and used for error handling in loaders and actions.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-04-29T11:28:44.181Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 132
File: fdm-app/app/routes/farm.create.$b_id_farm.$calendar.access.tsx:54-68
Timestamp: 2025-04-29T11:28:44.181Z
Learning: In React Router v7, the `json()` function has been replaced with `data()` for creating responses in loaders and actions.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-01-31T15:06:35.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/components/custom/atlas/atlas-sources.tsx:21-66
Timestamp: 2025-01-31T15:06:35.764Z
Learning: In react-map-gl components, when querying rendered features via map.queryRenderedFeatures(), the effect's dependency array must include any props that affect the map's rendered state (like source data) to ensure features are queried against the current map state.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-05-09T14:41:43.484Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 138
File: fdm-app/app/components/custom/fertilizer-applications/form.tsx:6-6
Timestamp: 2025-05-09T14:41:43.484Z
Learning: The project uses React Router v7 which exports a Form component directly from the "react-router" package, making importing from "remix-run/react" unnecessary.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
📚 Learning: 2025-05-09T14:41:43.484Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 138
File: fdm-app/app/components/custom/fertilizer-applications/form.tsx:6-6
Timestamp: 2025-05-09T14:41:43.484Z
Learning: The project uses React Router v7 which exports a Form component directly from the "react-router" package, not from "remix-run/react".

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
📚 Learning: 2025-04-18T13:49:17.029Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 124
File: fdm-app/app/components/custom/farm/farm-title.tsx:3-3
Timestamp: 2025-04-18T13:49:17.029Z
Learning: In the fdm project, NavLink and other routing components can be imported from either "react-router" or "react-router-dom" as react-router-dom is included in react-router.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-09-23T12:29:34.184Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:160-163
Timestamp: 2025-09-23T12:29:34.184Z
Learning: In the FDM application, the fertilizer application route intentionally uses `${calendar}/field/fertilizer` instead of the originally planned `/farm/{farmId}/add/fertilizer` structure. This design decision prioritizes starting from the field list view to provide better field selection workflow before applying fertilizer, rather than direct dashboard-to-action navigation.

Applied to files:

  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
📚 Learning: 2025-09-23T12:27:07.391Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 274
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:151-204
Timestamp: 2025-09-23T12:27:07.391Z
Learning: In the FDM application, field overview functionality is implemented as a dedicated page accessible via `farm/{farmId}/{calendar}/field` rather than as a direct listing on the dashboard. The dashboard includes a "Perceelsoverzicht" quick action card that provides navigation to this comprehensive field management interface.

Applied to files:

  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A comprehensive farm layout system has been created in `components/custom/farm-layouts/` with `BaseFarmLayout` and `FarmSidebarLayout` components. The system supports both simple and sidebar-based layouts while maintaining consistent header and farm selection functionality across all farm routes.

Applied to files:

  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
📚 Learning: 2024-12-19T13:20:44.152Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 23
File: fdm-app/app/routes/app.addfarm.new.tsx:15-17
Timestamp: 2024-12-19T13:20:44.152Z
Learning: Authentication for the “app.addfarm.new” route is already handled globally in “fdm-app/app/routes/app.tsx,” automatically redirecting unauthenticated users to the SignIn page.

Applied to files:

  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx
📚 Learning: 2025-05-09T14:53:44.578Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 138
File: fdm-app/app/components/custom/combobox.tsx:34-37
Timestamp: 2025-05-09T14:53:44.578Z
Learning: In the context of this React Router v7 project, it's important to follow the pattern of importing only the types (like UseFormReturn) from "react-hook-form" while importing the Form component from "react-router" to avoid naming conflicts.

Applied to files:

  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
📚 Learning: 2025-05-09T14:58:10.465Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 138
File: fdm-app/app/components/custom/combobox.tsx:34-37
Timestamp: 2025-05-09T14:58:10.465Z
Learning: When updating React components that use both react-hook-form and React Router v7, it's important to only import types (like UseFormReturn, FieldValues) from react-hook-form to avoid naming conflicts with React Router's Form component. Use `import type { ... } from 'react-hook-form'` syntax to ensure only types are imported.

Applied to files:

  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
📚 Learning: 2024-12-16T10:56:33.616Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 16
File: fdm-app/app/components/custom/combobox.tsx:35-37
Timestamp: 2024-12-16T10:56:33.616Z
Learning: When using `useRemixForm`, the correct type for the `form` prop is `UseRemixFormReturn<T>` from `remix-hook-form`, not `UseFormReturn` from `react-hook-form`.

Applied to files:

  • fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx
📚 Learning: 2025-06-10T12:20:38.360Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 161
File: fdm-app/app/components/blocks/field-map.tsx:68-68
Timestamp: 2025-06-10T12:20:38.360Z
Learning: When using MapGL component from react-map-gl, the correct prop name for the Mapbox access token is `mapboxApiAccessToken` as verified by checking the MapboxProps interface. This should be consistent across all usages of the MapGL component.

Applied to files:

  • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx
📚 Learning: 2025-06-10T12:20:38.360Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 161
File: fdm-app/app/components/blocks/field-map.tsx:68-68
Timestamp: 2025-06-10T12:20:38.360Z
Learning: In react-map-gl v8.0.4, the correct prop name for the Mapbox access token in the MapGL component is `mapboxApiAccessToken`, not `mapboxAccessToken` as verified by checking the MapboxProps interface.

Applied to files:

  • fdm-app/app/components/blocks/atlas/atlas-attribution.tsx
📚 Learning: 2025-01-31T16:06:33.810Z
Learnt from: SvenVw
Repo: SvenVw/fdm PR: 67
File: fdm-app/app/routes/farm.create.$b_id_farm.atlas.tsx:164-212
Timestamp: 2025-01-31T16:06:33.810Z
Learning: MapGL implementations should use the shared `useMapConfig` hook for configuration and `getLayerStyle` utility for consistent styling. The hook supports both interactive and non-interactive maps, handling bounds calculation and view state management.

Applied to files:

  • fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx
🧬 Code graph analysis (6)
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx (1)
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1)
  • MapTilerAttribution (3-19)
fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx (1)
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1)
  • MapTilerAttribution (3-19)
fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx (1)
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1)
  • MapTilerAttribution (3-19)
fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx (1)
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1)
  • MapTilerAttribution (3-19)
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx (1)
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1)
  • MapTilerAttribution (3-19)
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx (1)
fdm-app/app/components/blocks/atlas/atlas-attribution.tsx (1)
  • MapTilerAttribution (3-19)
🔇 Additional comments (6)
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.elevation.tsx (1)

33-33: LGTM!

The MapTilerAttribution component is properly imported and rendered within the MapGL component tree. The placement is consistent with other atlas routes in this PR.

Also applies to: 557-557

fdm-app/app/routes/farm.create.$b_id_farm.$calendar.atlas.tsx (1)

34-34: LGTM!

The MapTilerAttribution component is correctly imported and rendered. The placement within the MapGL component follows the same pattern as other files in this PR.

Also applies to: 306-306

fdm-app/app/routes/farm.$b_id_farm.$calendar.field.new.tsx (1)

30-30: LGTM!

The MapTilerAttribution is properly integrated following the consistent pattern established across all map views in this PR.

Also applies to: 346-346

fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx (1)

14-14: LGTM!

The attribution component is correctly imported and rendered within the MapGL component tree, consistent with the pattern used across all other atlas views.

Also applies to: 187-187

fdm-app/app/routes/farm.create.$b_id_farm.$calendar.fields.$b_id._index.tsx (1)

29-29: LGTM!

The MapTilerAttribution component is properly integrated within the map component hierarchy, following the established pattern.

Also applies to: 391-391

fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx (1)

14-14: LGTM!

The MapTilerAttribution component is correctly imported and rendered within the MapGL component, maintaining consistency with all other map views updated in this PR.

Also applies to: 148-148

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Dec 17, 2025
@SvenVw SvenVw merged commit 235e4f9 into development Dec 17, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch:development Issue only affecting development, not the main branch (yet) enhancement New feature or request fdm-app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant