Skip to content

Add demos page with Hello World and Order Processing - #17

Closed
koriym wants to merge 1 commit into
masterfrom
add-demos-page
Closed

koriym wants to merge 1 commit into
masterfrom
add-demos-page

Conversation

@koriym

@koriym koriym commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add Hello World demo section as introduction
  • Order Processing demo follows as advanced example
  • Learning path: simple (Hello World) → complex (Diamond Metamorphosis)

Summary by CodeRabbit

  • Documentation
    • Introduced a new Hello World Demo section in Japanese documentation with code examples, transformation diagrams, and usage guidance.
    • Expanded the Order Processing Demo with detailed explanations, visual diagrams, and comprehensive code samples for enhanced learning.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 21, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The PR adds documentation for two demonstration examples in the Japanese demos guide: a new Hello World Demo section and an expanded Order Processing Demo section with detailed diagrams, code samples, and conceptual explanations.

Changes

Cohort / File(s) Summary
Japanese Demo Documentation
manuals/1.0/ja/demos.md
Added new Hello World Demo section with explanatory text, transformation diagrams, Input/Final code samples, and usage examples. Extended Order Processing Demo section with detailed diagrams, concept explanations (Moment, Reason, Final), and additional code samples.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Poem

🐰 Hopping through docs with glee so bright,
New demos added, left and right!
Hello World greets the curious mind,
Order flows perfectly aligned. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a demos page with two specific demo sections (Hello World and Order Processing) as described in the PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude

claude Bot commented Jan 21, 2026

Copy link
Copy Markdown

Pull Request Review

Summary

This PR adds a "Hello World" demo section to the Japanese documentation (demos.md), providing a simple introductory example before the more complex Order Processing demo. This creates a good learning progression from simple → complex.


✅ Strengths

  1. Excellent Pedagogical Approach: Adding a simple "Hello World" example before the complex Diamond Metamorphosis pattern creates a much better learning curve for new users.

  2. Consistent Structure: The new content follows the same organizational pattern as the existing Order Processing demo (Input → Final → Reason → Usage → Links).

  3. Clear Code Examples: The PHP code examples are well-structured, use proper syntax highlighting, and include helpful comments in Japanese.

  4. Good Documentation: The example clearly demonstrates the core Be Framework concepts:

    • #[Be] attribute for declaring potential transformations
    • #[Input] and #[Inject] attributes showing different data sources
    • The transformation from potentiality (Input) to actuality (Final)
  5. Visual Diagram: The simple text-based flow diagram effectively illustrates the transformation.


⚠️ Issues and Concerns

1. CRITICAL: Missing English Translation

The PR only updates the Japanese version (manuals/1.0/ja/demos.md) but does NOT update the English version (manuals/1.0/en/demos.md).

Impact: This creates inconsistency between language versions, which violates the site's multi-language design.

Recommendation: Add the equivalent Hello World section to manuals/1.0/en/demos.md in the same position (before Order Processing).

2. External Link Vulnerability

The source code link points to an external repository:

- [ソースコード](https://github.com/be-framework/demos/tree/1.x/demos/hello-world)

Issue: At the time of this PR, there's no verification that this path exists or that the hello-world demo has been implemented.

Recommendation:

  • Ensure the demo repository is updated first, or
  • Consider adding a note that the demo is "coming soon" if it's not yet available, or
  • Remove the link temporarily until the demo is ready

3. Minor: Incomplete Greeting Class Example

The Greeting class example is minimal:

final class Greeting
{
    public string $greeting = 'Hello';
}

Suggestion: Consider adding a brief comment explaining that this would typically be configured through DI container binding, as this might not be obvious to beginners. For example:

// Reason(存在理由) - DIコンテナでバインドされる
final class Greeting
{
    public string $greeting = 'Hello';
}

4. Missing Context: $becoming Variable

The usage example introduces $becoming without explanation:

$final = ($becoming)($input);

Issue: New users won't know what $becoming is or how to obtain it.

Recommendation: Add a brief comment or explanation, such as:

// $becoming = DIコンテナから取得された変換関数
$final = ($becoming)($input);

📋 Testing Considerations

This is a documentation-only change, but the following should be verified:

  1. Build Validation: Ensure the Jekyll build completes successfully

    bundle exec jekyll build
  2. Link Verification: Confirm all markdown links are valid (especially the GitHub demo link)

  3. Visual Review: Check the rendered page locally to ensure:

    • Code blocks display correctly with syntax highlighting
    • The horizontal rule (---) properly separates the two demos
    • Navigation still works properly
  4. Language Consistency Check: Verify both EN and JA versions have equivalent content


🔒 Security

No security concerns - this is purely documentation content.


⚡ Performance

No performance impact - documentation pages are static and generated at build time.


🎯 Recommendations

Before Merging:

  1. HIGH PRIORITY: Add the equivalent Hello World section to the English version (manuals/1.0/en/demos.md)

  2. MEDIUM PRIORITY: Verify the external demo repository link exists and works, or adjust accordingly

  3. NICE TO HAVE: Add brief explanatory comments about:

    • The $becoming variable and where it comes from
    • That the Greeting class would be bound via DI container

After Merging:

  1. Consider adding cross-references from the manual chapters (e.g., from "Input Classes" chapter) to these demos as practical examples

📝 Overall Assessment

Quality: Good ⭐⭐⭐⭐ (would be 5/5 with English translation)

Impact: Positive - significantly improves the learning experience for new users

Recommendation: Approve with changes - add the English translation before merging.

This is a valuable addition to the documentation that will help new users understand the framework concepts through a simple, clear example. The progression from "Hello World" to "Order Processing" makes much more sense than jumping directly into the complex Diamond Metamorphosis pattern.

@koriym koriym closed this Jan 21, 2026
@claude claude Bot mentioned this pull request Mar 19, 2026
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.

1 participant