Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: improve floating schedule button#23873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
eunjae-lee merged 4 commits intomainfromPeerRich-patch-3
Nov 19, 2025
Merged

Conversation

@PeerRich
Copy link
Member

this allows us to have a button without text without breaking the UI

before
CleanShot 2025-09-16 at 16 53 11@2x

after
CleanShot 2025-09-16 at 16 52 39@2x

@PeerRichPeerRich requested a review froma team as acode ownerSeptember 16, 2025 14:53
@coderabbitai
Copy link
Contributor

coderabbitaibot commentedSep 16, 2025
edited
Loading

Walkthrough

The pull request updates the HTML template in packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts. It removes the mr-3 class from the button icon container and adds the ml-3 class to the button text container, adjusting horizontal spacing between the icon and label. No function signatures, exports, logic, or behavior are changed; only presentational markup is modified.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check nameStatusExplanation
Title Check✅ PassedThe title "chore: improve floating schedule button" is concise and directly related to the changeset, which updates the FloatingButton markup to fix spacing when the button has no text. It identifies the primary area of change (the floating schedule button) and uses a conventional prefix, making it clear in PR history. Although it could be more specific about the exact fix, it sufficiently summarizes the main change for reviewers.
Description Check✅ PassedThe PR description clearly states the intent to allow a floating schedule button without text without breaking the UI and includes before-and-after screenshots demonstrating the issue and the fix, which directly relates to the reported markup change in FloatingButtonHtml.ts. It therefore explains the purpose of the change and how the UI is affected. While it omits low-level implementation details, it is not off-topic and is actionable for reviewers.
Docstring Coverage✅ PassedNo functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branchPeerRich-patch-3

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see thedocumentation for more information.

Example:

reviews:pre_merge_checks:custom_checks:      -name:"Undocumented Breaking Changes"mode:"warning"instructions:|          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on thisDiscord post.


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

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

@graphite-appgraphite-appbot requested a review froma teamSeptember 16, 2025 14:53
@keithwillcodekeithwillcode added corearea: core, team members only platformAnything related to our platform plan labelsSep 16, 2025
@graphite-appgraphite-appbot requested a review froma teamSeptember 16, 2025 14:53
@dosubotdosubotbot added the 🧹 ImprovementsImprovements to existing features. Mostly UX/UI labelSep 16, 2025
Copy link
Contributor

@coderabbitaicoderabbitaibot 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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts (1)

14-16:Add accessible name when rendering icon-only button.

IfbuttonText is empty, this button has no accessible name (WCAG 4.1.2). Providearia-label (ideally from a prop) and fall back tobuttonText.

-return `<buttonpl-mi1">+return `<button aria-label="${buttonText || 'Open scheduling'}"auto">If i18n is required, introduce abuttonAriaLabel?: string param and prefer it over the fallback.

🧹 Nitpick comments (4)
packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts (4)

34-34:Avoid phantom spacing when buttonText is empty.

Withml-3 on an always-present flex item, you still get a 0‑width item that adds left margin. Either render the text node only when non-empty, or use container gaps.

Option A — conditional margin only when text exists:

-<div>${buttonText}</div>+<div>${buttonText}</div>

Option B — prefer Tailwind gap so spacing auto-collapses (works LTR/RTL):

-  )} flex h-16 origin-center bg-red-50 transform cursor-pointer items-center+  )} flex h-16 origin-center bg-red-50 transform cursor-pointer items-center gap-x-3
-<div>${buttonText}</div>+<div>${buttonText}</div>

19-19:Inline style parsing bug (missing semicolon).

z-index is appended tocolor value and ignored by the browser.

-style="background-color:${buttonColor}; color:${buttonTextColor} z-index: 10001">+style="background-color:${buttonColor}; color:${buttonTextColor}; z-index: 10001">

21-31:SVG attributes are JSX-style; use kebab-case in plain HTML.

strokeLinecap|strokeLinejoin|strokeWidth won’t apply in HTML; usestroke-linecap|stroke-linejoin|stroke-width. Also mark decorative SVG as hidden from AT.

-  <svg-class="h-7 w-7"-fill="none"-stroke="currentColor"-viewBox="0 0 24 24"-xmlns="http://www.w3.org/2000/svg">-<path-  strokeLinecap="round"-  strokeLinejoin="round"-  strokeWidth="2"+  <svg++    fill="none"+    stroke="currentColor"+    viewBox="0 0 24 24"+    xmlns="http://www.w3.org/2000/svg"+    aria-hidden="true" focusable="false">+    <path+      stroke-linecap="round"+      stroke-linejoin="round"+      stroke-width="2"

1-11:Prefer named export over default.

Improves tree‑shaking and refactors.

