Conversation
- renamed files to kebab-case Changelog for v0.3.2 -> 0.3.3:
WalkthroughThis PR enforces kebab-case filename conventions through a new ESLint rule, renames source files accordingly, updates all associated imports, bumps the package version to 0.3.3, adds release procedures to documentation, trims email input on submission, and adds an optional Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
apps/signup-form/src/components/pages/form-page.tsx (1)
23-35: Clearloadingafter minimal success.
In minimal mode,loadingstaystrue, so the success text never becomes visible and the button remains disabled.✅ Proposed fix
if (minimal) { // Don't go to the success page, but show the success state in the form setSuccess(true); + setLoading(false); } else { setPage('SuccessPage', { email }); }apps/signup-form/src/utils/helpers.tsx (1)
40-46: Avoid returning undefined for same-site history.
getDefaultUrlHistory()can returnundefined; returning it directly skips the fallback history construction and violates theURLHistorycontract, which can break downstream consumers.🐛 Proposed fix
if (window.location.host === new URL(siteUrl).host) { const history = getDefaultUrlHistory(); - return history; + if (history) { + return history; + } }
🤖 Fix all issues with AI agents
In `@apps/signup-form/README.md`:
- Line 62: Update the README line that references the Ghost core config
filename: replace the string "core/shared/config/default.json" with
"core/shared/config/defaults.json" so the documentation points to the correct
file; locate the occurrence of "default.json" in apps/signup-form/README.md (the
line containing core/shared/config/default.json) and update it to use
"defaults.json".
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
apps/signup-form/.eslintrc.cjsapps/signup-form/.storybook/preview.tsxapps/signup-form/README.mdapps/signup-form/package.jsonapps/signup-form/src/app-context.tsapps/signup-form/src/app.tsxapps/signup-form/src/components/content-box.tsxapps/signup-form/src/components/frame.tsxapps/signup-form/src/components/iframe.tsxapps/signup-form/src/components/pages/form-page.tsxapps/signup-form/src/components/pages/form-view.stories.tsapps/signup-form/src/components/pages/form-view.tsxapps/signup-form/src/components/pages/success-page.tsxapps/signup-form/src/components/pages/success-view.stories.tsapps/signup-form/src/components/pages/success-view.tsxapps/signup-form/src/index.tsxapps/signup-form/src/pages.tsxapps/signup-form/src/preview.stories.tsxapps/signup-form/src/utils/helpers.tsxapps/signup-form/src/utils/options.tsxapps/signup-form/test/utils/is-test-env.jsghost/core/core/shared/config/defaults.json
🧰 Additional context used
🧬 Code graph analysis (1)
apps/signup-form/src/utils/helpers.tsx (2)
ghost/core/core/frontend/src/member-attribution/member-attribution.js (2)
STORAGE_KEY(8-8)history(43-43)apps/portal/src/utils/helpers.js (1)
STORAGE_KEY(895-895)
🔇 Additional comments (17)
apps/signup-form/.eslintrc.cjs (2)
23-24: LGTM! The filename rule enforces lowercase conventions appropriately.The regex
^[a-z0-9.-]+$effectively enforces lowercase filenames. Note that it's slightly more permissive than strict kebab-case (allows leading hyphens, consecutive hyphens/dots), but this is practical for real-world usage where config files like.eslintrcneed to be valid.
17-31: Well-organized comments improve readability.The added comments clearly document the purpose of each rule group, making the configuration easier to understand and maintain.
apps/signup-form/src/components/frame.tsx (1)
1-5: Import casing update looks good.
Keeps module paths aligned with the kebab‑case rename without affecting behavior.apps/signup-form/src/components/pages/form-view.tsx (2)
1-4: Import path update is fine.
Consistent with the package’s kebab‑case renames.
54-57: Good improvement trimming the email before submit.
Prevents accidental whitespace from reaching validation and API calls.apps/signup-form/src/components/pages/form-view.stories.ts (1)
3-3: Story import rename looks correct.
Keeps story references consistent with lowercase filenames.apps/signup-form/src/components/pages/form-page.tsx (1)
2-6: Import path changes look good.
Consistent with the new kebab‑case module layout.apps/signup-form/src/app.tsx (1)
4-6: Import path updates are consistent and safe.
No runtime impact, just alignment with lowercase file names.apps/signup-form/src/index.tsx (1)
1-1: Entry import rename looks good.
Consistent with the new lowercase App module.apps/signup-form/.storybook/preview.tsx (1)
6-6: Import path casing update looks good.Keeps module resolution consistent with the new kebab-case convention.
apps/signup-form/src/utils/helpers.tsx (1)
1-20: Path/type tweaks are fine.Import casing and optional
pathaddition look consistent with the rename effort.apps/signup-form/src/utils/options.tsx (1)
2-2: Import path casing update looks good.No behavior change; aligns with the module rename.
apps/signup-form/src/components/pages/success-view.tsx (1)
3-3: Import path casing update looks good.Consistent with the kebab-case migration.
apps/signup-form/src/components/pages/success-view.stories.ts (1)
3-3: Story import path update looks good.Matches the new lowercase filename.
apps/signup-form/src/pages.tsx (1)
2-3: Page import path updates look good.Keeps module paths aligned with the renamed files.
apps/signup-form/src/components/pages/success-page.tsx (1)
2-3: Import path updates look good.Consistent with kebab-case renames; no runtime impact expected.
apps/signup-form/src/preview.stories.tsx (1)
4-5: Import path updates align with kebab-case refactor.No functional change detected.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| 2. Merge the release commit to `main` | ||
| 3. Wait until a new version of Ghost is released | ||
|
|
||
| To use the new version of signup form in Ghost, update the version in Ghost core's default configuration (currently at `core/shared/config/default.json`) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the correct Ghost core config filename/path.
echo "=== Searching for config files (default/defaults.json) ==="
fd -a 'default(s)?\.json$' . 2>/dev/null | head -20
echo -e "\n=== Checking for signup-form references in config files ==="
fd -a 'default(s)?\.json$' . -x rg -l "signup[- ]?form|signup_form|signup-form" {} 2>/dev/nullRepository: qodo-benchmark/Ghost-combined-coderabbit
Length of output: 487
Update config filename to defaults.json.
The config filename should be defaults.json (not default.json). Update line 62 to reference core/shared/config/defaults.json.
🤖 Prompt for AI Agents
In `@apps/signup-form/README.md` at line 62, Update the README line that
references the Ghost core config filename: replace the string
"core/shared/config/default.json" with "core/shared/config/defaults.json" so the
documentation points to the correct file; locate the occurrence of
"default.json" in apps/signup-form/README.md (the line containing
core/shared/config/default.json) and update it to use "defaults.json".
Benchmark PR from qodo-benchmark#250
Summary by CodeRabbit
Bug Fixes
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.