Skip to content

refactor(web): add reference to developer documentation links in plugin playground [VIZ-1410] #1506

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

Merged
merged 7 commits into from
Mar 18, 2025

Conversation

mulengawilfred
Copy link
Contributor

@mulengawilfred mulengawilfred commented Mar 18, 2025

Overview

Added a few comments on plugin API events and methods used in the plugin playground to provide reference to the developer documentation.

What I've done

What I haven't done

How I tested

Which point I want you to review particularly

Memo

Summary by CodeRabbit

  • Documentation

    • Enhanced internal guidance by adding reference links that clarify API events and interactions across various components.
  • Style

    • Improved naming consistency and capitalization in user-facing texts, such as widget titles and translation keys, ensuring a more polished interface appearance.

Copy link
Contributor

coderabbitai bot commented Mar 18, 2025

Walkthrough

This pull request updates numerous plugin files by adding documentation comments that link to developer resources for various Re:Earth API events. It also makes minor naming corrections (such as updating “ReEarth” to “Re:Earth” and standardizing widget and translation key capitalization) and improves consistency in identifier formatting. No changes have been made to the underlying logic, control flow, or public API declarations.

Changes

File(s) Change Summary
web/src/beta/features/PluginPlayground/Plugins/presets/camera/cameraPosition.ts, .../camera/cameraRotation.ts, .../camera/zoomInOut.ts Added and corrected documentation comments for camera, extension, and UI event links; corrected “ReEarth” to “Re:Earth.”
web/src/beta/features/PluginPlayground/Plugins/presets/data/clientStorageThemeSelector.ts, .../data/extensionProperty.ts, .../data/messengerBetweenExtensions.ts, .../data/uiExtensionMessenger.ts Inserted documentation links for Client Storage and extension methods; updated widget naming casing in uiExtensionMessenger.
web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/featureStyle3dTiles.ts, .../layerStyles/featureStyle3dmodel.ts, .../layerStyles/filterFeaturebyStyle.ts, .../layerStyles/layerStylingExamples.ts, .../layerStyles/overrideStyle.ts, .../layerStyles/styleWithCondition.ts Added doc link comments referencing layer additions, viewer overrides, camera flyTo, and timeline events.
web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-3Dtiles.ts, .../add-OSM-3DTiles.ts, .../add-csv.ts, .../add-czml.ts, .../add-geojson.ts, .../add-google-photorealistic-3d-tiles.ts, .../add-kml.ts, .../add-wms.ts, .../hideFlyToDeleteLayer.ts, .../overrideLayerData.ts, .../showSelectedFeaturesInformation.ts Updated naming conventions in IDs and titles; added multiple documentation comments for layer, camera, and extension event methods.
web/src/beta/features/PluginPlayground/Plugins/presets/timeline/playbackControl.ts, .../timeDrivenFeatures.ts, .../timeDrivenPath.ts Inserted documentation links for timeline events as well as for layers, camera, and viewer methods.
web/src/beta/features/PluginPlayground/Plugins/presets/ui/modalWindow.ts, .../popup.ts, .../useTitles.ts Enhanced documentation for modal and popup functionality; updated messenger title strings for consistent capitalization.
web/src/beta/features/PluginPlayground/Plugins/presets/viewer/enableShadowStyle.ts, .../enableTerrain.ts, .../mouseEvent.ts, .../showLabel.ts, .../takeScreenshot.ts Added documentation links for viewer, camera, and extension methods; refined a comment in mouseEvent for specificity.
web/src/services/i18n/translations/en.yml, web/src/services/i18n/translations/ja.yml Adjusted messenger key capitalization to “Messenger Between Extension and Visualizer” and “Messenger Between Extensions.”