-const getHtml = ({+export const getHtml = ({
-export default getHtml;+// export { getHtml }; // if you keep default for now, consider switching in a follow-up

This is breaking for importers; gate behind a codemod or follow-up PR if widely used.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between5c70060 and07555e0.

📒 Files selected for processing (1)
  • packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never useinclude, always useselect
Ensure thecredential.key field is never returned from tRPC endpoints or APIs

Files:

  • packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js.utc() in hot paths like loops

Files:

  • packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (1)
packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts (1)

20-20:Spacing move off the icon looks good.

Removing margin from the icon container is the right direction.

Comment on lines 17 to 18
rounded-full py-4 px-6 text-base outline-none drop-shadow-md transition focus:outline-none fo
cus:ring-4 focus:ring-gray-600 focus:ring-opacity-50 active:scale-95"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Broken Tailwind class:focus:ring-4 split across lines.

Currently rendersfo andcus:ring-4 as two invalid classes; focus ring won’t apply.

-rounded-full py-4 px-6 text-base outline-none drop-shadow-md transition focus:outline-none fo-cus:ring-4 focus:ring-gray-600 focus:ring-opacity-50 active:scale-95"+rounded-full py-4 px-6 text-base outline-none drop-shadow-md transition focus:outline-none focus:ring-4 focus:ring-gray-600 focus:ring-opacity-50 active:scale-95"
📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
rounded-fullpy-4px-6text-baseoutline-nonedrop-shadow-mdtransitionfocus:outline-nonefo
cus:ring-4focus:ring-gray-600focus:ring-opacity-50active:scale-95"
rounded-fullpy-4px-6text-baseoutline-nonedrop-shadow-mdtransitionfocus:outline-nonefocus:ring-4focus:ring-gray-600focus:ring-opacity-50active:scale-95"
🤖 Prompt for AI Agents
In packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts aroundlines 17 to 18, a Tailwind class token was accidentally split across the lineinto "fo" and "cus:ring-4", breaking the intended "focus:ring-4" class; restorethe full token by joining the split parts so the class reads exactly"focus:ring-4" (and remove any stray partial tokens) so the focus ring stylingapplies correctly.

</svg>
</div>
<div>${buttonText}</div>
<divx x-first x-last">ml-3font-semibold leading-5 antialiased">${buttonText}</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

EscapebuttonText to prevent HTML injection.

buttonText is interpolated into raw HTML. Escape HTML entities to avoid XSS in embed contexts.

-<div>${buttonText}</div>+<div>${(buttonText ?? '').replace(/[&<>"']/g, (c) => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]!) )}</div>

If you prefer clarity, extract a smallescapeHtml helper above and call it here.

📝 Committable suggestion

‼️IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<divid="button"class="ml-3 font-semibold leading-5 antialiased">${buttonText}</div>
<divid="button"class="ml-3 font-semibold leading-5 antialiased">${(buttonText??'').replace(/[&<>"']/g,(c)=>({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'}[c]!))}</div>
🤖 Prompt for AI Agents
In packages/embeds/embed-core/src/FloatingButton/FloatingButtonHtml.ts aroundline 34, the buttonText is directly interpolated into the HTML causing possibleXSS; create a small escapeHtml helper (or import a safe encoder) that replaces&, <, >, ", ' and / with their corresponding HTML entities and then useescapeHtml(buttonText) when building the div string so the rendered HTML issafe.

@vercel
Copy link

vercelbot commentedSep 17, 2025
edited
Loading

The latest updates on your projects. Learn more aboutVercel for GitHub.

2 Skipped Deployments
ProjectDeploymentPreviewCommentsUpdated (UTC)
calIgnoredIgnoredNov 19, 2025 1:27pm
cal-euIgnoredIgnoredNov 19, 2025 1:27pm

@github-actions
Copy link
Contributor

This PR is being marked as stale due to inactivity.

@keithwillcodekeithwillcode removed the platformAnything related to our platform plan labelNov 13, 2025
@keithwillcodekeithwillcode removed the request for review froma teamNovember 13, 2025 13:50
@keithwillcodekeithwillcode added the platformAnything related to our platform plan labelNov 19, 2025
Copy link
Contributor

@cubic-dev-aicubic-dev-aibot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

@eunjae-leeeunjae-lee merged commit5f8db05 intomainNov 19, 2025
58 of 63 checks passed
@eunjae-leeeunjae-lee deleted the PeerRich-patch-3 branchNovember 19, 2025 14:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@coderabbitaicoderabbitai[bot]coderabbitai[bot] left review comments

@cubic-dev-aicubic-dev-ai[bot]cubic-dev-ai[bot] left review comments

@eunjae-leeeunjae-leeeunjae-lee approved these changes

@keithwillcodekeithwillcodekeithwillcode approved these changes

Assignees

No one assigned

Labels

corearea: core, team members only🧹 ImprovementsImprovements to existing features. Mostly UX/UIplatformAnything related to our platform planready-for-e2esize/XSStale

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@PeerRich@eunjae-lee@keithwillcode@anikdhabal

[8]ページ先頭

©2009-2025 Movatter.jp