Skip to content

feat(web): Initially hidden the two preset layers in playground #1615

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

asahina820
Copy link
Contributor

@asahina820 asahina820 commented May 22, 2025

Overview

Initially hidden the two preset layers in plugin playground

What I've done

  • Set layer visible to false on default
  • Added visibility decision for layers to be initially displayed

image

What I haven't done

How I tested

Which point I want you to review particularly

Memo

Summary by CodeRabbit

  • Refactor
    • Updated the default visibility of certain layers so that "Chiyoda 3D Tiles" and "Japanese Heritage Sites" are now hidden by default in the Plugin Playground.
    • The initial visible layers now reflect these updated defaults when the Plugin Playground loads.

Copy link

netlify bot commented May 22, 2025

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit f79dfc3
🔍 Latest deploy log https://app.netlify.com/projects/reearth-web/deploys/683410f0fe5b0d0008f82e82
😎 Deploy Preview https://deploy-preview-1615--reearth-web.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.

Copy link
Contributor

coderabbitai bot commented May 22, 2025

Walkthrough

The changes update the default visibility of two specific layers in the Plugin Playground by setting their visible property to false in the constants file. The initialization logic for visible layers in the related hook was also adjusted to only include layers marked as visible by default.

Changes

File(s) Change Summary
web/src/beta/features/PluginPlayground/LayerList/constants.ts Updated the visible property of "Chiyoda 3D Tiles" and "Japanese Heritage Sites" layers from true to false in the default layers array.
web/src/beta/features/PluginPlayground/hooks.tsx Modified the initialization of visibleLayerIds to include only layers with visible: true from the default layers.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PluginPlayground
    participant LayerListConstants
    participant Hooks

    User->>PluginPlayground: Open Plugin Playground
    PluginPlayground->>LayerListConstants: Load DEFAULT_LAYERS_PLUGIN_PLAYGROUND
    PluginPlayground->>Hooks: Initialize visibleLayerIds
    Hooks->>LayerListConstants: Filter layers where visible == true
    Hooks-->>PluginPlayground: Return visibleLayerIds
Loading

Possibly related PRs

Suggested labels

web

Suggested reviewers

  • mulengawilfred

Poem

In the playground where layers reside,
Two now hide and do not confide.
Visibility set with thoughtful care,
Only the chosen will appear there.
Rabbits hop, toggling with glee—
What you see is what should be! 🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98480b4 and 7325e68.

📒 Files selected for processing (2)
  • web/src/beta/features/PluginPlayground/LayerList/constants.ts (2 hunks)
  • web/src/beta/features/PluginPlayground/hooks.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
web/src/beta/features/PluginPlayground/hooks.tsx (1)
web/src/beta/features/PluginPlayground/LayerList/constants.ts (1)
  • DEFAULT_LAYERS_PLUGIN_PLAYGROUND (3-521)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: ci-server / ci-server-test
  • GitHub Check: ci-server / ci-server-lint
  • GitHub Check: ci-web / ci
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: Pages changed - reearth-web
🔇 Additional comments (3)
web/src/beta/features/PluginPlayground/LayerList/constants.ts (2)

8-8: Changed default visibility for Chiyoda 3D Tiles layer

This change sets the default visibility of the "Chiyoda 3D Tiles" layer to false, ensuring it is initially hidden in the plugin playground.


18-18: Changed default visibility for Japanese Heritage Sites layer

This change sets the default visibility of the "Japanese Heritage Sites" layer to false, ensuring it is initially hidden in the plugin playground.

web/src/beta/features/PluginPlayground/hooks.tsx (1)

74-76: Improved initialization of visibleLayerIds based on layer properties

This change dynamically initializes the visibleLayerIds state to only include layers that have their visible property set to true. This is a more maintainable approach that automatically reflects visibility settings defined in the constants file.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@github-actions github-actions bot added the web label May 22, 2025
@github-actions github-actions bot requested a review from m-abe-dev May 22, 2025 07:03
Copy link

github-actions bot commented May 26, 2025

🚀 Cloud Run Preview Deployed

🔗 Click here to open the preview in a new tab

Copy link
Contributor

@ShogoHirasawa ShogoHirasawa left a comment

Choose a reason for hiding this comment

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

Approved! Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants