shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
902 stars 28 forks source link

Option to use preview with a nested template structure #53

Closed co-sic closed 6 months ago

co-sic commented 8 months ago

Feature Use Case

I would like to group my email templates in different folder inside my root template folder but still be able to see them all in the preview tool. Currently you can only see the templates that are directly in the folder you specify and not in any subfolders.

Feature Proposal

This could maybe be an additional option you can pass to also include all the folders inside your rooth path in the preview and then display the same folder structure on the nav bar on the left side.

shellscape commented 8 months ago

Totally. The single-level directory was always intended to be a temporary limitation.

ibnumusyaffa commented 6 months ago

+1 definitely want this, it is very useful if you are grouping code by features, i hope it support path pattern like ./features/**/*.tsx

features
├── products
│   └── emails
│       └── marketing.tsx
├── projects
│   └── emails
│       └── reminder.tsx
└── users
    └── emails
        └── forgot-password.tsx
shellscape commented 6 months ago

good news: @ryanlanciaux has stepped up to work on this.

shellscape commented 6 months ago

This is available in the latest @jsx-email/app-preview version and can be seen on https://samples.jsx.email