Skip to content

feat: page templates#5719

Open
shreyanshkotak wants to merge 17 commits intowebstudio-is:mainfrom
shreyanshkotak:page-template
Open

feat: page templates#5719
shreyanshkotak wants to merge 17 commits intowebstudio-is:mainfrom
shreyanshkotak:page-template

Conversation

@shreyanshkotak
Copy link
Copy Markdown
Contributor

Description

  1. Issue: Page templates #4931
  2. Adds V1 of Page Templates for designers:
    • stores project-local page templates separately from published pages
    • adds a designer-only Page Templates section in the Pages panel
    • supports creating, editing, duplicating, deleting, and reordering templates
    • supports creating a regular page from a template through a prefilled page settings dialog
    • makes canvas/page awareness, asset usage, asset replacement, and page-copy utilities template-aware while keeping templates out of normal public page lookup paths

Steps for reproduction

  1. Open the builder in Design mode and open the Pages panel.
  2. Click the New Template button in the Page Templates section.
  3. Fill in template settings, including name, title, description, search toggle, social image, and custom metadata.
  4. Click Create template and expect the new template to appear under Page Templates and load on the canvas with an editable blank body.
  5. Add content to the template canvas, reopen template settings, change metadata, close/reopen settings, and expect the changes to persist.
  6. Click the + action on the template row and expect a Create Page from Template dialog prefilled from the template with a unique page path.
  7. Change page settings, click Create page, and expect a normal page to be created in the root folder with copied content and metadata while the template remains unchanged.
  8. Right-click a template row, choose Duplicate, and expect a new independent template copy with a deduplicated name.
  9. Drag templates within the Page Templates section and expect the order to persist.
  10. Right-click a template row, choose Delete, confirm deletion, and expect the template and its canvas tree to be removed. If the deleted template was selected, expect the builder to navigate back to the home page.
  11. Switch to Content mode and expect template management UI to be hidden.
  12. Use a template social image from Assets, check asset usages, replace the asset, and expect the template social image reference to update.

Code Review

  • hi @kof, I need you to do
    • conceptual review (architecture, feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 0000)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env file

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🚀 Deployed!

📍 Preview: https://pr-5719.development.webstudio.is

Note: Adding new commits will remove the safe-to-deploy label and require re-approval.

@kof kof temporarily deployed to development May 1, 2026 17:53 — with GitHub Actions Inactive
@kof kof temporarily deployed to development May 1, 2026 17:53 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants