Skip to content

Comments

Moved to kebab-case formatting signup-form#29

Open
tomerqodo wants to merge 3 commits intocoderabbit_combined_20260121_augment_sentry_coderabbit_1_base_moved_to_kebab-case_formatting_signup-form_pr250from
coderabbit_combined_20260121_augment_sentry_coderabbit_1_head_moved_to_kebab-case_formatting_signup-form_pr250
Open

Moved to kebab-case formatting signup-form#29
tomerqodo wants to merge 3 commits intocoderabbit_combined_20260121_augment_sentry_coderabbit_1_base_moved_to_kebab-case_formatting_signup-form_pr250from
coderabbit_combined_20260121_augment_sentry_coderabbit_1_head_moved_to_kebab-case_formatting_signup-form_pr250

Conversation

@tomerqodo
Copy link

@tomerqodo tomerqodo commented Jan 21, 2026

Benchmark PR from qodo-benchmark#250

Summary by CodeRabbit

  • Bug Fixes

    • Email input is now trimmed during form submission
    • Improved loading state handling upon successful form submission
  • Documentation

    • Added comprehensive release and deployment procedures
  • Chores

    • Version updated to 0.3.3

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Walkthrough

This 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 path field to the URLHistory type.

Changes

Cohort / File(s) Summary
Configuration & Documentation
apps/signup-form/.eslintrc.cjs, apps/signup-form/package.json, apps/signup-form/README.md, ghost/core/core/shared/config/defaults.json
Added ESLint rule ghost/filenames/match-regex to enforce kebab-case filenames. Version bumped from 0.3.2 to 0.3.3. Added Release section with yarn ship workflow and Ghost config update instructions. Minor whitespace formatting in defaults.json.
Core App Structure
apps/signup-form/src/app.tsx, apps/signup-form/src/index.tsx, apps/signup-form/.storybook/preview.tsx
Import paths updated to reference renamed modules: AppContextapp-context, ContentBoxcontent-box, Frameframe, and App file casing adjusted.
Components
apps/signup-form/src/components/frame.tsx, apps/signup-form/src/preview.stories.tsx
Import paths updated: IFrameiframe, AppContextapp-context, ContentBoxcontent-box.
Pages & Stories
apps/signup-form/src/pages.tsx, apps/signup-form/src/components/pages/form-page.tsx, apps/signup-form/src/components/pages/form-view.tsx, apps/signup-form/src/components/pages/form-view.stories.ts, apps/signup-form/src/components/pages/success-page.tsx, apps/signup-form/src/components/pages/success-view.tsx, apps/signup-form/src/components/pages/success-view.stories.ts
Import paths updated to kebab-case filenames. Removed setLoading(false) call in form-page success branch when minimal is true. Added email trimming in form-view: {email: email.trim()} instead of {email}.
Utilities
apps/signup-form/src/utils/helpers.tsx, apps/signup-form/src/utils/options.tsx
Import paths updated: AppContextapp-context. URLHistory type updated with optional path?: string field. Simplified getUrlHistory by removing defensive if (history) check.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Hops with delight
Files dressed in kebab-case, trim and bright,
Lowercase names hop through the night,
Email gets trimmed, types take flight,
Loading states refined with utmost care—
A cleaner codebase, fair and square! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: converting file naming from PascalCase to kebab-case throughout the signup-form module.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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: Clear loading after minimal success.
In minimal mode, loading stays true, 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 return undefined; returning it directly skips the fallback history construction and violates the URLHistory contract, 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4ebca49 and fa58658.

📒 Files selected for processing (22)
  • apps/signup-form/.eslintrc.cjs
  • apps/signup-form/.storybook/preview.tsx
  • apps/signup-form/README.md
  • apps/signup-form/package.json
  • apps/signup-form/src/app-context.ts
  • apps/signup-form/src/app.tsx
  • apps/signup-form/src/components/content-box.tsx
  • apps/signup-form/src/components/frame.tsx
  • apps/signup-form/src/components/iframe.tsx
  • apps/signup-form/src/components/pages/form-page.tsx
  • apps/signup-form/src/components/pages/form-view.stories.ts
  • apps/signup-form/src/components/pages/form-view.tsx
  • apps/signup-form/src/components/pages/success-page.tsx
  • apps/signup-form/src/components/pages/success-view.stories.ts
  • apps/signup-form/src/components/pages/success-view.tsx
  • apps/signup-form/src/index.tsx
  • apps/signup-form/src/pages.tsx
  • apps/signup-form/src/preview.stories.tsx
  • apps/signup-form/src/utils/helpers.tsx
  • apps/signup-form/src/utils/options.tsx
  • apps/signup-form/test/utils/is-test-env.js
  • ghost/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 .eslintrc need 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 path addition 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`)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 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/null

Repository: 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".

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.

2 participants