builder icon indicating copy to clipboard operation
builder copied to clipboard

feat: System to export & import standard Builder Page

Open surajshetty3416 opened this issue 3 months ago • 1 comments

Option to export Builder Page as Standard. Using this, users/devs can ship pre-built pages in any Frappe app... for example, the Blog app can now ship standard blog templates built using Builder.

Usage is quite simple: if you want a page to be exported as Standard, just toggle the Standard checkbox and select the module of the app where you want to export the standard page from the page settings (this toggle will only be enabled in Developer Mode). Once you make a page Standard, any changes you make to that page will be synced to its JSON file — similar to how doctypes work. Screenshot 2025-11-07 at 11 01 12 AM

Note: Standard pages will be in read-only mode. Users can unpublish, duplicate, and make changes to these standard pages! Screenshot 2025-11-07 at 11 02 52 AM

Things that get exported:

  • Builder page → .json
  • Components → .json
  • Scripts → .json
  • Assets → folder (symlink)

Note: Builder pages are imported on app install and synced on migration.

surajshetty3416 avatar Sep 25 '25 11:09 surajshetty3416

Codecov Report

:x: Patch coverage is 51.03448% with 284 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 49.31%. Comparing base (762a62e) to head (bc1a570). :warning: Report is 57 commits behind head on develop.

Files with missing lines Patch % Lines
builder/export_import_standard_page.py 6.51% 201 Missing :warning:
builder/utils.py 60.15% 53 Missing :warning:
...ilder/builder/doctype/builder_page/builder_page.py 50.00% 13 Missing :warning:
...e/builder_project_folder/builder_project_folder.py 0.00% 11 Missing :warning:
builder/install.py 0.00% 5 Missing :warning:
builder/api.py 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #405      +/-   ##
===========================================
+ Coverage    47.80%   49.31%   +1.50%     
===========================================
  Files           26       28       +2     
  Lines         1638     2180     +542     
===========================================
+ Hits           783     1075     +292     
- Misses         855     1105     +250     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Sep 25 '25 11:09 codecov[bot]

Merging this as part 1 of this feature, the export feature is functional.

The next part will have more improvement in UX and the addition of the following features.

  • [ ] Custom layer of scripts while editing scripts from standard page (scripts of standard page should not be directly editable.)
  • [ ] Show read-only inputs for standard pages (do not let users edit page properties) ...

surajshetty3416 avatar Dec 10 '25 08:12 surajshetty3416