Skip to content

fix(event-types): remove gap in URL input for event creation#22123

Merged
anikdhabal merged 8 commits intocalcom:mainfrom
ddoemonn:fix/event-type-url-spacing
Aug 5, 2025
Merged

fix(event-types): remove gap in URL input for event creation#22123
anikdhabal merged 8 commits intocalcom:mainfrom
ddoemonn:fix/event-type-url-spacing

Conversation

@ddoemonn
Copy link
Copy Markdown
Contributor

@ddoemonn ddoemonn commented Jun 28, 2025

What does this PR do?

Fixes the extra space appearing in generated event URL slugs when creating new event types. The issue was caused by CSS gap spacing between the URL prefix and input field, making URLs appear as /username/ event-slug instead of /username/event-slug.

Image Demo (if applicable):

Screenshot 2025-06-28 at 18 30 47

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Go to https://app.cal.com/event-types
  2. Click "Add a new event type"
  3. Enter any title (e.g., "Demo Test Title")
  4. Observe the URL field - it should show the prefix and slug seamlessly connected without extra spaces
  5. Verify the generated URL appears as /username/demo-test-title not /username/ demo-test-title
  • No special environment variables required
  • Any user account with event type creation permissions
  • Expected: Clean URL formatting without visual gaps between prefix and slug

Checklist

  • I have read the contributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Summary by cubic

Fixed the extra space in the event URL input so the prefix and slug now appear seamlessly connected when creating a new event type.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jun 28, 2025
@graphite-app graphite-app bot requested a review from a team June 28, 2025 15:31
@vercel
Copy link
Copy Markdown

vercel bot commented Jun 28, 2025

@ddoemonn is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added event-types area: event types, event-types 🐛 bug Something isn't working labels Jun 28, 2025
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic reviewed 1 file and found no issues. Review PR in cubic.dev.

@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Jun 28, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (06/28/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (06/28/25)

1 label was added to this PR based on Keith Williams's automation.

"Add ready-for-e2e label" took an action on this PR • (07/08/25)

1 label was added to this PR based on Keith Williams's automation.

Copy link
Copy Markdown
Collaborator

@kart1ka kart1ka left a comment

Choose a reason for hiding this comment

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

image
Hey @ddoemonn, thanks for the pr. Could you please make similar changes inside Event Setup Tab as well?

@kart1ka kart1ka marked this pull request as draft June 30, 2025 17:57
@ddoemonn ddoemonn marked this pull request as ready for review July 2, 2025 12:13
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic found 3 issues across 2 files. Review them in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

) : undefined
}
containerClassName="[&>div]:gap-0"
className="pl-0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Setting className="pl-0" on the input may override existing padding styles, potentially affecting layout or accessibility. Ensure this does not conflict with other styles or reduce clickable area for users.

</Tooltip>
) : undefined
}
containerClassName="[&>div]:gap-0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

containerClassName is not a standard prop for most input components. If the underlying TextField component does not support this prop, it will be ignored and the intended style will not be applied.

</Tooltip>
) : undefined
}
containerClassName="[&>div]:gap-0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The use of a Tailwind arbitrary selector ([&>div]:gap-0) may not be supported in all Tailwind configurations, especially if the JIT mode or safelisting is not enabled. This could lead to the style not being applied as intended in production builds.

@kart1ka
Copy link
Copy Markdown
Collaborator

kart1ka commented Jul 2, 2025

@ddoemonn Pls address the cubic comments.

@ddoemonn ddoemonn requested a review from kart1ka July 2, 2025 14:36
@anikdhabal anikdhabal added the Low priority Created by Linear-GitHub Sync label Jul 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 8, 2025

E2E results are ready!

@github-actions
Copy link
Copy Markdown
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Jul 23, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jul 23, 2025

Walkthrough

The changes update the UI styling of the username and event slug input fields across three components. Specifically, a new container class "[&>div]:gap-0" is added to remove gaps between direct child div elements, and the input field class is updated to include "pl-0" to eliminate left padding. In one file, string interpolation for the slug prefix is refactored to use template literals. No logic, event handling, or validation is modified; all changes are limited to adjusting internal spacing and padding of input fields.

Estimated code review effort

1 (~2 minutes)

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/web/components/ui/UsernameAvailability/UsernameTextfield.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-playwright".

