Skip to content
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

Merged
merged 7 commits into from
Dec 7, 2023

Conversation

LawrenceLau2020
Copy link
Collaborator

🎯 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

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

github-actions bot commented Dec 4, 2023

🚀 Deployment Information

The APP Image has been built with the tag: 1961. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.

@@ -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') {
Copy link
Collaborator Author

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...

Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

Copy link
Collaborator

@dbarkowsky dbarkowsky left a 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.

@LawrenceLau2020 LawrenceLau2020 merged commit 725b0e2 into main Dec 7, 2023
@LawrenceLau2020 LawrenceLau2020 deleted the PIMS-511 branch December 7, 2023 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants