Skip to content

README: booth navigation, debug explanation #8

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 5 commits into
base: main
Choose a base branch
from

Conversation

12ya
Copy link
Contributor

@12ya 12ya commented Jun 3, 2025

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive API reference and full user guide for the Meridian Maps React Native library, including installation, usage examples, configuration, and troubleshooting.
    • Introduced a detailed troubleshooting guide addressing common installation, build, runtime, and platform-specific issues, with solutions and best practices.
    • Updated and expanded README files to include advanced usage, new navigation methods, debugging tips, and platform-specific notes.
    • Improved code comments for clarity in example usage.

Copy link

coderabbitai bot commented Jun 3, 2025

Walkthrough

The updates introduce comprehensive documentation for the react-native-meridian-maps library, including a detailed README, API reference, and troubleshooting guide. The documentation covers installation, usage, component APIs, event handling, error management, and platform-specific setup. Minor codebase comments were also added to clarify debounce usage in an example.

Changes

File(s) Change Summary
README.md Updated code block annotations, added booth navigation details, documented new native methods and debugging.
react-native-meridian-maps/API.md Added full API reference for the library, detailing components, props, events, modules, and error codes.
react-native-meridian-maps/README.md Expanded from minimal to comprehensive documentation covering installation, usage, API, troubleshooting, etc.
react-native-meridian-maps/TROUBLESHOOTING.md Added extensive troubleshooting guide for installation, build, runtime, and platform-specific issues.
react-native-meridian-maps/example/src/App.tsx Added a clarifying comment above a debounced function for map transform events.

Poem

In docs and guides, we burrow deep,
Mapping the world for all to keep.
With APIs clear and errors tamed,
Navigation by booth now named!
Troubleshooting tips, a bunny’s delight—
Hop on, explore, your map’s in sight!
🗺️🐇✨

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

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

@12ya 12ya added the documentation Improvements or additions to documentation label Jun 3, 2025
Copy link

@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: 2

🧹 Nitpick comments (5)
react-native-meridian-maps/TROUBLESHOOTING.md (5)

385-386: Use a Markdown heading instead of bold emphasis
The line uses bold (**Option 1: Native Layer Solution (Recommended)**) to denote a section title. Convert it to a proper heading for consistency and accessibility.

- **Option 1: Native Layer Solution (Recommended)**
+ #### Option 1: Native Layer Solution (Recommended)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

385-385: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


469-469: Use a Markdown heading instead of bold emphasis
Convert **Option 2: App.tsx Level Solution (Recommended)** to a proper heading to maintain structural consistency.

- **Option 2: App.tsx Level Solution (Recommended)**
+ #### Option 2: App.tsx Level Solution (Recommended)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

469-469: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


