Skip to content

fix: adjust page popup title for edit and new pages#860

Open
tomrndom wants to merge 1 commit intomasterfrom
fix/page-popup-title
Open

fix: adjust page popup title for edit and new pages#860
tomrndom wants to merge 1 commit intomasterfrom
fix/page-popup-title

Conversation

@tomrndom
Copy link
Copy Markdown

@tomrndom tomrndom commented Apr 7, 2026

ref: https://app.clickup.com/t/86b96nuj7

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • New Features
    • Page template dialogs now show context-specific titles: "Create New Page" for new templates and "Edit Page Template" for existing ones.
    • Dialog headings are computed dynamically to ensure the correct title appears based on whether a template is being created or edited.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 17d8a995-7be4-4b4b-8c0c-03d25802fa2d

📥 Commits

Reviewing files that changed from the base of the PR and between 90bddba and cf0fee6.

📒 Files selected for processing (2)
  • src/i18n/en.json
  • src/pages/sponsors-global/page-templates/page-template-popup/index.js
✅ Files skipped from review due to trivial changes (1)
  • src/pages/sponsors-global/page-templates/page-template-popup/index.js

📝 Walkthrough

Walkthrough

Split a single i18n title key into separate create/edit keys in src/i18n/en.json, and updated PageTemplatePopup to compute the dialog title using the new keys, choosing edit when pageTemplate?.id exists and create otherwise.

Changes

Cohort / File(s) Summary
I18n Configuration
src/i18n/en.json
Removed page_template_list.page_crud.title; added page_template_list.page_crud.title_create ("Create New Page") and page_template_list.page_crud.title_edit ("Edit Page Template").
PageTemplatePopup
src/pages/sponsors-global/page-templates/page-template-popup/index.js
Replaced fixed translation key with a computed popupTitle that selects title_edit when pageTemplate?.id is present, otherwise title_create. Prop destructuring was reformatted (no public API signature change).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • smarcet

Poem

🐰 I nudged two keys apart with care,

Create for new, Edit for repair,
The popup checks if an id's in view,
Then names itself the thing to do,
Hooray—small hops for code anew! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adjusting the page popup title to distinguish between edit and new page scenarios.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/page-popup-title

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@tomrndom tomrndom force-pushed the fix/page-popup-title branch from 90bddba to cf0fee6 Compare April 7, 2026 13:27
@tomrndom tomrndom requested a review from smarcet April 8, 2026 15:22
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.

1 participant