Skip to content

[Refactor] Improve template document type handling and dynamic filtering system#99

Merged
Gautam25Raj merged 1 commit into
masterfrom
refactor/template-document-type-and-filter-system
May 27, 2026
Merged

[Refactor] Improve template document type handling and dynamic filtering system#99
Gautam25Raj merged 1 commit into
masterfrom
refactor/template-document-type-and-filter-system

Conversation

@Gautam25Raj
Copy link
Copy Markdown
Collaborator

Summary

This PR refactors the template browsing and rendering architecture to improve document type handling, dynamic filtering, layout statistics, and template metadata consistency across the templates experience.

Refactor

Template Filtering

  • Updated TemplateFilters to dynamically generate:
    • Family options
    • Layout options
  • Improved filtering flexibility based on provided template data
  • Enhanced scalability for future template categories and layouts

Template Components

  • Updated TemplateGroup to consume TemplateSummary directly
  • Added improved group information rendering and metadata display
  • Enhanced TemplateHeader with richer template detail representation
  • Refactored TemplatesHeader to include:
    • Document type summaries
    • Improved layout statistics
    • Better overview presentation

Template Data Structure

  • Refined template configuration structure in:
    • config/templates.ts
  • Added additional metadata support
  • Improved type safety and shared template consistency
  • Enhanced maintainability for template registry handling

Improvements

Routing & URL Handling

  • Updated utility functions for improved href generation
  • Fixed link generation in TemplatesPreview
  • Improved document type routing consistency across templates

UI & Information Architecture

  • Updated TemplatesPortalPage with improved document type presentation
  • Enhanced layout organization and template information clarity
  • Improved browsing experience and template discoverability

Maintainability

  • Simplified shared template handling workflows
  • Improved consistency across template-related utilities and components
  • Enhanced scalability for future template system expansion

Notes

  • No breaking changes expected
  • Focused on template architecture, filtering flexibility, and document type consistency

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🧪 Tests (adding or updating tests)

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

…prove filter functionality

- Updated TemplateFilters to dynamically generate family and layout options based on provided templates.
- Modified TemplateGroup to accept TemplateSummary directly and display additional group information.
- Enhanced TemplateHeader to utilize TemplateSummary for better detail representation.
- Revamped TemplatesHeader to include document type summaries and improved layout statistics.
- Adjusted utility functions to support new template structure and href generation.
- Updated TemplatesPortalPage to display document types with improved layout and information.
- Refined template data structure in config/templates.ts to include additional metadata and improve type safety.
- Fixed link generation in TemplatesPreview for correct document type routing.
@Gautam25Raj Gautam25Raj added enhancement New feature or request frontend UI/client-side code ui/ux Design or user experience improvements labels May 27, 2026
@Gautam25Raj Gautam25Raj merged commit ce282ef into master May 27, 2026
1 check failed
@Gautam25Raj Gautam25Raj deleted the refactor/template-document-type-and-filter-system branch May 27, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend UI/client-side code ui/ux Design or user experience improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Multi-Document Template Directory Restructuring & Nested Dynamic Routing

1 participant