(The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-playwright@latest --save-dev

The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-playwright".

(The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-playwright@latest --save-dev

The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

packages/features/eventtypes/components/CreateEventTypeForm.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

ESLint couldn't find the plugin "eslint-plugin-playwright".

(The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-playwright@latest --save-dev

The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 076afdc and 67e35c5.

📒 Files selected for processing (3)
  • apps/web/components/ui/UsernameAvailability/UsernameTextfield.tsx (1 hunks)
  • packages/features/eventtypes/components/CreateEventTypeForm.tsx (2 hunks)
  • packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx (1 hunks)
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code. Functions like .add, .diff, .isBefore, and .isAfter are slow, especially in timezone mode. Prefer .utc() for better performance. Where possible, replace with native Date and direct .valueOf() comparisons for faster execution. Recommend using native methods or Day.js .utc() consistently in hot paths like loops.

Files:

  • apps/web/components/ui/UsernameAvailability/UsernameTextfield.tsx
  • packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx
  • packages/features/eventtypes/components/CreateEventTypeForm.tsx
🧠 Learnings (2)
apps/web/components/ui/UsernameAvailability/UsernameTextfield.tsx (1)

Learnt from: Anshumancanrock
PR: #22570
File: apps/web/modules/signup-view.tsx:253-253
Timestamp: 2025-07-21T21:33:23.343Z
Learning: In signup-view.tsx, when checking if redirectUrl contains certain strings, using explicit && checks (redirectUrl && redirectUrl.includes()) is preferred over optional chaining (redirectUrl?.includes()) to ensure the result is always a boolean rather than potentially undefined. This approach provides cleaner boolean contracts for downstream conditional logic.

packages/features/eventtypes/components/CreateEventTypeForm.tsx (2)

Learnt from: Anshumancanrock
PR: #22570
File: apps/web/modules/signup-view.tsx:253-253
Timestamp: 2025-07-21T21:33:23.343Z
Learning: In signup-view.tsx, when checking if redirectUrl contains certain strings, using explicit && checks (redirectUrl && redirectUrl.includes()) is preferred over optional chaining (redirectUrl?.includes()) to ensure the result is always a boolean rather than potentially undefined. This approach provides cleaner boolean contracts for downstream conditional logic.

Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to frontend/**/*.{js,jsx,ts,tsx} : Always use t() for text localization in frontend code; direct text embedding should trigger a warning.

🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code. Functions like .add, .diff, .isBefore, and .isAfter are slow, especially in timezone mode. Prefer .utc() for better performance. Where possible, replace with native Date and direct .valueOf() comparisons for faster execution. Recommend using native methods or Day.js .utc() consistently in hot paths like loops.

Files:

  • apps/web/components/ui/UsernameAvailability/UsernameTextfield.tsx
  • packages/features/eventtypes/components/tabs/setup/EventSetupTab.tsx
  • packages/features/eventtypes/components/CreateEventTypeForm.tsx
🧠 Learnings (2)
apps/web/components/ui/UsernameAvailability/UsernameTextfield.tsx (1)

Learnt from: Anshumancanrock
PR: #22570
File: apps/web/modules/signup-view.tsx:253-253
Timestamp: 2025-07-21T21:33:23.343Z
Learning: In signup-view.tsx, when checking if redirectUrl contains certain strings, using explicit && checks (redirectUrl && redirectUrl.includes()) is preferred over optional chaining (redirectUrl?.includes()) to ensure the result is always a boolean rather than potentially undefined. This approach provides cleaner boolean contracts for downstream conditional logic.

packages/features/eventtypes/components/CreateEventTypeForm.tsx (2)

Learnt from: Anshumancanrock
PR: #22570
File: apps/web/modules/signup-view.tsx:253-253
Timestamp: 2025-07-21T21:33:23.343Z
Learning: In signup-view.tsx, when checking if redirectUrl contains certain strings, using explicit && checks (redirectUrl && redirectUrl.includes()) is preferred over optional chaining (redirectUrl?.includes()) to ensure the result is always a boolean rather than potentially undefined. This approach provides cleaner boolean contracts for downstream conditional logic.

Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to frontend/**/*.{js,jsx,ts,tsx} : Always use t() for text localization in frontend code; direct text embedding should trigger a warning.

🔇 Additional comments (1)
packages/features/eventtypes/components/CreateEventTypeForm.tsx (1)

69-70: Minor: 👍 switch to template literal is fine

Using a template literal here is cleaner and avoids double slash issues. No concerns.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot removed the Stale label Jul 24, 2025
@anikdhabal anikdhabal enabled auto-merge (squash) August 5, 2025 03:33
@anikdhabal anikdhabal merged commit db9b9c4 into calcom:main Aug 5, 2025
33 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working community Created by Linear-GitHub Sync event-types area: event types, event-types Low priority Created by Linear-GitHub Sync ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra space appearing in generated event URL when creating new event type

3 participants