Skip to content

fix: double close button in docs#1717

Merged
shinokada merged 4 commits intothemesberg:mainfrom
jjagielka:hotfix
Aug 13, 2025
Merged

fix: double close button in docs#1717
shinokada merged 4 commits intothemesberg:mainfrom
jjagielka:hotfix

Conversation

@jjagielka
Copy link
Copy Markdown
Contributor

@jjagielka jjagielka commented Aug 13, 2025

Closes #

📑 Description

Status

  • Not Completed
  • Completed

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation and api-check directory as required
  • I have checked the page with https://validator.unl.edu/
  • All the tests have passed
  • My pull request is based on the latest commit (not the npm version).

ℹ Additional Information

Summary by CodeRabbit

  • Documentation
    • Removed CloseButton from all Drawer examples and related import lists.
    • Simplified drawer header examples to display only the icon and title (no dedicated close control).
    • Replaced Drawer-specific backdrop guidance with Tailwind backdrop utility guidance.
    • Clarified modal vs non-modal usage and responsibilities (positioning, z-index, ESC handling) for non-modal mode.
    • Fixed minor copy issues (e.g., "it's" → "its").

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 13, 2025

@jjagielka is attempting to deploy a commit to the Themesberg Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Aug 13, 2025

Warning

Rate limit exceeded

@jjagielka has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between f657373 and 27832ad.

📒 Files selected for processing (1)
  • src/routes/docs/components/drawer.md (12 hunks)

Walkthrough

Removed all uses and imports of CloseButton from Drawer documentation examples and the Timepicker drawer example; updated backdrop guidance and minor wording/typo fixes in the Drawer docs. No public API or runtime code was changed.

Changes

Cohort / File(s) Summary of Changes
Docs – Drawer examples
src/routes/docs/components/drawer.md
Removed CloseButton from imports and removed all CloseButton elements in example markup; updated backdrop guidance to recommend Tailwind backdrop classes; clarified modal vs non-modal wording and fixed minor typos.
Docs – Timepicker drawer example
src/routes/docs/forms/timepicker.md
Removed CloseButton from the flowbite-svelte import in the Drawer-with-timepicker example; example markup otherwise unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • Add Timepicker #1465 — Changes touch the same Timepicker documentation area and removal of CloseButton in examples; likely related.

Poem

I nibbled out the CloseButton, light and neat,
Cleared drawers so examples read complete.
Icons and labels now take center stage,
Simpler stories on the documentation page.
Thump-thump! — the rabbit hops off to the next page 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

Copy link
Copy Markdown
Contributor

@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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6e9efb7 and 9491b9d.

