Skip to content

Conversation

poltorak
Copy link
Collaborator

@poltorak poltorak commented Sep 11, 2025

🎯 Allow Design System Component Names Without "Ds" Prefix

Summary

This PR enhances the flexibility of Design System component validation by allowing component names to be specified with or without the "Ds" prefix.

Changes

  • Component Validation: Updated regex pattern to accept both "Button" and "DsButton" formats
  • Error Messages: Improved error messages to reflect the new flexible naming convention
  • Documentation: Updated JSDoc comments with examples showing both naming formats

Files Changed

  • packages/angular-mcp-server/src/lib/tools/ds/shared/utils/component-validation.ts
  • packages/angular-mcp-server/src/lib/tools/ds/shared/utils/regex-helpers.ts

Before/After Examples

Before: Only "DsButton" was accepted
After: Both "DsButton" and "Button" are accepted

Impact

  • ✅ Backward compatible - existing "Ds" prefixed names continue to work
  • ✅ More user-friendly - developers can use shorter component names
  • ✅ Improved developer experience with clearer error messages

@poltorak poltorak force-pushed the feat/issue-6-ds-prefix branch from 1fbdd5b to de01586 Compare September 11, 2025 08:12
@poltorak poltorak force-pushed the feat/issue-6-ds-prefix branch from 0fa6f14 to becea84 Compare September 11, 2025 08:49
@poltorak poltorak merged commit 577b171 into main Sep 12, 2025
1 check passed
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.

2 participants