planet-webapp icon indicating copy to clipboard operation
planet-webapp copied to clipboard

fix the zoom issue for project site

Open sunilsabatp opened this issue 1 year ago • 4 comments

  1. debugged zoom issue for the project site go to /project by selecting any one project from the landing page

Summary by CodeRabbit

  • Refactor
    • Enhanced the Project maps interface by utilizing more efficient React hooks, improving interaction with plant locations and project sites.
  • Chores
    • Cleaned up unnecessary code in the map zoom functionality.

sunilsabatp avatar Apr 24 '24 09:04 sunilsabatp

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
planet-webapp ✅ Ready (Inspect) Visit Preview Apr 24, 2024 10:58am
planet-webapp-multi-tenancy-setup ✅ Ready (Inspect) Visit Preview Apr 24, 2024 10:58am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
planet-webapp-temp ⬜️ Ignored (Inspect) Apr 24, 2024 10:58am

vercel[bot] avatar Apr 24 '24 09:04 vercel[bot]

Walkthrough

The recent update involved refining the handling of map functionalities in the project component by directly integrating React's useState and useEffect hooks. This change enhances the clarity and efficiency of how plant locations and project site zooming are managed.

Changes

File Path Change Summary
.../maps/Project.tsx Refactored to use useState and useEffect hooks directly, improving clarity and efficiency in map functionalities.
.../maps/zoomToProjectSite.ts Removed a commented-out console.log statement.

🐰✨ In the realm of code, where lines entwine, A rabbit danced, refactoring divine. With a hop and skip, a leap so clear, Code now sings, void of fear. Zoom, pan, the maps ignite, Under the stars, shining bright tonight. 🌟


Recent Review Details

Configuration used: CodeRabbit UI Review profile: CHILL

Commits Files that changed from the base of the PR and between 1228903180b1bf97a7f032fd3f58ea36412db1a1 and f40e258e6ada5dc28587fca7283c61d599288fef.
Files selected for processing (1)
  • src/features/projects/components/maps/Project.tsx (5 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/features/projects/components/maps/Project.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Apr 24 '24 09:04 coderabbitai[bot]

Zooming seems to work.

Update: The following issues also occur for https://www.trilliontreecampaign.org, so they are not related to this fix of the zooming issue.

Not sure if this is connected with this fix or generally broken in the latest code base of multi tenancy vs. https://www1.plant-for-the-planet.org, but we currently cannot link to any projects site other but the default one using deep links e.g. https://planet-webapp-multi-tenancy-setup-git-hotfix-z-28f9f2-planetapp.vercel.app/de/yucatan?site=site_cIS3reMZ5v1yvDw - you will always be redirected to https://planet-webapp-multi-tenancy-setup-git-hotfix-z-28f9f2-planetapp.vercel.app/de/yucatan?site=site_ybVo0Vn007jQl56. Also deep links to treemapper areas e.g. https://planet-webapp-multi-tenancy-setup-git-hotfix-z-28f9f2-planetapp.vercel.app/de/yucatan?ploc=LKB5P9 won't work and will be redirected to the default site.

In the console I often see an error like this: Bildschirmfoto 2024-04-24 um 14 38 07

norbertschuler avatar Apr 24 '24 12:04 norbertschuler

Will we still continue this PR or abandon it?

norbertschuler avatar May 19 '24 09:05 norbertschuler

Closed as addressed by #2082

mohitb35 avatar Jun 17 '24 05:06 mohitb35