Skip to content

Pattern Creator: Show a prompt to name the pattern at the top of the editor - #818

Merged
obenland merged 1 commit into
trunkfrom
claude/gh-pattern-directory-733
Nov 17, 2026
Merged

obenland merged 1 commit into
trunkfrom
claude/gh-pattern-directory-733

Conversation

@obenland

@obenland obenland commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Fixes #733

The pattern title in the creator sits above the canvas iframe, so it never gets the editor's rich text placeholder styles, which only load inside the iframe. A new pattern opens with an empty dark band and no hint that this is where the pattern's name goes, and the title starts right against the toolbar.

This sets the editor's title placeholder to "Enter your pattern name", styles placeholders in the title wrapper the way the canvas does, and adds 24px of space above the title. The wording follows the issue's suggestion; "Add pattern name", matching core's "Add title", would also work.

Testing

  • bin/check (composer install, PHP lint, npm ci, CSS and JS lint, PHPUnit against WordPress nightly, Jest): all pass.
  • npm run test:unit --workspace=wporg-pattern-creator: the updated getSettings tests fail without the change and pass with it.
  • Manually: open /new-pattern/ while logged in; the title area shows "Enter your pattern name" and has space above it.

Screenshots

Before After
Before After

Props dd32, amitdholiya.

Opened by the wporg bug pipeline, unattended. Risk: needs-review.


Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • The pattern title field now displays “Enter your pattern name” when empty.
  • Style
    • Added spacing above the pattern title and improved the appearance of placeholder text in the editor.

…editor

The pattern title sits above the canvas iframe, so it never gets the
editor's rich text placeholder styles: a new pattern shows an empty dark
band with no hint that it is where the name goes. It also starts flush
against the toolbar.

Set the editor's title placeholder to "Enter your pattern name", style the
placeholder inside the title wrapper as the editor does in the canvas, and
add space above the title.

Fixes #733.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBAW4qoeXMBLmmMJxuCC7d
Copilot AI lite review requested due to automatic review settings November 17, 2026 04:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pattern editor settings now include the translated placeholder “Enter your pattern name.” Styles add top spacing to the title wrapper and display rich-text placeholder text. Selector tests include the new setting.

Changes: Pattern title placeholder

Layer / File(s) Summary
Placeholder setting and presentation
public_html/wp-content/plugins/pattern-creator/src/store/selectors.js, public_html/wp-content/plugins/pattern-creator/src/components/block-editor/style.scss, public_html/wp-content/plugins/pattern-creator/src/store/test/selectors.js
The settings selector adds a translated title placeholder. Editor styles add top spacing and display rich-text placeholder text. Selector tests expect the new setting.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: Minimal · up to 42b7b

This adds a placeholder prompt ("Enter your pattern name") and top spacing to the pattern editor title. The change is small and low risk, and it is ready to merge.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Objective [#733]: show instructional placeholder text at the top of the pattern editor and increase top spacing. The PR adds titlePlaceholder: 'Enter your pattern name' to getSettings in `src/stor… Provide evidence that the title placeholder text reaches the rendered title. Confirm that the @wordpress/editor PostTitle version in use reads a block editor setting named titlePlaceholder, or pass the placeholder explicitly to the ti…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the main change: a prompt that asks the user to name the pattern, shown at the top of the editor. The raw summary confirms the change adds a title placeholder ("Enter your pattern name…
Description check Passed The description states the problem and the fix. It links the issue with "Fixes #733", explains the placeholder and 24px spacing, and gives testing steps and before/after screenshots. It also lists the…
Out of Scope Changes check Passed The changes cover the title area only. They include CSS for the title wrapper and rich-text placeholder styling, one new getSettings property, and matching tests in src/store/test/selectors.js. Ea…
Full details: Title check

Explanation

The title names the main change: a prompt that asks the user to name the pattern, shown at the top of the editor. The raw summary confirms the change adds a title placeholder ("Enter your pattern name") and spacing above the title. The title is specific and matches the objectives. Its length (75 characters, 15 words) is long but still reads clearly.

Full details: Description check

Explanation

The description states the problem and the fix. It links the issue with "Fixes #733", explains the placeholder and 24px spacing, and gives testing steps and before/after screenshots. It also lists the props. The template has a 'See #' line and a numbered 'How to test' list. The description uses a Testing section with bullet points instead of the numbered steps, and it omits the [Component] label note. These gaps are minor and do not change the completeness of the description.

Full details: Out of Scope Changes check

Explanation

The changes cover the title area only. They include CSS for the title wrapper and rich-text placeholder styling, one new getSettings property, and matching tests in src/store/test/selectors.js. Each change connects to issue #733. No unrelated files or behavior changes appear in the summary. The diff could not be read directly, so this verdict relies on the summary and the PR description.

Full details: Linked Issues check

Explanation

Objective [#733]: show instructional placeholder text at the top of the pattern editor and increase top spacing. The PR adds titlePlaceholder: 'Enter your pattern name' to getSettings in src/store/selectors.js. It also adds $grid-unit-30 top padding to .pattern-visual-editor__post-title-wrapper in src/components/block-editor/style.scss, which covers the spacing requirement. The reviewed head file src/components/block-editor/index.js renders &lt;PostTitle /&gt; from @wordpress/editor with no props. It does not pass settings.titlePlaceholder to the title. The repository content read here does not show that PostTitle reads titlePlaceholder from block editor settings. The @wordpress/editor source is not in this repository, so the placeholder text path is not established. The diff could not be read directly, so the style and selector changes rely on the summary. The spacing requirement is supported. The placeholder text requirement is not established by the available evidence.

Resolution

Provide evidence that the title placeholder text reaches the rendered title. Confirm that the @wordpress/editor PostTitle version in use reads a block editor setting named titlePlaceholder, or pass the placeholder explicitly to the title component. Confirm that the rendered title shows "Enter your pattern name" when the pattern is new and empty.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 216ead71-df7a-4e03-b9bb-34bed9db3398
Commits

Reviewing files that changed from the base of the PR and between f0a7592 and 42b7b8c.

Files selected for processing: 3

  • public_html/wp-content/plugins/pattern-creator/src/components/block-editor/style.scss
  • public_html/wp-content/plugins/pattern-creator/src/store/selectors.js
  • public_html/wp-content/plugins/pattern-creator/src/store/test/selectors.js

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@obenland
obenland merged commit 3f52107 into trunk Nov 17, 2026
5 checks passed
@obenland
obenland deleted the claude/gh-pattern-directory-733 branch November 17, 2026 17:23
@amitdholiya

Copy link
Copy Markdown

Thanks for the improvement! Adding a clear placeholder like “Enter your pattern name…” at the top of the pattern editor, along with increased top spacing, will make the interface more intuitive and user-friendly. This helps users understand the first step immediately. Great enhancement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants