Skip to content

A module can be one page, with no sidebar (#330) - #331

Merged
ifahimreza merged 2 commits into
mainfrom
feat/one-page
Oct 5, 2026
Merged

ifahimreza merged 2 commits into
mainfrom
feat/one-page

Conversation

@ifahimreza

@ifahimreza ifahimreza commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #330

What

A module descriptor can say 'layout' => 'page'. Saddle then draws that module as one page: no sidebar and no icon tab row. Saddle Analytics uses it next (plan: planning/ANALYTICS-ONE-PAGE.md, P1). Rank and CRM keep the sidebar.

How

  • Descriptor: Saddle_Modules::modules() keeps layout as page or sections, the default. Anything else becomes sections, and every Core page is sections. The admin app gets it with each area.
  • Header and width (frameHeader()): the first tab is the page, 1040 wide like Home. Any other tab (Settings, reached by address) reads Saddle / Module / Settings, 920 wide, and the module crumb leads back. A drill-in reads Saddle / Module / title, with no section crumb.
  • Feature check: saddleShell.has( 'page-layout' ).
  • Older Core: it ignores the key and draws the tabs as sections, so nothing breaks.
  • Changelog: I wrote the entry under 1.5.1. The version is your call.
  • Bundle: the second commit rebuilds admin/build. main's committed bundle was older than its sources; the main checkout carries the same uncommitted rebuild.

Testing

  • PHPUnit, PHP 8.2: 1447 tests, 0 failures, 1 skipped. New: the layout values a descriptor can give (a data provider), and the layout in the app's data.
  • Jest: 342/342 on 3 of 4 runs. One run had a single failure that did not come back in three re-runs (likely timing). New: six frameHeader cases for a one-page module.
  • wp-scripts lint-js clean on the changed files; phpcs clean on includes/.
  • Checked in a real install with its first user, plugpressco/saddle-analytics#18, on WordPress 7.1.2. A click-through with real mouse events passes 23/23: no sidebar or tab row on the page; Settings reads Saddle / Analytics / Settings, has no sidebar, and its Analytics crumb leads back; no script errors. Rank and CRM descriptors are untouched (no layout), so they keep the sidebar.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

ifahimreza and others added 2 commits October 5, 2026 05:51
A descriptor's 'layout' => 'page' draws the module as one page: no
sidebar and no icon tab row. Its first tab is the page, 1040 wide like
Home. Settings, reached by address, reads Saddle / Module / Settings and
the module crumb leads back. A drill-in reads Saddle / Module / title.
saddleShell.has( 'page-layout' ) tells a module; older Core ignores the
key, and Rank and CRM keep the sidebar.

Refs #330

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main's committed bundle was older than its sources; this is the build
of the sources on this branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ifahimreza
ifahimreza marked this pull request as ready for review October 5, 2026 00:41
@ifahimreza
ifahimreza merged commit 88dfe95 into main Oct 5, 2026
9 checks passed
@ifahimreza ifahimreza mentioned this pull request Oct 5, 2026
6 of 7 tasks
ifahimreza added a commit that referenced this pull request Oct 5, 2026
Version in all five places (header, SADDLE_VERSION, stable tag,
package.json, package-lock.json). The changelog adds the white
sidebar panel (#329) beside the one-page layout (#331). saddle.pot
regenerated: same 2,156 strings, new version and line numbers.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

A module can be one page: no sidebar, Settings as a drill-in

1 participant