Skip to content

fix: replace // svelte-ignore state_referenced_locally with untrack((…#1879

Merged
shinokada merged 2 commits intothemesberg:mainfrom
shinokada:svelte-ignore-fix
Dec 11, 2025
Merged

fix: replace // svelte-ignore state_referenced_locally with untrack((…#1879
shinokada merged 2 commits intothemesberg:mainfrom
shinokada:svelte-ignore-fix

Conversation

@shinokada
Copy link
Copy Markdown
Collaborator

@shinokada shinokada commented Dec 11, 2025

🔗 Related issue (optional)

Closes #


📑 Description

  • Added import statement: import { untrack } from "svelte" to each file (or modified existing imports from svelte to include untrack)
  • Removed comment line: Deleted the // svelte-ignore state_referenced_locally comment
  • Wrapped object in untrack: Changed the second parameter of warnThemeDeprecation from a plain object to untrack(() => ({ ... }))

🔍 PR Type

  • Bug fix
  • Feature
  • Documentation
  • Refactor / Code cleanup
  • Build / Tooling
  • Other (please describe)

🚦 PR Status

  • Draft (work in progress, not ready for review)
  • Ready for review ✅

✅ Checklist

  • My code follows the existing code style
  • I have run pnpm lint && pnpm check && pnpm test:e2e and all tests pass
  • CoderabbitAI review has been completed and actionable suggestions were reviewed
  • I have updated documentation if my changes require it
  • My PR is based on the latest main branch (not the published npm version)
  • I have checked accessibility where applicable (ARIA, keyboard nav, etc.)
  • I have reviewed the rendered component in the browser

🧪 Screenshots / Demos (optional)


⚠️ Breaking Changes (optional)


ℹ️ Additional Information

Summary by CodeRabbit

  • Refactor

    • Improved internal reactivity handling across many UI components for more predictable behavior and potential performance benefits.
  • New Features

    • Pagination now supports a configurable visible pages count (default: 5).
  • Chores

    • Dependency updates and formatting/ignore pattern adjustments.

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

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 11, 2025

@shinokada 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 Dec 11, 2025

Walkthrough

Wraps many theme-deprecation object arguments with Svelte's untrack(() => ...), adds untrack imports, tweaks Accordion single-selection initialization to use untrack, updates .prettierignore, bumps several dependencies in package.json, and adds a visiblePages prop to PaginationNav.

Changes

Cohort / File(s) Summary
Configuration
\.prettierignore, package.json
Adjusted ignore patterns in .prettierignore (removed leading dash/trailing slash for /src/routes/md/, added src/routes/testdir, changed highlight pattern), and bumped multiple dependencies plus added EOF newline in package.json.
Accordion
src/lib/accordion/Accordion.svelte, src/lib/accordion/AccordionItem.svelte
Added untrack import and wrapped the initial value(s) passed to createSingleSelectionContext / warnThemeDeprecation with untrack(() => ...).
Pagination
src/lib/pagination/PaginationNav.svelte
Wrapped deprecation payload with untrack(() => ...) and introduced a new prop visiblePages: number = 5.
Theme deprecation — component updates (bulk)
src/lib/... (examples: badge/Badge.svelte, banner/Banner.svelte, bottom-navigation/*, breadcrumb/Breadcrumb.svelte, card/Card.svelte, carousel/Carousel.svelte, device-mockups/*, drawer/Drawerhead.svelte, dropdown/DropdownItem.svelte, footer/*, forms/**.svelte, gallery/Gallery.svelte, mega-menu/MegaMenu.svelte, modal/Modal.svelte, navbar/*, popover/Popover.svelte, rating/*, sidebar/*, speed-dial/*, table/*, tabs/Tabs.svelte, timeline/*, toast/Toast.svelte, typography/*/*)
Consistently added import { untrack } from "svelte" (where missing) and replaced plain object literals passed to warnThemeDeprecation with untrack(() => ({ ... })). Removed several // svelte-ignore state_referenced_locally comments. No public API surface changes except PaginationNav.
MetaTags import change
src/routes/admin-dashboard/utils/MetaTag.svelte
Replaced RunesMetaTags usage/import with MetaTags from runes-meta-tags, keeping props identical.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Areas to focus review on:
    • Accordion changes around createSingleSelectionContext(untrack(() => multiple)) — ensure initial-multiple semantics unchanged.
    • PaginationNav: confirm visiblePages default and usage integrate correctly.
    • Spot-check a representative set of components to verify untrack usage (import present, argument shapes unchanged) and that removed svelte-ignore comments are safe.
    • MetaTags import rename — ensure runtime export name matches new import.

Possibly related PRs

Poem

🐰
I untracked the crumbs of state today,
tucked reactive paws away,
whispering warnings soft and light,
components rest through the night.
Hop, calm code — all snug and bright.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: replace // svelte-ignore state_referenced_locally with untrack((…' clearly and specifically describes the main change: replacing svelte-ignore comments with untrack() calls.
Description check ✅ Passed The description covers the key changes: untrack import additions, removal of svelte-ignore comments, and wrapping objects in untrack calls. While some template sections are unchecked, the core changes are well-documented.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f54adb and 81a5e2a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json (4 hunks)
  • src/routes/admin-dashboard/utils/MetaTag.svelte (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{svelte,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{svelte,ts,tsx,js,jsx}: Use the Flowbite-Svelte MCP server to discover components by name or category before implementing UI components
Always use findComponent tool FIRST to locate the correct Flowbite-Svelte component before fetching documentation
After calling findComponent, use getComponentDoc tool to fetch complete documentation including usage examples, props, and best practices for Flowbite-Svelte components

Files:

  • src/routes/admin-dashboard/utils/MetaTag.svelte
🔇 Additional comments (2)
src/routes/admin-dashboard/utils/MetaTag.svelte (2)

2-2: Import rename to MetaTags matches updated library API

The named import switch to MetaTags from "runes-meta-tags" aligns with the provided library context for v0.5.0; no issues from this change in this file.

Please cross-check the package docs for runes-meta-tags@0.5.x to confirm MetaTags is the correct named export everywhere this component is used.


16-38: Component usage migration from <RunesMetaTags> to <MetaTags> looks correct

All props (title, description, og, twitter) and object shapes are preserved, so behavior should remain unchanged aside from the component rename.

When you run the app, verify that the rendered HTML still contains the expected Open Graph and Twitter meta tags for a few sample pages.


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.

@shinokada shinokada merged commit 7ccf086 into themesberg:main Dec 11, 2025
1 of 2 checks passed
@shinokada shinokada deleted the svelte-ignore-fix branch December 11, 2025 12:37
@coderabbitai coderabbitai bot mentioned this pull request Dec 18, 2025
42 tasks
@coderabbitai coderabbitai bot mentioned this pull request Dec 28, 2025
15 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.

1 participant