551-551: Use a Markdown heading instead of bold emphasis
Convert **Option 3: Component-Level Protection** into a heading (e.g., #### Option 3: Component-Level Protection).

- **Option 3: Component-Level Protection**
+ #### Option 3: Component-Level Protection
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

551-551: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


620-620: Use a Markdown heading instead of bold emphasis
Convert **Option 4: Development Mode Handling** into a heading (e.g., #### Option 4: Development Mode Handling).

- **Option 4: Development Mode Handling**
+ #### Option 4: Development Mode Handling
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

620-620: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


638-638: Adjust heading level for Recommendation
The ## Recommendation section sits under ## SDK Initialization Issues. To reflect this hierarchy, it should be demoted to ### Recommendation.

- ## Recommendation
+ ### Recommendation
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec76169 and f262088.

📒 Files selected for processing (5)
  • README.md (2 hunks)
  • react-native-meridian-maps/API.md (1 hunks)
  • react-native-meridian-maps/README.md (1 hunks)
  • react-native-meridian-maps/TROUBLESHOOTING.md (1 hunks)
  • react-native-meridian-maps/example/src/App.tsx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
react-native-meridian-maps/README.md

[uncategorized] ~141-~141: This verb may not be in the correct form. Consider using a different form for this context.
Context: ... #### MeridianMaps The native module providing additional functionality. ```typescrip...

(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)

🪛 markdownlint-cli2 (0.17.2)
react-native-meridian-maps/TROUBLESHOOTING.md

9-9: Link fragments should be valid
null

(MD051, link-fragments)


11-11: Link fragments should be valid
null

(MD051, link-fragments)


385-385: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


469-469: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


551-551: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


620-620: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

README.md

33-33: Heading levels should only increment by one level at a time
Expected: h2; Actual: h4

(MD001, heading-increment)

🔇 Additional comments (5)
react-native-meridian-maps/example/src/App.tsx (1)

124-124: Excellent documentation addition!

This comment clearly explains the rationale behind using debounce for the handleMapTransformChange function. It helps developers understand that multiple rapid calls occur during initialization, making the debounce implementation necessary for performance optimization.

README.md (2)

26-32: Fix code block language annotations.

Good improvement to specify the correct language for the code blocks. This helps with syntax highlighting and readability.


72-78: Excellent documentation of known issues and workarounds.

This section provides valuable information about platform-specific issues and their workarounds. The inclusion of the iOS code reference for getting all placemarks is particularly helpful for developers.

react-native-meridian-maps/README.md (1)

1-495: Outstanding comprehensive documentation!

This is an excellent, comprehensive README that significantly improves the developer experience for this library. Key strengths:

  1. Complete coverage: Installation, setup, API reference, usage examples, and troubleshooting
  2. Clear structure: Well-organized sections with logical flow
  3. Practical examples: Multiple real-world usage scenarios with complete code
  4. TypeScript support: Full type definitions and typed examples
  5. Platform-specific guidance: Both iOS and Android setup instructions
  6. Error handling: Comprehensive error handling patterns and SDK availability checks

The documentation covers all major use cases from basic map display to advanced navigation and marker interactions. The troubleshooting section and debug information will be particularly valuable for developers.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~141-~141: This verb may not be in the correct form. Consider using a different form for this context.
Context: ... #### MeridianMaps The native module providing additional functionality. ```typescrip...

(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)

react-native-meridian-maps/API.md (1)

1-366: Excellent comprehensive API reference!

This API documentation is exceptionally well-crafted and provides tremendous value to developers:

  1. Complete API coverage: All components, interfaces, and methods thoroughly documented
  2. Clear interface definitions: Well-structured TypeScript interfaces with detailed property descriptions
  3. Practical examples: Real-world usage patterns and advanced scenarios
  4. Error handling guidance: Comprehensive error codes with solutions
  5. Performance optimization: Valuable patterns using memoization and debouncing
  6. Event type definitions: Complete event interfaces for all callback types

The document serves as an excellent reference that complements the main README perfectly. The inclusion of advanced usage patterns and performance optimization techniques shows deep understanding of React Native best practices.

Comment on lines +33 to 56
#### booth simulated navigation -
booth navigation is only possible for certain routes(GPS coordinates can be configured in the [Edit console](edit.meridianapp.com))

custom `startRouteToPlacemark` method is implemented to allow navigation by booth id

android: android/src/main/java/com/meridianmaps/MeridianMapViewManager.kt
```kt
fun startRouteToPlacemark(placemarkId: String)
```
iOS: ios/MeridianMapViewManager.m
```objc
- (void)startRouteToPlacemarkWithID:(NSString *)placemarkID
```
##### debug
booth id logging can be achieved with
android: android/src/main/java/com/meridianmaps/MapViewFragment.java'
```java
public boolean onMarkerSelect(Marker marker)
```
iOS: ios/MeridianCustom/CustomMapViewController.m
```objc
- (void)mapView:(MRMapView *)mapView didSelectAnnotationView:(MRAnnotationView *)view
```

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix heading level structure.

The content about booth simulated navigation is valuable, but there's a heading structure issue. The static analysis tool correctly identified that heading levels should only increment by one level at a time.

-#### booth simulated navigation - 
+### Booth Simulated Navigation

Also consider improving the formatting and structure of this section for better readability.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#### booth simulated navigation -
booth navigation is only possible for certain routes(GPS coordinates can be configured in the [Edit console](edit.meridianapp.com))
custom `startRouteToPlacemark` method is implemented to allow navigation by booth id
android: android/src/main/java/com/meridianmaps/MeridianMapViewManager.kt
```kt
fun startRouteToPlacemark(placemarkId: String)
```
iOS: ios/MeridianMapViewManager.m
```objc
- (void)startRouteToPlacemarkWithID:(NSString *)placemarkID
```
##### debug
booth id logging can be achieved with
android: android/src/main/java/com/meridianmaps/MapViewFragment.java'
```java
public boolean onMarkerSelect(Marker marker)
```
iOS: ios/MeridianCustom/CustomMapViewController.m
```objc
- (void)mapView:(MRMapView *)mapView didSelectAnnotationView:(MRAnnotationView *)view
```
### Booth Simulated Navigation
booth navigation is only possible for certain routes(GPS coordinates can be configured in the [Edit console](edit.meridianapp.com))
custom `startRouteToPlacemark` method is implemented to allow navigation by booth id
android: android/src/main/java/com/meridianmaps/MeridianMapViewManager.kt
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

33-33: Heading levels should only increment by one level at a time
Expected: h2; Actual: h4

(MD001, heading-increment)

🤖 Prompt for AI Agents
In README.md between lines 33 and 56, the heading levels for the "booth
simulated navigation" section are inconsistent and skip levels, which breaks
proper markdown structure. Adjust the headings so that each level increments by
only one (e.g., from ### to ####, not ### to #####). Also, improve formatting by
clearly separating code blocks and descriptions, using consistent indentation
and spacing to enhance readability.

Comment on lines +5 to +13
## Table of Contents

- [Installation Issues](#installation-issues)
- [Build Issues](#build-issues)
- [Runtime Issues](#runtime-issues)
- [Platform-Specific Issues](#platform-specific-issues)
- [Performance Issues](#performance-issues)
- [Debugging Tips](#debugging-tips)

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Broken Table of Contents link for "Runtime Issues"
The TOC entry links to #runtime-issues but there's no matching ## Runtime Issues heading, resulting in a broken link.

You can either add a ## Runtime Issues section before the runtime-related subsections or remove/update this TOC entry to point to an existing heading.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

9-9: Link fragments should be valid
null

(MD051, link-fragments)


11-11: Link fragments should be valid
null

(MD051, link-fragments)

🤖 Prompt for AI Agents
In react-native-meridian-maps/TROUBLESHOOTING.md around lines 5 to 13, the Table
of Contents entry for "Runtime Issues" links to a non-existent heading, causing
a broken link. Fix this by either adding a corresponding "## Runtime Issues"
heading before the runtime-related subsections or by removing or updating the
TOC entry to link to an existing heading that covers runtime issues.

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

Successfully merging this pull request may close these issues.

1 participant