-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIMS-511: Opening a property from the View Inventory page doesn't take you to location #1961
Conversation
🚀 Deployment Information The APP Image has been built with the tag: |
@@ -266,7 +274,7 @@ export const InventoryLayer: React.FC<InventoryLayerProps> = ({ | |||
// Fit to municipality bounds | |||
map.fitBounds((GeoJSON.geometryToLayer(municipality) as any)._bounds, { maxZoom: 11 }); | |||
} | |||
} else if (results.length > 0) { | |||
} else if (results.length > 0 && isMapView && isSidebarOpen === 'false') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there's a more elegant way of doing this, such as preventing the search from getting called...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice there's a side effect with this when you select a property from View Inventory then close the side menu.
It closes the side menu but then resets the view to be province-wide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, is this also the same issue in production?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested clicking on properties from the View Inventory page. Goes to the map and zooms appropriately.
Made sure search filters still zoom as expected.
Fixes bug with map resizing as well.
All looks good.
🎯 Summary
PIMS-511: - Opening a property from the View Inventory page doesn't take you to location
Because the "search" function is called when viewing a property from the view inventory page, I added a way to check if the user is on the "map" page or viewing the property details page. This should be tested thoroughly from all areas of the PIMS application.
There is still an issue with the marker not being centered.
🔰 Checklist