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

Add capital project detail panel and connect it to route for single project #41

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

TylerMatteo
Copy link
Contributor

Closes #16

Summary

This PR builds out the panel for showing project details for a single project. It uses the existing /capital-projects/:managing-code/:capital-project-id route.

New dependencies

  • Numbro - Used for formatting the future commitments total.
  • date-fns - Used for date formatting and logic. If you've worked with Moment before, you can think of date-fns as serving a similar niche. I like it because it is function-oriented and based around the browser-native Date class.

Not included

There is one requirement in #16 not included here - the "fly to" functionality where the map moves to a bounding box of the selected project. I'm going to capture the issues I had implementing that in a separate Discussion or Issue and put forward some potential solutions and next steps.

@TangoYankee
Copy link
Member

Unable to verify the behavior locally because I received the following error when running:

this style stylesheet is undefined

@TylerMatteo
Copy link
Contributor Author

TylerMatteo commented Jul 8, 2024

Unable to verify the behavior locally because I received the following error when running:
this style stylesheet is undefined

This PR previously included an upgrade to maplibre-gl 4.5 from 4.4.1. 4.5 seems to have introduced a bug (or at least, an unintentional breaking change). I fixed it by pinning the dependency to ~4.4.1.

@TangoYankee
Copy link
Member

The animation when expanding and shrinking the panel is a nice touch

@TylerMatteo TylerMatteo merged commit 45ebcc1 into main Jul 11, 2024
@TylerMatteo TylerMatteo deleted the 16/select-project branch July 11, 2024 14:10
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.

Select project from map and show project details
2 participants