Skip to content

Draw Rectangle on Map and filter data#79

Merged
devincowan merged 15 commits intodevelopfrom
draw_rectangle
Aug 27, 2025
Merged

Draw Rectangle on Map and filter data#79
devincowan merged 15 commits intodevelopfrom
draw_rectangle

Conversation

@MSDrao
Copy link
Copy Markdown
Contributor

@MSDrao MSDrao commented Jun 11, 2025

CAM-730

Add the ability to filter by drawing a box on the map

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 11, 2025

Deploy Preview for hydroprocess ready!

Name Link
🔨 Latest commit 47bc1f1
🔍 Latest deploy log https://app.netlify.com/projects/hydroprocess/deploys/68a014bdf7350e0008cb1114
😎 Deploy Preview https://deploy-preview-79--hydroprocess.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@MSDrao MSDrao requested a review from devincowan June 11, 2025 03:51
Copy link
Copy Markdown
Contributor

@devincowan devincowan left a comment

Choose a reason for hiding this comment

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

Nice work on this Sandesh!
I left a few questions for you, but otherwise this looks good

Comment thread frontend/src/components/FilterDrawer.vue Outdated
Comment thread frontend/src/components/TheLeafletMap.vue Outdated
Comment thread frontend/src/stores/map.js
@MSDrao MSDrao requested a review from devincowan July 9, 2025 06:58
Copy link
Copy Markdown
Contributor

@devincowan devincowan left a comment

Choose a reason for hiding this comment

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

@MSDrao thanks for your updates. However, this feels pretty broken to me.
Issue with map panning:
https://github.com/user-attachments/assets/6ee967f1-852a-4f58-8502-fcd49a50b126

When I try to click an drag, no box is shown and the selected area does not match the area that I dragged over:
https://github.com/user-attachments/assets/15c7f07a-d3c2-44d5-8d69-ab11f820c020

@devincowan
Copy link
Copy Markdown
Contributor

devincowan commented Jul 9, 2025

@sandesh and I met for quite a long debugging session to figure out what's going on with this PR and cache issues between his local system and our Netlify builds.

We tried

  • Dumping browser cache
  • Incognito
  • Using npm run build && npm run preview instead of npm run dev to get a full Vite build

We used git bisect (FUN!) to narrow the problem down to this commit:
1b2b2d0

I tried but was unable to determine exactly what was going on in this commit that causes things to fail in Netlify and in my local builds but not to fail for Sandesh locally. We narrowed it down to these lines pertaining to the Leaflet Draw event handlers:
1b2b2d0#diff-48b72786e83be9529e224683e7c77fd2b1ca82dd71ffd4c3dd4d10b82f68cdb2R95-R242

I suggested that Sandesh rm -rf node_modules && npm install && npm run dev just in case that's a factor.

@martinseul tagging you for awareness...

@MSDrao MSDrao requested a review from devincowan August 4, 2025 16:25
Copy link
Copy Markdown
Contributor

@devincowan devincowan left a comment

Choose a reason for hiding this comment

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

Screen.Recording.2025-08-13.at.12.43.08.PM.mov

@devincowan
Copy link
Copy Markdown
Contributor

devincowan commented Aug 13, 2025

From @MSDrao:

Basically, the "Draw a Box" button essentially acts as a reset for the drawn box, returning it to its default state that's why you see 400 default data points. The "Reset Filters" button below the Draw box button is specifically used to reset only the applied filters.

I hear that... but this state (at the end of the video I posted) doesn't make sense:
image

It shows "400" total models even though the Spatial Zone filter is activated. It should show "54". It also shouldn't show all 400 points on the map while the Spatial Zone filter is active. It should only show 54 points.

@MSDrao MSDrao requested a review from devincowan August 14, 2025 16:16
Copy link
Copy Markdown
Contributor

@devincowan devincowan left a comment

Choose a reason for hiding this comment

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

Screen.Recording.2025-08-14.at.2.22.03.PM.mov

Copy link
Copy Markdown
Contributor

@devincowan devincowan left a comment

Choose a reason for hiding this comment

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

looks good, I would have @Castronova do a functional review using the netlify deploy as well

@devincowan devincowan merged commit 68d523e into develop Aug 27, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants