Skip to content

docs(nav): document modal navigation rail and app bar menu button usage - #142

Merged
treeder merged 2 commits into
mainfrom
update_rail_modal_docs
Oct 7, 2026
Merged

treeder merged 2 commits into
mainfrom
update_rail_modal_docs

Conversation

@treeder

@treeder treeder commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

Updates the navigation rail documentation in nav/README.md to explain how to implement and use the modal navigation rail / modal drawer variant, including an end-to-end example of triggering it via a menu button in a top app bar (md-app-bar).

Key Changes

  • Modal Navigation Rail & Drawer Guide: Added dedicated documentation explaining the modal navigation rail pattern for compact/mobile viewports (< 600px) and on-demand drawers.
  • App Bar Integration Example: Added complete HTML, responsive CSS, and JavaScript examples demonstrating:
    • Triggering the modal drawer from an <md-icon-button slot="navigation-icon"> in <md-app-bar>.
    • Backdrop scrim overlay and smooth slide-in animation.
    • Dismissal via backdrop click, Escape key press, navigation item selection, and internal rail collapse.
  • Expanded Rail Controls: Documented the expanded property/attribute, programmatic toggling (toggleExpanded()), and the expanded-change event.
  • Component API Reference: Added comprehensive tables for properties, attributes, methods, events, and slots across md-nav-rail, md-nav-item, and md-nav-bar.

Verification

  • Verified Markdown formatting using npx prettier --check nav/README.md.
  • Cross-referenced implementation with demo/index.html, demo/css/styles.css, and nav/rail.js.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📋 Review Summary

This pull request significantly expands and improves the documentation for Material 3 navigation components in nav/README.md. It provides comprehensive usage guides for md-nav-rail, md-nav-item, and md-nav-bar, including standard/expanded rail setups, complete responsive modal drawer integration with top app bars, and detailed API tables.

🔍 General Feedback

  • The added documentation is thorough, well-structured, and includes practical code snippets for responsive layouts and modal drawers.
  • The documentation aligns well with the existing implementations across nav/rail.js, nav/item.js, and nav/bar.js.
📊 Token Usage & Cost Efficiency
Metric Value
Input Tokens (uncached) 14,600
Input Tokens (cached) 417,264 (⚡ 96.6% cached)
Thinking / Reasoning Tokens 4,068
Output Tokens 773
Total Session Tokens 436,705
Cost (uncached input) $0.0109
Cost (cached input) $0.0313
Cost (thinking / reasoning) $0.0153
Cost (response output) $0.0029
Estimated Total Cost $0.0604

Gemini 3.8 Flash: introductory rate $0.75/$3.75 per 1M applied; reverts to $1.5/$7.5 after 2026-12-31.
Gemini 3.8 Flash: standard tier; batch and flex are half again, priority is higher.
Cache reads are priced here, but context-cache STORAGE, where the model charges for it separately per token-hour, is not included, so the figure can run slightly low.

Comment thread nav/README.md
Comment thread nav/README.md
Comment thread nav/README.md Outdated
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
material 7d3a11c Commit Preview URL

Branch Preview URL
Oct 07 2026, 05:03 PM

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📋 Review Summary

This update cleans up redundant nested <md-badge> elements from <md-nav-item> instances in demo/index.html, bringing the demo directly in line with the component's internal badge rendering behavior. Combined with the comprehensive documentation in nav/README.md, the navigation rail, modal drawer pattern, and navigation item APIs are now accurately documented and implemented across the project.

✅ Resolved Items from Prior Reviews

  • Removed redundant nested <md-badge> element from the standard rail example in nav/README.md. (nav/README.md:69)
  • Removed redundant nested <md-badge> element from the modal rail example in nav/README.md. (nav/README.md:140)
  • Removed the non-existent default slot entry from the <md-nav-item> slots table in nav/README.md. (nav/README.md:419)
  • Removed redundant nested <md-badge> elements from <md-nav-item> in demo/index.html for both rail and bottom navigation bar instances. (demo/index.html:95)

🔍 General Feedback

  • The removal of the nested <md-badge> tags in demo/index.html ensures clean HTML that relies on md-nav-item's built-in show-badge and badge-value properties.
  • The documentation in nav/README.md accurately documents the modal drawer pattern (HTML, CSS, and JS) alongside complete API tables for md-nav-rail, md-nav-bar, and md-nav-item.
  • The code and documentation are consistent with Material Design 3 guidelines and the codebase conventions.
📊 Token Usage & Cost Efficiency
Metric Value
Input Tokens (uncached) 19,441
Input Tokens (cached) 417,264 (⚡ 95.3% cached)
PR Comments History Tokens 983
Thinking / Reasoning Tokens 3,055
Output Tokens 483
Total Session Tokens 441,226
Cost (uncached input) $0.0153
Cost (cached input) $0.0313
Cost (thinking / reasoning) $0.0115
Cost (response output) $0.0018
Estimated Total Cost $0.0599

Gemini 3.8 Flash: introductory rate $0.75/$3.75 per 1M applied; reverts to $1.5/$7.5 after 2026-12-31.
Gemini 3.8 Flash: standard tier; batch and flex are half again, priority is higher.
Cache reads are priced here, but context-cache STORAGE, where the model charges for it separately per token-hour, is not included, so the figure can run slightly low.

@treeder
treeder merged commit 7afa0e7 into main Oct 7, 2026
2 checks passed
@treeder
treeder deleted the update_rail_modal_docs branch October 7, 2026 17:09
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