📒 Files selected for processing (1)
  • src/routes/docs/components/drawer.md (12 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright and Lint
🔇 Additional comments (1)
src/routes/docs/components/drawer.md (1)

196-198: Header without extra close control — aligns with intent

Removing the inline CloseButton from the “New event” header prevents duplication with Drawer’s own close control. Example remains clear and functional.

Comment on lines +22 to 24
import { Drawer, CardPlaceholder, Button } from "flowbite-svelte";
import { sineIn } from "svelte/easing";
</script>
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.

💡 Verification agent

🧩 Analysis chain

CloseButton removal across all examples — LGTM

Consistent removal of CloseButton imports/usage aligns with the PR goal and avoids the duplicate close control in Drawer examples. Remaining imports/components are appropriate per example.

To ensure no lingering references to CloseButton remain elsewhere in the docs, run:

Also applies to: 33-37, 65-69, 141-145, 185-189, 244-248, 278-288, 316-326, 351-361, 393-397, 425-429


🏁 Script executed:

#!/bin/bash
# Verify there are no leftover CloseButton usages/imports in docs
rg -n --hidden --glob 'src/**' '\bCloseButton\b'

Length of output: 12557


🏁 Script executed:

#!/bin/bash
# Verify there are no lingering CloseButton references in the docs folder
rg -n --glob 'src/routes/docs/**' '\bCloseButton\b'

Length of output: 1911


Remove lingering CloseButton references in documentation

The rg search in src/routes/docs/** still shows imports and usages of CloseButton. Please remove or update these occurrences to align with the PR goal:

• src/routes/docs/utilities/close-button.md
– lines 14, 22, 24, 28, 35: Remove the “CloseButton” section or mark as deprecated.
• src/routes/docs/components/sidebar.md
– imports at lines 594 & 667
<CloseButton …> usages at lines 618, 685, 741, and 759
• src/routes/docs/forms/timepicker.md
– import at line 416
• src/routes/docs/forms/input-field.md
– import at line 287
<CloseButton /> usage at line 316

Ensure all examples and import statements referencing CloseButton are removed or replaced in the docs.

🤖 Prompt for AI Agents
In src/routes/docs/components/drawer.md around lines 22 to 24, and across the
docs directory (specifically src/routes/docs/utilities/close-button.md lines 14,
22, 24, 28, 35; src/routes/docs/components/sidebar.md imports at lines 594 & 667
and CloseButton usages at lines 618, 685, 741, 759;
src/routes/docs/forms/timepicker.md import at line 416;
src/routes/docs/forms/input-field.md import at line 287 and usage at line 316),
remove any remaining CloseButton imports and usages or replace them with the
appropriate current component (or mark the section deprecated); update/remove
example snippets so they compile and render without CloseButton, and ensure
import lists at the top of each file no longer reference CloseButton and any
related example markup is either deleted or converted to the new API.

Copy link
Copy Markdown
Contributor

@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: 0

♻️ Duplicate comments (1)
src/routes/docs/components/drawer.md (1)

22-22: Verify no lingering CloseButton references across docs
Previous review flagged remaining CloseButton imports/usages in other docs pages. Please ensure these are updated or removed to avoid inconsistencies.

Run this from the repo root to confirm:

#!/bin/bash
# Verify there are no lingering CloseButton references in the docs folder
rg -n --glob 'src/routes/docs/**' '\bCloseButton\b' || true

Also applies to: 33-33, 65-65, 141-141, 185-185, 196-198, 244-244, 278-278, 316-316, 351-351, 385-385, 393-393, 425-425

🧹 Nitpick comments (2)
src/routes/docs/components/drawer.md (2)

385-385: Clarify Tailwind “backdrop:” guidance
Use precise wording to reference Tailwind’s ::backdrop variant for dialog.

-Use the drawer's `backdrop:xxx` class to manage its look.
+Use Tailwind's `backdrop:` variant classes (e.g., `backdrop:bg-black/50`) to style the dialog backdrop.

389-389: Fix typos and grammar in non-modal description
Minor corrections for clarity and consistency (use “However” and “manage”; standardize ESC).

-Drawer by default is `modal` (see `dialog`). You can set prop `modal={false}` to open `Drawer` in non-modal mode, that means with no backdrop. Note howerver, that you will need managed the `Drawer` position, z-index and `Esc` button manually.
+Drawer is `modal` by default (see `dialog`). You can set `modal={false}` to open `Drawer` in non-modal mode (no backdrop). However, you will need to manage the `Drawer` position, z-index, and `ESC` key behavior manually.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9491b9d and e467aef.

📒 Files selected for processing (1)
  • src/routes/docs/components/drawer.md (12 hunks)
🧰 Additional context used
🪛 LanguageTool
src/routes/docs/components/drawer.md

[grammar] ~389-~389: Ensure spelling is correct
Context: ...mode, that means with no backdrop. Note howerver, that you will need managed the `Drawer...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright and Lint
🔇 Additional comments (12)
src/routes/docs/components/drawer.md (12)

22-22: CloseButton removed from setup imports — LGTM
This aligns with the PR goal and avoids duplicate close controls in examples.


33-33: CloseButton removed from default example imports — LGTM
Import list is consistent with usage shown in the example.


65-65: Navigation example imports updated — LGTM
Consistent removal of CloseButton while keeping Sidebar-related components intact.


141-141: Contact form imports updated — LGTM
All imports reflect the components used in the example; CloseButton removed.


185-185: Form elements imports updated — LGTM
Imports match the example and remove CloseButton as intended.


196-198: Header adjusted after CloseButton removal — LGTM
The heading structure reads well without an inline close control. ESC/backdrop interactions still provide closing affordances.


244-244: Left drawer imports updated — LGTM
Removal of CloseButton is consistent across examples.


278-278: Right drawer imports updated — LGTM
No stray CloseButton import remains.


316-316: Top drawer imports updated — LGTM
Imports reflect actual usage and CloseButton is removed.


351-351: Bottom drawer imports updated — LGTM
Consistent with the rest of the examples.


393-393: Non-modal example imports updated — LGTM
CloseButton removed; example still demonstrates positioning/z-index clearly.


425-425: Disabling outside click example imports updated — LGTM
Consistent removal of CloseButton across final example.

Copy link
Copy Markdown
Contributor

@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: 0

🔭 Outside diff range comments (1)
src/routes/docs/components/drawer.md (1)

33-37: Use Svelte’s on:click binding instead of onclick

Please update all <Button> examples in src/routes/docs/components/drawer.md to use Svelte’s event directive (on:click) rather than the DOM onclick attribute. We’ve identified 10 occurrences:

  • src/routes/docs/components/drawer.md:40
  • src/routes/docs/components/drawer.md:72
  • src/routes/docs/components/drawer.md:148
  • src/routes/docs/components/drawer.md:192
  • src/routes/docs/components/drawer.md:251
  • src/routes/docs/components/drawer.md:291
  • src/routes/docs/components/drawer.md:329
  • src/routes/docs/components/drawer.md:364
  • src/routes/docs/components/drawer.md:400
  • src/routes/docs/components/drawer.md:432

Example replacement:

- <Button onclick={() => (open = true)}>Show drawer</Button>
+ <Button on:click={() => (open = true)}>Show drawer</Button>

Applying this change across all listed lines will ensure consistency with Svelte’s recommended syntax.

♻️ Duplicate comments (1)
src/routes/docs/components/drawer.md (1)

22-24: Verify no remaining CloseButton usage across docs

This file looks clean. To ensure the fix is complete repo-wide (past reviews flagged additional occurrences), run the search below and remove any remaining references in docs.

#!/bin/bash
# Verify there are no leftover CloseButton usages/imports in docs
rg -n --glob 'src/routes/docs/**' '\bCloseButton\b'

Also applies to: 33-37, 65-69, 141-145, 185-189, 244-248, 278-288, 316-326, 351-361

🧹 Nitpick comments (3)
src/routes/docs/components/drawer.md (3)

385-385: Clarify backdrop usage with a concrete example

The guidance is correct; adding a minimal example helps readers apply it immediately.

Apply this doc tweak to include a usage hint:

-Use Tailwind's `backdrop:` variant classes (e.g., `backdrop:bg-black/50`) to style the dialog backdrop.
+Use Tailwind's `backdrop:` variant classes (e.g., `backdrop:bg-black/50`) to style the dialog backdrop. For example:
+
+```svelte
+<Drawer class="backdrop:bg-black/50">
+  <!-- content -->
+</Drawer>
+```

389-389: Non-modal caveat: mention focus and outside-click behavior

Non-modal mode disables the modal backdrop and default ESC handling. It’s worth noting that:

  • Focus isn’t trapped; keyboard users can tab to background content.
  • Outside clicks typically won’t close the drawer unless you implement your own logic.

Consider expanding the note to set expectations or link to the “Disabling outside click” section and add a brief reminder on custom ESC handling if desired.

Also applies to: 404-416


393-397: Resolve import/usage inconsistency for A vs in Non-modal example

The example imports A but uses a native . Either drop A from the import or switch to using for consistency with other examples (e.g., the Top drawer section).

Option 1 — use in the paragraph:

-  import { Drawer, CardPlaceholder, Button, A } from "flowbite-svelte";
+  import { Drawer, CardPlaceholder, Button, A } from "flowbite-svelte";
@@
-  <p class="mb-6 text-sm text-gray-500 dark:text-gray-400">
-    Supercharge your hiring by taking advantage of our <a href="/" class="text-primary-600 dark:text-primary-500 underline hover:no-underline">limited-time sale</a>
+  <p class="mb-6 text-sm text-gray-500 dark:text-gray-400">
+    Supercharge your hiring by taking advantage of our <A href="/" class="text-primary-600 dark:text-primary-500 underline hover:no-underline">limited-time sale</A>

Option 2 — keep and remove A from import:

-  import { Drawer, CardPlaceholder, Button, A } from "flowbite-svelte";
+  import { Drawer, CardPlaceholder, Button } from "flowbite-svelte";

Also applies to: 408-411

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e467aef and f657373.

📒 Files selected for processing (2)
  • src/routes/docs/components/drawer.md (12 hunks)
  • src/routes/docs/forms/timepicker.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/routes/docs/forms/timepicker.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Playwright and Lint
🔇 Additional comments (9)
src/routes/docs/components/drawer.md (9)

22-24: LGTM: Removed CloseButton from the setup import

The setup snippet now imports only Drawer, CardPlaceholder, and Button — aligned with the PR intent to avoid a duplicate close control.


33-37: LGTM: Default drawer import cleaned up

CloseButton usage is gone from this example too. No functional changes beyond the import line — consistent with the PR scope.


65-69: LGTM: Navigation example imports adjusted

Imports look correct for the Sidebar stack; no stray CloseButton. Good consistency with the PR objective.


141-145: LGTM: Contact form example import cleaned up

CloseButton removed here as well; the imported components match the usage in the example.


185-189: LGTM: “Form elements” example header no longer shows a second close

The header now contains only the Info icon and title — the extra close control has been removed.

Also applies to: 196-199


244-248: LGTM: Left drawer imports

Imports are scoped to this example and no CloseButton remains.


278-288: LGTM: Right drawer imports and transition params

Imports are correct, and the transition parameters remain unchanged.


316-326: LGTM: Top drawer imports

Imports match usage and continue to exclude CloseButton.


351-361: LGTM: Bottom drawer imports

Consistent cleanup here as well — no CloseButton import.

@shinokada shinokada merged commit 83e449e into themesberg:main Aug 13, 2025
1 of 2 checks passed
@jjagielka jjagielka deleted the hotfix branch August 14, 2025 14:11
@coderabbitai coderabbitai bot mentioned this pull request Aug 17, 2025
8 tasks
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