Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Db/mobile component fixes#6063

Draft
babsdenney wants to merge 5 commits into
mainfrom
db/mobile-component-fixes
Draft

Db/mobile component fixes#6063
babsdenney wants to merge 5 commits into
mainfrom
db/mobile-component-fixes

Conversation

@babsdenney
Copy link
Copy Markdown
Contributor

@babsdenney babsdenney commented Apr 3, 2026

Summary

This pull request introduces an automated system for syncing and processing mobile app component documentation from the VA Mobile Library, ensuring the documentation site always reflects the latest available components and their properties. The changes add a new sync script, update the build pipeline, enhance documentation, and improve troubleshooting guidance.

Automated Mobile Component Sync and Processing

Major features:

Build & Automation Enhancements

  • Added a new Gulp task (process-mobile-app-component-docs) to process mobile app component documentation, and a sync task (sync-mobile-components) that fetches the latest component data from the VA Mobile Library GitHub repository. These are combined in a sync-and-process-mobile-components series for streamlined operation. (config/gulp/json.js config/gulp/json.jsR113-R180)
  • Introduced new npm scripts: sync-mobile, sync-mobile-full, and process-mobile for easy syncing and processing via the command line. (package.json package.jsonR23-R25)
  • Added the scripts/sync-mobile-components.js script, which fetches component lists and prop definitions from GitHub, parses TypeScript interfaces, and updates the mobile-app-component-docs-source.json file automatically. (scripts/sync-mobile-components.js scripts/sync-mobile-components.jsR1-R251)

Documentation & Workflow Improvements

  • Updated docs/MOBILE_APP_COMPONENTS.md with a new "Quick Start" section, automated sync instructions, build process details, troubleshooting section, and guidance on automated vs. manual updates. The doc now highlights the addition of new components (e.g., va-checkboxgroup) and accurate maturity tracking. (docs/MOBILE_APP_COMPONENTS.md [1] [2] [3]
  • Improved the "About" page to clarify that the site now supports both VA.gov and the VA mobile app. (src/_about/index.md src/_about/index.mdL5-R5)

Component Metadata & Presentation

  • Updated the Alert component documentation to include a Figma link for the mobile app and adjusted anchors for clarity. (src/_components/alert/index.md [1] [2]

These changes make mobile app component documentation more accurate, up-to-date, and easier to maintain, with a robust automated workflow for syncing and processing data.


References:

  • Build & Automation: [1] [2] [3]
  • Documentation: [1] [2] [3] [4]
  • Component Metadata: [1] [2]
    Provide a brief summary of what this PR does, if the title doesn't fully explain it.

Preview Environment Links

Open Preview Environment

- Fix mobile Storybook link naming convention (va-mobile__ instead of va-mobile_)
- Add missing figma-link-mobile-app fields to all mobile components
- Fix mobile_component_name parameters in component includes
- Ensure consistent front matter structure across all mobile components

Components updated:
- Alert, Button Segmented, Checkbox, Radio Button, Icon, Link
- Loading Indicator, Snackbar, Telephone, Text

All mobile components now properly configured for:
- Automatic tab generation for dual-platform components
- Correct mobile-only documentation rendering
- Proper Figma integration with mobile design library
- Consistent component code documentation
Updated existing checklists:
- va-alert.yml: Updated mobile-app-score to true for guidance, variations, responsive
- va-icon.yml: Updated mobile-app-score to true for guidance, variations, responsive

Created new checklists:
- va-checkbox.yml: New dual-platform component checklist
- va-link.yml: New dual-platform component checklist
- va-radio-button.yml: New dual-platform component checklist
- va-telephone.yml: New dual-platform component checklist
- va-snackbar.yml: New mobile-only component checklist
- va-text.yml: New mobile-only component checklist

All mobile components now have:
✅ Guidance: true (verified mobile documentation complete)
✅ Variations: true (verified mobile Storybook examples exist)
✅ Responsive: true (mobile components are inherently responsive)
✅ Interactive states: true (verified mobile interactions work)
- Automated sync from VA Mobile Library (12 components)
- Fixed component completion tracking with historical dates
- Added Jekyll build fix for mobile nav template
- Updated documentation for mobile component workflow
- Remove unused sync-mobile-local.js (local filesystem approach)
- Clean up sync-mobile-components.js:
  * Remove unused findPropsInBaseType() function
  * Streamline file path patterns (10 → 4 core patterns)
  * Reduce interface patterns (6 → 3 commonly used)
  * 39 lines removed (-5.5%) while maintaining full functionality
- Unified build pipeline in gulp json.js for web + mobile components
- Enhanced TypeScript parsing with union/intersection type support
- Complete prop extraction: 96+ props vs previous 53
- GitHub API integration with authentication and intelligent caching
- All mobile components now use API-based sync instead of local cloning

Results: Production-ready mobile component documentation automation
with comprehensive prop coverage and streamlined, maintainable code.
Base automatically changed from db/update-mobile-docs-4874 to main April 3, 2026 19:05
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