Skip to content

feat(app): template library with 100+ i18n templates, response language selector and extension fixes #5

Merged
Nyrok merged 5 commits intoNyrok:masterfrom
Refaltor77:master
Mar 13, 2026
Merged

feat(app): template library with 100+ i18n templates, response language selector and extension fixes #5
Nyrok merged 5 commits intoNyrok:masterfrom
Refaltor77:master

Conversation

@Refaltor77
Copy link
Collaborator

Summary

✨ Template Library (100+ templates) ─

  • Added a full template library accessible from the sidebar via a Templates button (BookOpen icon)
  • Library opens as a modal overlay (not a tab) to avoid cluttering the app layout
  • 100+ templates across 10 categories: Writing, Code, Marketing, Productivity, Design, Education, Sales, Data, Creative, Personal
  • Each template pre-fills the canvas with typed, structured blocks ready to edit
  • Category filter bar to browse templates by type

🌍 Multilingual templates + response language selector

  • Template names and descriptions are locale-aware: display adapts to the user's selected language (EN/FR with English fallback for other locales)
  • Added a "Response language" dropdown in the library overlay: selecting a language automatically appends a language block to the loaded template nodes
  • LOCALE_TO_LANG mapping covers 16 languages (EN, FR, ES, DE, IT, PT, ZH, JA, KO, AR, RU, NL, PL, SV, TR, HI)
  • Updated all 10 locale JSON files (en, fr, es, de, pt, ja, tr, zh, ar, ru) with the new library i18n section

🧱 Block pills redesign (Sidebar)

  • Sidebar block pills now show a description line that fades in on hover, making each block type self-explanatory without cluttering the UI
  • Tooltips were intentionally kept off the canvas nodes (only in the sidebar list)

🧩 Extension fixes (to check if this was intentional or not)

  • Fixed auto-import: prompt text is now automatically sent to the iframe when the sidebar opens (no need to click "Import from ChatGPT" manually)
  • Fixed platform auto-detection: FLOMPT_PLATFORM_INFO is re-sent every time the sidebar opens, so the correct AI tab (ChatGPT / Claude / Gemini) is pre-selected
  • Fixed iframe load sequence: input text is sent on load if already available
  • DEV_MODE reset to false before commit (was left true during local development)

Files changed

  • app/src/lib/templates.ts — new file, 100+ templates with i18n structure
  • app/src/components/TemplateLibrary.tsx — full rewrite with locale-aware display + language selector
  • app/src/components/Sidebar.tsx — Templates button + block pill description redesign
  • app/src/App.tsx — library as modal overlay, removed library tab
  • app/src/store/flowStore.tsTab type kept compatible
  • app/src/i18n/en.json + fr.jsonlibrary section added (translated)
  • app/src/i18n/*.json (×8) — library section added (English fallback)
  • app/src/i18n/translations.tslibrary interface added
  • app/src/styles.css — library overlay, template grid, language selector, block pill styles
image image

@Nyrok
Copy link
Owner

Nyrok commented Mar 13, 2026

Amazing!

Copy link
Owner

Choose a reason for hiding this comment

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

To make template contribution easier, maybe we should move the templates in a specific folder, with a template per file.
With a convention on the template structure: It can be a .json file or something else.
To be discussed!

Copy link
Owner

Choose a reason for hiding this comment

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

However, it can be implemented later. I'm merging it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

think the best approach is to set up a database so that we can easily use it in the future

Copy link
Owner

Choose a reason for hiding this comment

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

Definitely

@Nyrok Nyrok merged commit 91564a1 into Nyrok:master Mar 13, 2026
4 checks 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