Possibly related PRs

  • feat(web): add rotate camera example #1411: The changes in the main PR, which involve adding comments for documentation in the cameraPosition.ts file, are related to the retrieved PR that introduces a new camera rotation plugin in cameraRotation.ts, as both modifications pertain to the camera functionality within the same feature set.
  • refactor(web): plugin playground presets - camera position #1415: The changes in the main PR focus on modifying comments in the cameraPosition.ts file, while the retrieved PR involves significant functional updates and UI enhancements to the same file, indicating a direct relationship at the code level.

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 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 23424a4 and c2a0755.

📒 Files selected for processing (4)
  • web/src/beta/features/PluginPlayground/Plugins/presets/camera/zoomInOut.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/data/extensionProperty.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/filterFeaturebyStyle.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/viewer/enableShadowStyle.ts (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • web/src/beta/features/PluginPlayground/Plugins/presets/data/extensionProperty.ts
  • web/src/beta/features/PluginPlayground/Plugins/presets/camera/zoomInOut.ts
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/filterFeaturebyStyle.ts
  • web/src/beta/features/PluginPlayground/Plugins/presets/viewer/enableShadowStyle.ts
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: ci-web / ci
  • GitHub Check: ci-server / ci-server-test
  • GitHub Check: ci-server / ci-server-lint
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: Pages changed - reearth-web

🪧 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.
    • 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 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 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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

Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 2b0ecae
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/67d9524e8020650008f226b6
😎 Deploy Preview https://deploy-preview-1506--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 site configuration.

@mulengawilfred mulengawilfred removed the request for review from m-abe-dev March 18, 2025 03:42
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/filterFeaturebyStyle.ts (1)

135-135: Useful documentation link for Layers.override method.

This is an appropriate reference for styling overrides, though consider adding a space after the double slashes for consistency with other comments.

-  //  NOTE: Link to developer documentation for Layers "override" method https://visualizer.developer.reearth.io/plugin-api/layers/#override
+  // NOTE: Link to developer documentation for Layers "override" method https://visualizer.developer.reearth.io/plugin-api/layers/#override
web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-3Dtiles.ts (3)

38-39: Missing "NOTE:" prefix in documentation comment.

The documentation link comment is missing the "NOTE:" prefix that is present in other similar comments in the file (and across other files).

-NOTE: Link to developer documentation on Layers "add" event: https://visualizer.developer.reearth.io/plugin-api/layers/#add
+// NOTE: Link to developer documentation on Layers "add" event: https://visualizer.developer.reearth.io/plugin-api/layers/#add

42-43: Missing comment prefix and formatting.

The documentation link is missing the "//" prefix and formatting is inconsistent with other similar comments.

-NOTE: Link to developer documentation on Viewer "overrideProperty" event: https://visualizer.developer.reearth.io/plugin-api/viewer/#overrideproperty
+// NOTE: Link to developer documentation on Viewer "overrideProperty" event: https://visualizer.developer.reearth.io/plugin-api/viewer/#overrideproperty

50-51: Missing comment prefix for documentation link.

The documentation link is missing the "//" prefix which is used consistently in other files.

-NOTE: Link to developer documentation on Camera "flyTo" event: https://visualizer.developer.reearth.io/plugin-api/camera/#flyto
+// NOTE: Link to developer documentation on Camera "flyTo" event: https://visualizer.developer.reearth.io/plugin-api/camera/#flyto
web/src/beta/features/PluginPlayground/Plugins/presets/ui/popup.ts (1)

351-355: Popup "close" and UI "postMessage" Documentation Comments Require Minor Fix
The comment for the popup “close” method is clear. However, at line 355 the documentation note for the UI postMessage method is missing the proper comment marker. Please update it to use // so that it’s consistent with the rest of the file.

Proposed Diff:

-    NOTE: Link to developer documentation for Extension "postMessage" method https://visualizer.developer.reearth.io/plugin-api/ui/#postmessage
+    // NOTE: Link to developer documentation for Extension "postMessage" method https://visualizer.developer.reearth.io/plugin-api/ui/#postmessage
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 435b158 and be11cb0.

📒 Files selected for processing (37)
  • web/src/beta/features/PluginPlayground/Plugins/presets/camera/cameraPosition.ts (4 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/camera/cameraRotation.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/camera/zoomInOut.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/data/clientStorageThemeSelector.ts (4 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/data/extensionProperty.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/data/messengerBetweenExtensions.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/data/uiExtensionMessenger.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/featureStyle3dTiles.ts (2 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/featureStyle3dmodel.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/filterFeaturebyStyle.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/layerStylingExamples.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/overrideStyle.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/styleWithCondition.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-3Dtiles.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-OSM-3DTiles.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-csv.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-czml.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-geojson.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-google-photorealistic-3d-tiles.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-kml.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-wms.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/hideFlyToDeleteLayer.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/overrideLayerData.ts (2 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/layers/showSelectedFeaturesInformation.ts (2 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/timeline/playbackControl.ts (4 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/timeline/timeDrivenFeatures.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/timeline/timeDrivenPath.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/ui/modalWindow.ts (2 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/ui/popup.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/useTitles.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/viewer/enableShadowStyle.ts (3 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/viewer/enableTerrain.ts (2 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/viewer/mouseEvent.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/viewer/showLabel.ts (1 hunks)
  • web/src/beta/features/PluginPlayground/Plugins/presets/viewer/takeScreenshot.ts (1 hunks)
  • web/src/services/i18n/translations/en.yml (1 hunks)
  • web/src/services/i18n/translations/ja.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-geojson.ts (1)
Learnt from: airslice
PR: reearth/reearth-visualizer#1344
File: web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-geojson.ts:10-10
Timestamp: 2025-01-10T06:45:01.558Z
Learning: In Re:Earth visualizer plugins, the extension ID in reearth.yml must exactly match the JavaScript file name (without extension) for the extension to be loaded properly.
web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/overrideStyle.ts (1)
Learnt from: ShogoHirasawa
PR: reearth/reearth-visualizer#1397
File: web/src/beta/features/PluginPlayground/Plugins/presets/manageLayerStyle/overrideStyle.ts:146-191
Timestamp: 2025-03-17T07:47:37.363Z
Learning: In the Plugin Playground examples, prefer simple and straightforward code structures over optimized solutions to help beginners understand the API functionality better.
web/src/beta/features/PluginPlayground/Plugins/presets/layers/overrideLayerData.ts (1)
Learnt from: ShogoHirasawa
PR: reearth/reearth-visualizer#1381
File: web/src/beta/features/PluginPlayground/Plugins/presets/layers/overrideLayerData.ts:0-0
Timestamp: 2025-03-17T07:47:37.363Z
Learning: In reearth-visualizer, layer management should be encapsulated in a dedicated object/module (like LayerManager) rather than using global variables. The manager should handle layer creation, updates, and maintain its state internally while exposing only necessary methods for interaction.
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: deploy-server / deploy_test
  • GitHub Check: Redirect rules - reearth-web
  • GitHub Check: Header rules - reearth-web
  • GitHub Check: Pages changed - reearth-web
🔇 Additional comments (100)
web/src/beta/features/PluginPlayground/Plugins/presets/viewer/mouseEvent.ts (1)

78-79: Clear Developer Documentation Reference Added

The updated comment now directly references the correct Viewer "on" event documentation with a clickable URL. This addition enhances guidance for developers examining the file. Please ensure that similar documentation comments across the plugin playground maintain consistent formatting and clarity.

web/src/beta/features/PluginPlayground/Plugins/presets/timeline/timeDrivenFeatures.ts (3)

123-124: Clear Developer Documentation Reference for Layer API
The inline comment referencing the documentation for the Layers add method is clear and informative. It provides an immediate pointer for developers to review the official docs. Please ensure that the URL remains current as the API evolves.


127-128: Helpful Documentation Comment for Timeline Play Method
The added comment linking to the Timeline play method documentation enhances the understandability of the code, making it easier for developers to find more information. This change is non-intrusive and well-placed.


131-133: Informative Documentation Comment for Camera FlyTo Method
Including the comment with a direct link to the Camera flyTo method documentation is an excellent addition. It assists developers in quickly referencing the associated API details without digging through external links.

web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/styleWithCondition.ts (3)

57-57: Documentation Link for Layers "add" Method

The inline comment effectively provides a direct reference to the developer documentation for the Layers "add" method. This can significantly help developers quickly locate the relevant usage details without leaving the code.


72-72: Documentation Link for Camera "flyTo" Method

The added comment clearly points developers to the documentation for the Camera "flyTo" method. This enhances the understandability for those reviewing or modifying the camera-related logic.


90-90: Documentation Link for Timeline "setTime" Method

The comment here concisely directs to the Timeline "setTime" method documentation. It is a useful addition for developers to verify configuration options related to timeline settings.

web/src/beta/features/PluginPlayground/Plugins/presets/data/clientStorageThemeSelector.ts (5)

205-206: Documentation for the getAsync method:
The inserted comment clearly references the developer documentation for the getAsync method. This inline note improves code understandability for developers interacting with the Client Storage API.


207-207: Documentation for the UI postMessage method:
The new comment above the postMessage call pinpoints where developers can find additional usage details. It’s a helpful addition that strengthens the in-code guidance without affecting functionality.


227-228: Documentation for the setAsync method:
The added comment before the setAsync call is concise and directs developers to the relevant documentation link. This makes it easier to understand how the Client Storage API is used for updating the theme.


237-238: Documentation for the keysAsync method:
This comment clearly identifies the keysAsync method and provides a direct documentation link. It will be useful for future maintainers to quickly grasp the purpose of the method call without leaving the code.


246-247: Documentation for the dropStoreAsync method:
The inline note for dropStoreAsync is a neat addition that explains the functionality for clearing the client storage. The link to the developer documentation provides further clarity and context.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-csv.ts (1)

39-40: Add documentation link for "add" event.
The documentation comment clearly provides a reference to the developer documentation for the Layers "add" event. This additional context is useful for developers without affecting any functionality.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-kml.ts (1)

71-72: Include documentation reference for "add" event.
The added comment linking to the developer documentation for the "add" event is clear and consistent with similar changes elsewhere in the codebase.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-wms.ts (1)

35-36: Document the "add" event for WMS layers.
This documentation comment offers a direct link to the developer documentation for Layers "add", ensuring that developers have immediate access to relevant details.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-google-photorealistic-3d-tiles.ts (2)

39-40: Add documentation link for "add" event in 3D Tiles layer.
The documentation comment added before calling reearth.layers.add is clear and helpful, providing fast access to documentation for the "add" event.


43-44: Provide reference for Camera "flyTo" event.
The added comment before the reearth.camera.flyTo call includes a link to the developer documentation for the Camera "flyTo" event, enhancing clarity for developers.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/hideFlyToDeleteLayer.ts (1)

198-199: Document Extension "on" event usage.
The new comment linking to the developer documentation for the Extension "on" event is a helpful addition, clarifying the context in which extension messages are processed.

web/src/beta/features/PluginPlayground/Plugins/presets/data/extensionProperty.ts (1)

142-147: Enhance Developer Documentation in Story Block File

The newly added comments provide direct links to the Re:Earth API documentation for the UI "postMessage" method and for Extension Block usage. This additional inline guidance is clear, non-intrusive, and aligns well with the objective of improving developer accessibility.

web/src/beta/features/PluginPlayground/Plugins/presets/timeline/timeDrivenPath.ts (3)

100-101: Add Documentation Reference for Layers "add" Method

The inserted comment offers a clear reference to the developer documentation for the Layers "add" method, which helps clarify the purpose of the API call for future maintainers.


104-105: Add Documentation Reference for Timeline "play" Method

The added comment correctly points developers to documentation on the Timeline "play" method. This enhances clarity without altering functionality.


108-122: Add Documentation Reference for Camera "flyTo" Method

The new comment preceding the camera movement call neatly links to the Re:Earth API documentation for the Camera "flyTo" method. This helps maintain consistency in documentation throughout the code which is in line with this PR’s objectives.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-czml.ts (2)

75-77: Enhance Documentation for Layers "add" Event

The added documentation comment before the reearth.layers.add call provides a direct link to the relevant API documentation. This will assist developers in understanding the layer addition process without impacting functionality.


81-95: Enhance Documentation for Camera "flyTo" Event

The inserted comment before the camera movement segment clearly references the developer documentation for the Camera "flyTo" method. This clear guidance is consistent with other documentation improvements in the codebase.

web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/layerStylingExamples.ts (2)

143-148: Enhance Documentation for Layers "add" Method in Styling Examples

The newly introduced comment offers a handy link to the documentation for the Layers "add" method. This serves as a useful pointer for developers reviewing how layers are added in the context of styling examples.


150-158: Enhance Documentation for Camera "flyTo" Method in Styling Examples

The comment added before the camera positioning call provides a clear reference to the Camera "flyTo" documentation. This consistent approach to inline documentation improves both clarity and maintainability.

web/src/beta/features/PluginPlayground/Plugins/presets/data/messengerBetweenExtensions.ts (1)

109-119: Enhance Documentation for Messaging Between Extensions

The added comments within the messaging handler clearly reference the API documentation for the Extension "on" event, the Extension List, and the "postMessage" method. These annotations improve developer guidance on inter-extension communications and align with the overall goal of enhanced documentation.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-geojson.ts (1)

97-97: Good addition of documentation reference!

The link to the developer documentation for the "add" event is helpful for developers exploring the layers API. This aligns well with the PR objective of adding developer documentation references to the playground.

web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/featureStyle3dTiles.ts (3)

54-55: Well-placed documentation reference for Layers.add method.

This documentation link provides valuable context for developers working with 3D Tiles layers.


58-58: Good documentation reference for overrideProperty method.

The link to the developer documentation for the viewer's overrideProperty method is appropriate and helpful.


77-77: Helpful documentation link for camera.flyTo method.

This reference is well-positioned before the camera movement code to guide developers on camera manipulation.

web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/overrideStyle.ts (4)

115-115: Good reference to Layers.add method documentation.

This comment is well-placed before the layer addition code.


118-118: Useful documentation link for Layers.override method.

The link is correctly placed before the code using the viewer's overrideProperty method.


131-131: Appropriate documentation reference for camera.flyTo.

This link provides developers with access to detailed information about camera movement.


149-149: Well-placed documentation link for Extension.on event.

This reference helps developers understand the message handling mechanism between UI and extensions.

web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/filterFeaturebyStyle.ts (3)

103-103: Good reference to Layers.add method documentation.

This documentation link is appropriately placed before adding the GeoJSON layer.


107-107: Helpful documentation link for camera.flyTo method.

This reference provides developers with information about camera positioning.


125-125: Well-placed documentation link for Extension.on event.

This reference helps developers understand the message handling mechanism for UI interactions.

web/src/beta/features/PluginPlayground/Plugins/presets/data/uiExtensionMessenger.ts (5)

13-13: Improved capitalization in widget name.

Changed from "Messenger between Extension and Visualizer Widget" to "Messenger Between Extension and Visualizer Widget" for consistent title case styling.


137-138: Good documentation reference for Viewer.on event.

This link provides developers with information about handling mouse events.


139-140: Helpful documentation link for UI.postMessage method.

This reference is well-placed before the code that sends messages to the UI.


148-149: Appropriate documentation reference for Extension.on event.

This link helps developers understand message handling between components.


151-152: Well-placed documentation link for Camera.flyTo method.

This reference complements the camera movement code.

web/src/beta/features/PluginPlayground/Plugins/presets/layerStyles/featureStyle3dmodel.ts (6)

74-75: Great documentation link addition for layers.add method!

Adding this reference to the developer documentation enhances code clarity and provides a helpful resource for developers working with the plugin playground.


80-81: Well-placed timeline.setTime documentation link.

This documentation reference directly relates to the code implementation that follows, making it easier for developers to understand the API usage.


91-92: Helpful documentation for timeline.play method.

The added link provides valuable context about the timeline play functionality, which is important for understanding the 3D model animation.


95-96: Good documentation for timeline.setSpeed method.

This documentation link effectively complements the existing code comment about playback speed.


99-100: Appropriate documentation for viewer.overrideProperty method.

The added reference helps developers understand how to configure shadow settings in the Re:Earth viewer.


109-110: Useful documentation link for camera.flyTo method.

This reference enhances understanding of camera positioning functionality which is crucial for navigating to the 3D models.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-3Dtiles.ts (4)

4-4: Improved ID formatting for consistency.

The hyphenated format "layers-add-3d-tiles-reearth-yml" is more consistent with standard naming conventions in the codebase.


6-7: Consistent plugin ID naming in YAML source.

The update to "layers-add-3d-tiles-plugin" maintains naming consistency throughout the application.


10-10: Extension ID updated for consistency.

The hyphenated format "layers-add-3d-tiles" improves readability and maintains consistent naming conventions.


20-21: Improved file identifier naming.

The updates to both id and title properties use a consistent hyphenated format that improves readability.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/add-OSM-3DTiles.ts (7)

4-4: Improved ID formatting for consistency.

The hyphenated format "layers-add-osm3d-tiles-reearth-yml" is more consistent with standard naming conventions.


6-6: Consistent plugin ID naming in YAML source.

The update to "layers-add-osm-3d-tiles-plugin" maintains naming consistency throughout the application.


10-10: Extension ID updated for consistency.

The hyphenated format "layers-add-osm-3d-tiles" improves readability and maintains consistent naming conventions.


20-21: Improved file identifier naming.

The updates to both id and title properties use a consistent hyphenated format that aligns with the project's naming conventions.


33-34: Well-placed documentation link for layers.add method.

The added reference to the developer documentation enhances code clarity and provides a helpful resource for developers.


37-38: Useful documentation link for viewer.overrideProperty method.

This documentation link helps developers understand how to configure terrain settings in the Re:Earth viewer.


45-46: Appropriate documentation for camera.flyTo method.

The added reference enhances understanding of camera positioning functionality, which is essential for viewing the OSM 3D Tiles correctly.

web/src/beta/features/PluginPlayground/Plugins/presets/viewer/showLabel.ts (1)

35-36: Helpful documentation link for camera.flyTo method.

This reference enhances understanding of camera positioning functionality which is crucial for properly viewing the labels. The documentation link format is consistent with other similar comments across files.

web/src/beta/features/PluginPlayground/Plugins/presets/viewer/takeScreenshot.ts (1)

108-110: Clear Documentation Reference Added for Extension "on" Event.
The new comment linking to the developer documentation for the reearth.extension.on("message") event is clear and useful for developers seeking more information about the event’s behavior.

web/src/beta/features/PluginPlayground/Plugins/presets/camera/zoomInOut.ts (1)

90-100: Helpful Developer Documentation References for Zoom Functions.
The added comments before the extension event listener and the camera method calls (for both zoomIn and zoomOut) effectively provide immediate links to the relevant API documentation. This will assist developers in understanding the context and usage of these methods.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/overrideLayerData.ts (2)

150-160: Documentation Link for Layer Override Functionality.
The comment added right before the call to reearth.layers.override clearly references the API documentation regarding layer override, which will help developers comprehend how the override mechanism works.


164-173: Documentation Link for Extension "on" Event in Layer Handling.
The new comment before the reearth.extension.on("message") event handler reinforces clarity by pointing to the relevant API documentation for extension events. This is a useful addition for better contextual understanding.

web/src/beta/features/PluginPlayground/Plugins/presets/camera/cameraPosition.ts (2)

274-288: Documentation Reference for Camera "on" Event.
The added comment before the reearth.camera.on("move") call neatly provides a link to the API documentation for camera movement events. This helps clarify how and when the camera’s movement is tracked.


289-317: Documentation References for Extension "on" and UI "postMessage" Events.
The comments added before the reearth.extension.on("message") and before the UI postMessage call enhance the code’s clarity by providing direct links to the related API documentation. These additions are consistent with the overall documentation improvements in the PR.

web/src/beta/features/PluginPlayground/Plugins/presets/ui/modalWindow.ts (3)

77-83: Added Documentation for Modal "show" Method.
The comment preceding the reearth.modal.show call effectively provides a reference to the related developer documentation. This addition is helpful for developers looking to understand modal initialization and configuration options.


87-89: Added Documentation for Extension "on" Event in Modal Context.
The new comment before the extension message listener clarifies that the event handling behavior aligns with the documented API for extension events. This is a beneficial reference for maintainers and contributors.


90-93: Added Documentation for Modal "close" Method.
The comment before the reearth.modal.close call provides an explicit link to the API documentation, which can help developers quickly verify the expected behavior associated with closing modals.

web/src/beta/features/PluginPlayground/Plugins/presets/useTitles.ts (2)

28-30: Capitalization update for "Messenger Between Extension and Visualizer":
The updated string literal now follows the intended capitalization standard. This change should help ensure that the UI strings remain consistent with developer documentation and other language files.


31-31: Capitalization update for "Messenger Between Extensions":
The string literal now uses proper capitalization which aligns with the overall naming conventions.

web/src/beta/features/PluginPlayground/Plugins/presets/viewer/enableTerrain.ts (3)

132-132: Added documentation reference for Camera "flyTo" method:
The comment providing the link to the Camera API documentation is a useful addition for developers needing further context on how the camera movement works. Please double-check that the URL remains current.


150-150: Added documentation reference for Extension "on" event:
Documenting the use of the extension event listener via a link to the API documentation enhances understandability and future maintainability.


154-154: Added documentation reference for Viewer "overrideProperty" method:
This comment makes it clear why the function is being used in response to the "activateTerrain" action. It improves code readability and provides developers with a quick link to the relevant API documentation.

web/src/beta/features/PluginPlayground/Plugins/presets/viewer/enableShadowStyle.ts (5)

154-154: Added documentation reference for Layers "add" method:
The comment before the call to reearth.layers.add(model3D) links to the API documentation and helps clarify the purpose of the function.


158-158: Added documentation reference for Camera "flyTo" method:
Providing a link to the developer documentation here makes it easier for maintainers to understand the underlying camera movement logic.


177-177: Added documentation reference for Timeline "setTime" method:
This addition offers clear guidance on the timeline manipulation API and ensures that developers have immediate access to further details if needed.


186-186: Added documentation reference for Extension "on" event:
The comment here clarifies the role of the extension message listener, serving as a helpful guide for new developers examining the code.


197-197: Added documentation reference for Viewer "overrideProperty" method (deactivating shadow):
Including this comment gives a clear pointer to the API docs for disabling shadow functionality, which enhances overall code clarity.

web/src/services/i18n/translations/ja.yml (1)

347-348: Updated translation keys capitalization:
The keys "Messenger Between Extension and Visualizer" and "Messenger Between Extensions" have been updated to proper capitalization. This ensures consistency with the UI and their English counterparts.

web/src/services/i18n/translations/en.yml (1)

350-351: Updated translation keys capitalization:
The keys have been updated to "Messenger Between Extension and Visualizer" and "Messenger Between Extensions". Please verify that the application consistently references these keys with the new formatting.

web/src/beta/features/PluginPlayground/Plugins/presets/camera/cameraRotation.ts (4)

107-108: Documentation Link for Layers "add" Event is Clear
The comment above the call to reearth.layers.add(...) clearly points to the relevant developer documentation. This addition improves clarity for developers.


110-116: Documentation Link for Viewer "overrideProperty" Event is Well Added
The comment referencing the viewer’s overrideProperty event nicely directs users to the documentation. All necessary parameters remain intact.


123-124: Camera "flyTo" Documentation Comment Added
The added comment above the reearth.camera.flyTo(...) call successfully provides documentation context for the camera movement method.


141-142: Extension "on" Documentation Reference is Useful
The comment preceding the event listener for reearth.extension.on("message", ...) offers a clear pointer to the corresponding API documentation, which enhances developer guidance.

web/src/beta/features/PluginPlayground/Plugins/presets/ui/popup.ts (4)

345-347: Extension "on" Event Documentation Comment is Informative
The comment inserted before the extension message listener effectively guides developers to the relevant documentation.


347-350: Popup "show" Method Documentation Comment is Clear
The documentation link added immediately before the reearth.popup.show(...) call ensures that developers can easily reference the API details for displaying the popup.


359-364: Popup "update" Method Documentation is Appropriately Added
The comment above the reearth.popup.update({...}) call clearly explains the reference to the API documentation.


365-368: Popup "postMessage" Method Documentation is Well Referenced
The added comment for the popup’s postMessage method provides valuable direction to developers regarding its usage.

web/src/beta/features/PluginPlayground/Plugins/presets/layers/showSelectedFeaturesInformation.ts (5)

95-97: Layers "add" Event Documentation Comment Enhances Clarity
The documentation comment added above reearth.layers.add(layer3dTiles); is clear and effectively guides developers to more context on the event.


99-104: Viewer "overrideProperty" Documentation Comment is Valuable
Including the reference link for the viewer’s overrideProperty event improves the understandability of the code.


107-121: Camera "flyTo" Documentation Comment Provides Clear Guidance
The comment that documents the usage of the camera’s flyTo method is well placed and directs the reader to the relevant API documentation.


140-144: UI "postMessage" Documentation Comment is a Great Addition
The note added before the reearth.ui.postMessage({...}) call ensures that developers know where to find further details on this API.


147-148: Layers "on" Event Documentation Comment is Consistently Applied
The comment added above the feature selection handler (reearth.layers.on("select", handleLayerSelect);) reinforces the overall initiative to provide direct developer documentation references.

web/src/beta/features/PluginPlayground/Plugins/presets/timeline/playbackControl.ts (5)

264-266: Layers "add" Method Documentation is Clearly Referenced
The comment before the call to reearth.layers.add(buildings3dTiles); successfully offers developers a reference to the API documentation, enhancing maintainability.


268-272: Viewer "overrideProperty" Documentation Comment is Informative
The comment for the viewer’s overrideProperty method is succinct and useful, ensuring that developers have easy access to the necessary documentation.


313-323: Camera "flyTo" Method Documentation Comment Improves Readability
The documentation comment preceding reearth.camera.flyTo({...}) clearly directs users to the relevant API details.


351-359: Extension "on" Event Documentation Comment is Beneficial
The comment for the Extension “on” event added before the message handler is clear and aligns with the documentation improvement initiative across the codebase.


383-390: Timeline "tick" Event Documentation Comment is Effectively Added
The added comment for the timeline’s tick event helps developers understand where to find more detailed usage information.

@airslice airslice changed the title chore(web): add reference to developer documentation links in plugin playground refactor(web): add reference to developer documentation links in plugin playground Mar 18, 2025
@mulengawilfred mulengawilfred changed the title refactor(web): add reference to developer documentation links in plugin playground refactor(web): add reference to developer documentation links in plugin playground [VIZ-1410] Mar 18, 2025
@mulengawilfred mulengawilfred merged commit 1a88f5d into main Mar 18, 2025
17 checks passed
@mulengawilfred mulengawilfred deleted the chore/add-developer-links branch March 18, 2025 11:54
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.

2 participants