Skip to content

Classes#1681

Merged
shinokada merged 6 commits intothemesberg:mainfrom
jjagielka:classes
Jul 17, 2025
Merged

Classes#1681
shinokada merged 6 commits intothemesberg:mainfrom
jjagielka:classes

Conversation

@jjagielka
Copy link
Copy Markdown
Contributor

@jjagielka jjagielka commented Jul 16, 2025

📑 Description

First approach to classes.
Adds classes without removing individual xxxClass props, however it console logs deprecation warning.

  • Done for Accordion, Badge, Banner, BottomNav

We can introduce those changes partially, so I think it can be merged.

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 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

  • New Features

    • Added unified classes prop for AccordionItem, Badge, Banner, BottomNav, BottomNavHeader, and BottomNavItem components to simplify and modernize styling customization.
    • Deprecated old individual styling props in favor of the new classes prop, with warnings for deprecated usage.
    • Introduced explicit variant type aliases for Accordion, AccordionItem, Avatar, Badge, Banner, BottomNav, BottomNavItem, BottomNavHeader, and BottomNavHeaderItem components to enhance type safety.
  • Refactor

    • Centralized and normalized class management across AccordionItem, Badge, Banner, BottomNav, BottomNavHeader, and BottomNavItem components for more consistent styling.
    • Updated component prop interfaces to extend new variant types and removed redundant or conflicting properties.
    • Renamed slot keys from outer to base in BottomNav and BottomNavHeader themes for consistent slot naming.
    • Added utility to warn about deprecated styling props and guide users toward the new classes prop.
    • Improved reactive state management and prop handling in BottomNavItem for better active state detection and rendering logic.
  • Documentation

    • Console warnings now inform users about deprecated styling props and encourage the use of the classes prop.
  • Style

    • Improved import organization and formatting across multiple files for better readability.

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 16, 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 Jul 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update centralizes and modernizes component styling by introducing unified classes props across several components, deprecating older individual class props. Type definitions are refactored to leverage new variant types, and utility functions for deprecation warnings and class management are added. Type safety and interface consistency are improved throughout.

Changes

Files/Groups Change Summary
src/lib/accordion/AccordionItem.svelte Refactored to use unified classes prop for styling; deprecated individual class props with warnings; updated logic.
src/lib/accordion/theme.ts Added AccordionVariants and AccordionItemVariants type aliases for explicit variant typings.
src/lib/avatar/theme.ts Introduced AvatarVariants type alias for avatar variant typings.
src/lib/badge/Badge.svelte Added classes prop for styling; deprecated aClass with warning; refactored internal class usage.
src/lib/badge/theme.ts, src/lib/banner/theme.ts Updated type aliases (BadgeVariants, BannerVariants) to include Classes<...> for extended class typings.
src/lib/banner/Banner.svelte Added classes prop; deprecated innerClass and closeClass with warning; centralized styling logic.
src/lib/theme/themeUtils.ts Added Classes<T> and Slots<T> type aliases; introduced themeDeprecated function for deprecation warnings.
src/lib/types.ts Refactored component prop interfaces to extend new variant types; removed redundant/legacy props; formatting tweaks.
src/lib/bottom-navigation/BottomNav.svelte Replaced deprecated outerClass and innerClass with unified classes and renamed class prop; added deprecation warnings.
src/lib/bottom-navigation/BottomNavHeader.svelte Replaced deprecated outerClass and innerClass with classes and renamed class prop; added deprecation warnings.
src/lib/bottom-navigation/BottomNavItem.svelte Improved prop handling and reactive active state; deprecated old class props with warnings; updated class styling logic.
src/lib/bottom-navigation/theme.ts Renamed slot keys from outer to base; added variant and classes type aliases for bottom navigation themes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Component
    participant ThemeUtils

    User->>Component: Passes props (including classes or deprecated props)
    Component->>ThemeUtils: Calls themeDeprecated if deprecated props used
    ThemeUtils-->>Component: Logs deprecation warning (if needed)
    Component->>Component: Derives styling from classes or deprecated props
    Component->>Component: Applies styling to elements
Loading

Possibly related PRs

  • Classes #1681: Implements the classes prop alongside deprecated individual styling props in AccordionItem and other components, centralizing styling management and adding deprecation warnings.
  • feat: progressbar new way of handling classes #1607: Refactors the Progressbar component to unify multiple individual class props into a single classes prop, similar to this PR's approach for AccordionItem, indicating a consistent styling management pattern.

Poem

🐇
A hop, a skip, a class reborn,
Old props deprecated, new styles adorn.
With warnings gentle, and types anew,
The rabbit’s code is crisp and true.
Unified classes, variants shine—
In this fresh patch, all styles align!


📜 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 e31f46e and 4597129.

📒 Files selected for processing (3)
  • src/lib/bottom-navigation/BottomNav.svelte (1 hunks)
  • src/lib/bottom-navigation/BottomNavItem.svelte (3 hunks)
  • src/lib/types.ts (13 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • 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.

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

🧹 Nitpick comments (6)
src/lib/types.ts (6)

376-376: Consider replacing empty interface with type alias.

The ESLint warning is valid - this empty interface is equivalent to its supertype. Consider replacing it with a type alias for better clarity:

-export interface CheckIconProps extends SVGAttributes<SVGSVGElement> { }
+export type CheckIconProps = SVGAttributes<SVGSVGElement>;

594-594: Consider replacing empty interface with type alias.

-export interface DropdownDividerProps extends HTMLAttributes<HTMLDivElement> { }
+export type DropdownDividerProps = HTMLAttributes<HTMLDivElement>;

1092-1092: Consider replacing empty interface with type alias.

-export interface NavBrandProps extends HTMLAnchorAttributes { }
+export type NavBrandProps = HTMLAnchorAttributes;

1128-1128: Consider replacing empty interface with type alias.

-export interface ToolbarGroupProps extends ToolbarGroupVariants, HTMLAttributes<HTMLDivElement> { }
+export type ToolbarGroupProps = ToolbarGroupVariants & HTMLAttributes<HTMLDivElement>;

1437-1437: Consider replacing empty interface with type alias.

-export interface TestimonialPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
+export type TestimonialPlaceholderProps = HTMLAttributes<HTMLDivElement>;

1447-1447: Consider replacing empty interface with type alias.

-export interface WidgetPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
+export type WidgetPlaceholderProps = HTMLAttributes<HTMLDivElement>;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c3f3563 and e2286be.

📒 Files selected for processing (9)
  • src/lib/accordion/AccordionItem.svelte (3 hunks)
  • src/lib/accordion/theme.ts (1 hunks)
  • src/lib/avatar/theme.ts (1 hunks)
  • src/lib/badge/Badge.svelte (2 hunks)
  • src/lib/badge/theme.ts (1 hunks)
  • src/lib/banner/Banner.svelte (2 hunks)
  • src/lib/banner/theme.ts (1 hunks)
  • src/lib/theme/themeUtils.ts (1 hunks)
  • src/lib/types.ts (13 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:52:09.106Z
Learning: In the Flowbite Svelte library's form components, both the regular focus styling (controlled by ringClasses) and focus-within styling need to be dynamically adjusted based on validation state. For proper validation styling, create separate objects for focus-within classes (like focusWithinClasses) that use the same color as ringClasses when inputInvalid=true.
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:52:09.106Z
Learning: In the Flowbite Svelte library's form components like MultiInput, when handling focus states for validation, avoid hardcoding focus-within classes like 'focus-within:border-primary-500'. Instead, create a dynamic mapping object (e.g., focusWithinClasses) that changes the focus ring color based on the current color state, especially when inputInvalid=true.
src/lib/badge/Badge.svelte (2)
Learnt from: mrh1997
PR: themesberg/flowbite-svelte#1442
File: src/lib/utils/Popper.svelte:144-145
Timestamp: 2024-11-22T08:37:27.996Z
Learning: In `src/lib/utils/Popper.svelte`, inconsistencies in event handling (e.g., using both `mouseenter`/`mouseleave` and `pointerenter`/`pointerleave`) may be intentional to minimize modifications and reduce the risk of new problems.
Learnt from: LahTeuto
PR: themesberg/flowbite-svelte#1484
File: src/lib/navbar/NavLi.svelte:34-34
Timestamp: 2024-11-12T10:36:34.807Z
Learning: When enhancing ARIA roles in Svelte components, avoid setting `role="presentation"` on elements that should retain the `link` role, as it can diminish ARIA role coverage and negatively affect accessibility.
src/lib/accordion/AccordionItem.svelte (2)
Learnt from: mrh1997
PR: themesberg/flowbite-svelte#1442
File: src/lib/utils/Popper.svelte:144-145
Timestamp: 2024-11-22T08:37:27.996Z
Learning: In `src/lib/utils/Popper.svelte`, inconsistencies in event handling (e.g., using both `mouseenter`/`mouseleave` and `pointerenter`/`pointerleave`) may be intentional to minimize modifications and reduce the risk of new problems.
Learnt from: LahTeuto
PR: themesberg/flowbite-svelte#1484
File: src/lib/navbar/NavLi.svelte:34-34
Timestamp: 2024-11-12T10:36:34.807Z
Learning: When enhancing ARIA roles in Svelte components, avoid setting `role="presentation"` on elements that should retain the `link` role, as it can diminish ARIA role coverage and negatively affect accessibility.
src/lib/banner/Banner.svelte (1)
Learnt from: mrh1997
PR: themesberg/flowbite-svelte#1442
File: src/lib/utils/Popper.svelte:144-145
Timestamp: 2024-11-22T08:37:27.996Z
Learning: In `src/lib/utils/Popper.svelte`, inconsistencies in event handling (e.g., using both `mouseenter`/`mouseleave` and `pointerenter`/`pointerleave`) may be intentional to minimize modifications and reduce the risk of new problems.
src/lib/types.ts (2)
Learnt from: Chizaruu
PR: themesberg/flowbite-svelte#1465
File: src/lib/forms/Timepicker.svelte:105-116
Timestamp: 2024-10-18T09:38:03.879Z
Learning: In `Timepicker.svelte`, the `Dropdown` opens as intended and is used exclusively with the 'dropdown' and 'timerange-dropdown' Timepicker types.
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:11:53.953Z
Learning: In the Flowbite Svelte library's MultiInput component, the 'inputInvalid' property should be exported and passed to the Wrapper component to properly style the component's ring with red color when validation fails, similar to how the Input component handles validation states.
🧬 Code Graph Analysis (4)
src/lib/banner/theme.ts (1)
src/lib/theme/themeUtils.ts (1)
  • Classes (11-13)
src/lib/accordion/theme.ts (2)
src/lib/accordion/index.ts (2)
  • accordion (3-3)
  • accordionItem (3-3)
src/lib/theme/themeUtils.ts (1)
  • Classes (11-13)
src/lib/theme/themeUtils.ts (2)
src/lib/index.ts (1)
  • getTheme (5-5)
src/lib/types.ts (1)
  • ThemeConfig (1736-1738)
src/lib/types.ts (5)
src/lib/accordion/theme.ts (2)
  • AccordionVariants (5-5)
  • AccordionItemVariants (6-6)
src/lib/avatar/theme.ts (1)
  • AvatarVariants (4-4)
src/lib/banner/theme.ts (1)
  • BannerVariants (5-5)
src/lib/forms/helper/theme.ts (1)
  • HelperVariants (4-4)
src/lib/toolbar/theme.ts (1)
  • ToolbarGroupVariants (91-91)
🪛 ESLint
src/lib/theme/themeUtils.ts

[error] 10-10: Unexpected any. Specify a different type.

(@typescript-eslint/no-explicit-any)


[error] 11-11: Unexpected any. Specify a different type.

(@typescript-eslint/no-explicit-any)


[error] 15-15: Unexpected any. Specify a different type.

(@typescript-eslint/no-explicit-any)

src/lib/types.ts

[error] 376-376: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 594-594: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1092-1092: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1437-1437: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1447-1447: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

🔇 Additional comments (24)
src/lib/avatar/theme.ts (1)

2-4: LGTM! Good type safety improvement.

The addition of VariantProps import and the AvatarVariants type alias properly extracts variant props from the avatar theme configuration, enhancing type safety and consistency across the component system.

src/lib/banner/theme.ts (1)

3-5: LGTM! Proper type extension for classes prop.

The addition of Classes import and extending BannerVariants with Classes<typeof banner> correctly implements the new unified styling approach, allowing slot-based class overrides through the classes prop while maintaining type safety.

src/lib/badge/theme.ts (1)

1-5: LGTM! Clean import organization and type extension.

The import reorganization and extension of BadgeVariants with Classes<typeof badge> properly implements the unified styling approach, maintaining consistency with the broader component refactor while enhancing type safety.

src/lib/accordion/theme.ts (1)

1-6: LGTM! Proper variant type definitions for accordion components.

The addition of AccordionVariants and AccordionItemVariants type aliases correctly extracts variant props from their respective theme configurations. The inclusion of Classes<typeof accordionItem> in AccordionItemVariants appropriately supports slot-based styling for the more complex accordion item component.

src/lib/badge/Badge.svelte (2)

8-12: LGTM! Well-structured backward-compatible styling refactor.

The prop destructuring, deprecation warning, and reactive styling variable correctly implement the unified styling approach while maintaining backward compatibility with the deprecated aClass prop.


28-28: LGTM! Proper integration of unified styling.

The link class usage correctly merges theme classes with the new styling object, seamlessly supporting both the new classes prop and the legacy aClass prop through the reactive styling variable.

src/lib/theme/themeUtils.ts (1)

2-2: LGTM!

The type-only import of ClassValue from clsx is appropriate for the new class handling functionality.

src/lib/banner/Banner.svelte (4)

6-8: LGTM!

The import of theme utilities and the props destructuring correctly incorporate the new classes prop while maintaining backward compatibility with deprecated props.


10-11: LGTM!

The deprecation warning and styling derivation logic correctly implement the new pattern while maintaining backward compatibility. The mapping of deprecated props to their slot equivalents is accurate.


21-21: LGTM!

The template correctly uses styling.insideDiv from the derived styling object, providing a unified interface for both new and deprecated props.


28-28: LGTM!

The template correctly uses styling.dismissable from the derived styling object, maintaining consistency with the new styling approach.

src/lib/accordion/AccordionItem.svelte (6)

2-10: LGTM!

The import reorganization and props destructuring correctly integrate the new classes prop while maintaining backward compatibility with all deprecated styling props.


12-14: LGTM!

The deprecation warning correctly covers all styling props being deprecated, and the styling object mapping is accurate. The type annotation provides good type safety.


37-37: LGTM!

The buttonClass derivation correctly prioritizes the new styling approach (styling.active/styling.inactive) while maintaining backward compatibility with context-based styling.


40-41: LGTM!

The template correctly applies className to the outer h2 element and uses styling.button for the button styling, implementing the new unified styling approach.


66-66: LGTM!

The content div correctly uses styling.content from the unified styling object.


73-73: LGTM!

The content div correctly uses styling.content from the unified styling object in the alternative branch.

src/lib/types.ts (7)

69-70: LGTM!

The new variant type imports correctly support the updated prop interfaces and align with the new variant-based typing approach.


160-160: LGTM!

The AccordionProps interface correctly extends AccordionVariants and omits the "color" attribute to prevent conflicts with the variant's color property.


168-168: LGTM!

The AccordionItemProps interface correctly extends AccordionItemVariants while maintaining HTMLAttributes support, providing access to the new classes prop.


193-193: LGTM!

The AvatarProps interface correctly extends AvatarVariants while maintaining HTMLAttributes support, following the consistent pattern across component prop interfaces.


220-220: LGTM!

The BannerProps interface correctly extends BannerVariants and omits the "color" attribute to prevent conflicts, maintaining consistency with other component prop interfaces.


674-676: LGTM!

The formatting improvements in the CheckboxProps children snippet enhance readability without affecting functionality.


934-934: LGTM!

The formatting improvement in the TimepickerProps onselect property enhances readability.

@shinokada
Copy link
Copy Markdown
Collaborator

Is this ready for merge?

@jjagielka
Copy link
Copy Markdown
Contributor Author

It is ready for Accordion, Badge, Banner, BottomNav. The rest will follow, but I think we need to merge it now as you don't want to be blocked until I finish everything.

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

🧹 Nitpick comments (6)
src/lib/types.ts (6)

257-277: Remove commented code block

The large block of commented code appears to be documentation showing attributes now handled by AnchorButtonAttributes. Consider removing this commented section to keep the code clean, as the information is already conveyed through the type system.

-  // Common attributes that make sense for both button and anchor
-  // AnchorButtonDivAttributes provides them
-  // id?: string;
-  // style?: string;
-  // tabindex?: number;
-  // title?: string;
-  // role?: string;
-  // "aria-label"?: string;
-  // "data-testid"?: string;
-  // // Anchor-specific attributes
-  // href?: string;
-  // target?: string;
-  // rel?: string;
-  // download?: string | boolean;
-  // // Button-specific attributes
-  // type?: "button" | "submit" | "reset";
-  // disabled?: boolean;
-  // name?: string;
-  // value?: string | number | string[];
-  // // Allow any other attributes (like data-* attributes)
-  // [key: string]: any;

369-369: Consider converting empty interface to type alias

The empty CheckIconProps interface is equivalent to its supertype SVGAttributes<SVGSVGElement>. Consider using a type alias instead:

-export interface CheckIconProps extends SVGAttributes<SVGSVGElement> { }
+export type CheckIconProps = SVGAttributes<SVGSVGElement>;

587-587: Consider converting empty interface to type alias

The empty DropdownDividerProps interface is equivalent to its supertype. Consider using a type alias:

-export interface DropdownDividerProps extends HTMLAttributes<HTMLDivElement> { }
+export type DropdownDividerProps = HTMLAttributes<HTMLDivElement>;

1085-1085: Consider converting empty interface to type alias

The empty NavBrandProps interface is equivalent to its supertype. Consider using a type alias:

-export interface NavBrandProps extends HTMLAnchorAttributes { }
+export type NavBrandProps = HTMLAnchorAttributes;

1430-1430: Consider converting empty interface to type alias

The empty TestimonialPlaceholderProps interface is equivalent to its supertype. Consider using a type alias:

-export interface TestimonialPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
+export type TestimonialPlaceholderProps = HTMLAttributes<HTMLDivElement>;

1440-1440: Consider converting empty interface to type alias

The empty WidgetPlaceholderProps interface is equivalent to its supertype. Consider using a type alias:

-export interface WidgetPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
+export type WidgetPlaceholderProps = HTMLAttributes<HTMLDivElement>;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 06b8332 and b69b12e.

📒 Files selected for processing (5)
  • src/lib/bottom-navigation/BottomNav.svelte (2 hunks)
  • src/lib/bottom-navigation/BottomNavHeader.svelte (1 hunks)
  • src/lib/bottom-navigation/BottomNavItem.svelte (4 hunks)
  • src/lib/bottom-navigation/theme.ts (3 hunks)
  • src/lib/types.ts (14 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:52:09.106Z
Learning: In the Flowbite Svelte library's form components, both the regular focus styling (controlled by ringClasses) and focus-within styling need to be dynamically adjusted based on validation state. For proper validation styling, create separate objects for focus-within classes (like focusWithinClasses) that use the same color as ringClasses when inputInvalid=true.
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:52:09.106Z
Learning: In the Flowbite Svelte library's form components like MultiInput, when handling focus states for validation, avoid hardcoding focus-within classes like 'focus-within:border-primary-500'. Instead, create a dynamic mapping object (e.g., focusWithinClasses) that changes the focus ring color based on the current color state, especially when inputInvalid=true.
src/lib/bottom-navigation/BottomNav.svelte (2)
Learnt from: mrh1997
PR: themesberg/flowbite-svelte#1442
File: src/lib/utils/Popper.svelte:144-145
Timestamp: 2024-11-22T08:37:27.996Z
Learning: In `src/lib/utils/Popper.svelte`, inconsistencies in event handling (e.g., using both `mouseenter`/`mouseleave` and `pointerenter`/`pointerleave`) may be intentional to minimize modifications and reduce the risk of new problems.
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:52:09.106Z
Learning: In the Flowbite Svelte library's form components, both the regular focus styling (controlled by ringClasses) and focus-within styling need to be dynamically adjusted based on validation state. For proper validation styling, create separate objects for focus-within classes (like focusWithinClasses) that use the same color as ringClasses when inputInvalid=true.
src/lib/bottom-navigation/BottomNavHeader.svelte (1)
Learnt from: mrh1997
PR: themesberg/flowbite-svelte#1442
File: src/lib/utils/Popper.svelte:144-145
Timestamp: 2024-11-22T08:37:27.996Z
Learning: In `src/lib/utils/Popper.svelte`, inconsistencies in event handling (e.g., using both `mouseenter`/`mouseleave` and `pointerenter`/`pointerleave`) may be intentional to minimize modifications and reduce the risk of new problems.
src/lib/bottom-navigation/BottomNavItem.svelte (2)
Learnt from: mrh1997
PR: themesberg/flowbite-svelte#1442
File: src/lib/utils/Popper.svelte:144-145
Timestamp: 2024-11-22T08:37:27.996Z
Learning: In `src/lib/utils/Popper.svelte`, inconsistencies in event handling (e.g., using both `mouseenter`/`mouseleave` and `pointerenter`/`pointerleave`) may be intentional to minimize modifications and reduce the risk of new problems.
Learnt from: LahTeuto
PR: themesberg/flowbite-svelte#1484
File: src/lib/navbar/NavLi.svelte:34-34
Timestamp: 2024-11-12T10:36:34.807Z
Learning: When enhancing ARIA roles in Svelte components, avoid setting `role="presentation"` on elements that should retain the `link` role, as it can diminish ARIA role coverage and negatively affect accessibility.
src/lib/types.ts (2)
Learnt from: Chizaruu
PR: themesberg/flowbite-svelte#1465
File: src/lib/forms/Timepicker.svelte:105-116
Timestamp: 2024-10-18T09:38:03.879Z
Learning: In `Timepicker.svelte`, the `Dropdown` opens as intended and is used exclusively with the 'dropdown' and 'timerange-dropdown' Timepicker types.
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:11:53.953Z
Learning: In the Flowbite Svelte library's MultiInput component, the 'inputInvalid' property should be exported and passed to the Wrapper component to properly style the component's ring with red color when validation fails, similar to how the Input component handles validation states.
🧬 Code Graph Analysis (2)
src/lib/bottom-navigation/theme.ts (2)
src/lib/bottom-navigation/index.ts (7)
  • bottomNav (5-5)
  • bottomNavItem (5-5)
  • BottomNavItemTheme (5-5)
  • bottomNavHeader (5-5)
  • BottomNavHeaderTheme (5-5)
  • bottomNavHeaderItem (5-5)
  • BottomNavHeaderItemTheme (5-5)
src/lib/theme/themeUtils.ts (1)
  • Classes (11-13)
src/lib/types.ts (6)
src/lib/accordion/theme.ts (2)
  • AccordionVariants (5-5)
  • AccordionItemVariants (6-6)
src/lib/avatar/theme.ts (1)
  • AvatarVariants (4-4)
src/lib/banner/theme.ts (1)
  • BannerVariants (5-5)
src/lib/bottom-navigation/theme.ts (4)
  • BottomNavVariants (123-123)
  • BottomNavItemVariants (127-127)
  • BottomNavHeaderVariants (131-131)
  • BottomNavHeaderItemVariants (135-135)
src/lib/forms/helper/theme.ts (1)
  • HelperVariants (4-4)
src/lib/toolbar/theme.ts (1)
  • ToolbarGroupVariants (91-91)
🪛 ESLint
src/lib/types.ts

[error] 369-369: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 587-587: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1085-1085: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1430-1430: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1440-1440: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

⏰ 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 (16)
src/lib/bottom-navigation/BottomNav.svelte (3)

7-7: LGTM - Import addition for deprecation support

The import of themeDeprecated is correctly added to support the deprecation warnings for the old styling props.


24-24: Correct theme slot key update

The change from outer to base correctly reflects the slot key rename in the theme configuration.


31-36: Template updates align with new styling pattern

The template correctly applies the new styling approach:

  • Using base slot key (line 31) instead of the deprecated outer
  • Using className prop (line 31) for the outer container
  • Using styling.inner (line 36) which provides the fallback logic from classes to deprecated props

These changes maintain backward compatibility while implementing the new unified styling pattern.

src/lib/bottom-navigation/BottomNavHeader.svelte (2)

15-15: Correct theme slot key update

The change from outerDiv to base correctly reflects the theme simplification where the outer div slot was consolidated into the base slot.


18-19: Template correctly implements the new styling pattern

The template changes properly use:

  • base slot key for the outer container with className prop
  • styling.innerDiv for the inner container, which provides fallback to the deprecated innerClass

The implementation is consistent with the theme simplification and maintains backward compatibility.

src/lib/bottom-navigation/theme.ts (4)

1-3: Necessary imports for type system improvements

The addition of VariantProps and Classes imports is required for the new variant type definitions that combine styling variants with class overrides.


7-38: Systematic slot key rename from outer to base

The slot key rename is consistently applied across all bottomNav variants. This change aligns with the component updates and provides a more semantic naming convention.


104-109: Theme simplification consolidates outer styling

The change from outerDiv to base simplifies the theme structure while maintaining the innerDiv slot for inner styling. This consolidation reduces complexity and aligns with the component changes.


123-135: Enhanced type definitions with class override support

The new variant types correctly combine VariantProps with Classes to support both variant selection and class overrides per slot. The exception for BottomNavHeaderItemVariants (line 135) is appropriate since it's a simple component without multiple slots.

These type definitions enable better type safety and IntelliSense support for the component classes prop.

src/lib/bottom-navigation/BottomNavItem.svelte (5)

2-13: Consistent adoption of the new styling pattern

The changes properly implement the new classes prop pattern with:

  • Correct deprecation warnings for both spanClass and btnClass
  • Proper fallback logic in the reactive styling variable
  • Updated imports for the new type system

The implementation is consistent with the other bottom navigation components.


31-34: Reactive state correctly adapted to new prop structure

The isActive computation properly adapts to the new prop structure by extracting href from restProps. The nullish coalescing operator provides a safe fallback, and the active state logic remains functionally equivalent.


37-41: Class computation functions correctly updated

The class computation functions properly implement the new styling pattern:

  • getCommonClass uses className ?? btnClass for backward compatibility
  • getSpanClass uses styling.span which provides the fallback logic from classes to deprecated props

These changes maintain backward compatibility while adopting the new unified styling approach.


52-58: Simplified prop handling through restProps

The removal of explicit href prop handling simplifies the code by relying on restProps to pass through all appropriate attributes. This approach is cleaner and more maintainable.


61-71: Template correctly adapted to new prop structure

The conditional rendering logic properly adapts to the new prop structure by checking restProps.href === undefined. This explicit check is more reliable than checking for falsy values and maintains the intended behavior.

src/lib/types.ts (2)

69-71: Import statements for new variant types

The import statements correctly bring in the new variant types that combine styling variants with class overrides support.


161-286: Consistent type system improvements across interfaces

The interfaces are properly updated to extend their respective variant types:

  • Accordion components extend AccordionVariants and AccordionItemVariants
  • Avatar extends AvatarVariants
  • Banner extends BannerVariants
  • Bottom navigation components extend their respective variant types

The change of BottomNavItemProps from interface to type (line 248) is appropriate given its complex union with AnchorButtonAttributes.

These changes provide better type safety and IntelliSense support for the new classes prop pattern.

Comment on lines +9 to +12
let { children, header, position = "fixed", navType = "default", class: className, classes, innerClass, activeClass, activeUrl = "", ...restProps }: BottomNavProps = $props();

themeDeprecated("BottomNav", { innerClass });
let styling = $derived(classes ?? { inner: innerClass });
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

Good implementation of the new styling pattern

The prop destructuring and deprecation handling are well implemented. The reactive styling variable correctly falls back to the deprecated innerClass prop when classes is not provided.

However, I notice that outerClass is mentioned in the documentation comment (line 51) but is not included in the prop destructuring or deprecation warning. This suggests an inconsistency in the migration.


🏁 Script executed:

#!/bin/bash
# Check if outerClass is still being used in BottomNav components
rg -A 3 -B 3 "outerClass" src/lib/bottom-navigation/

Length of output: 1019


Handle deprecated outerClass prop in BottomNav

The component’s documentation still lists outerClass, but it isn’t destructured or handled in the runtime code. To keep prop definitions and implementation in sync, we need to:

  • Destructure outerClass alongside innerClass in src/lib/bottom-navigation/BottomNav.svelte (around lines 9–12).
  • Call themeDeprecated for outerClass (e.g. themeDeprecated("BottomNav", { innerClass, outerClass });).
  • Include outer: outerClass in the fallback for styling:
    - let styling = $derived(classes ?? { inner: innerClass });
    + let styling = $derived(
    +   classes ?? { inner: innerClass, outer: outerClass }
    + );

This ensures the deprecated outerClass prop still works until fully removed and matches the docs.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/lib/bottom-navigation/BottomNav.svelte around lines 9 to 12, the
deprecated prop outerClass is documented but not handled in the code. To fix
this, destructure outerClass alongside innerClass from the props, update the
themeDeprecated call to include outerClass, and add outer: outerClass to the
fallback object passed to $derived for styling. This will maintain backward
compatibility with the deprecated outerClass prop.

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: 5

🧹 Nitpick comments (1)
src/lib/types.ts (1)

255-274: Clean up commented code for better maintainability.

The commented out properties should be removed since they are now provided by AnchorButtonDivAttributes and the variant-based typing approach. Keeping commented code can lead to confusion and maintenance issues.

-  // Common attributes that make sense for both button and anchor
-  // AnchorButtonDivAttributes provides them
-  // id?: string;
-  // style?: string;
-  // tabindex?: number;
-  // title?: string;
-  // role?: string;
-  // "aria-label"?: string;
-  // "data-testid"?: string;
-  // // Anchor-specific attributes
-  // href?: string;
-  // target?: string;
-  // rel?: string;
-  // download?: string | boolean;
-  // // Button-specific attributes
-  // type?: "button" | "submit" | "reset";
-  // disabled?: boolean;
-  // name?: string;
-  // value?: string | number | string[];
-  // // Allow any other attributes (like data-* attributes)
-  // [key: string]: any;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between b69b12e and e31f46e.

📒 Files selected for processing (3)
  • src/lib/bottom-navigation/BottomNav.svelte (2 hunks)
  • src/lib/bottom-navigation/BottomNavHeader.svelte (1 hunks)
  • src/lib/types.ts (13 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/bottom-navigation/BottomNav.svelte
  • src/lib/bottom-navigation/BottomNavHeader.svelte
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:52:09.106Z
Learning: In the Flowbite Svelte library's form components, both the regular focus styling (controlled by ringClasses) and focus-within styling need to be dynamically adjusted based on validation state. For proper validation styling, create separate objects for focus-within classes (like focusWithinClasses) that use the same color as ringClasses when inputInvalid=true.
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:52:09.106Z
Learning: In the Flowbite Svelte library's form components like MultiInput, when handling focus states for validation, avoid hardcoding focus-within classes like 'focus-within:border-primary-500'. Instead, create a dynamic mapping object (e.g., focusWithinClasses) that changes the focus ring color based on the current color state, especially when inputInvalid=true.
src/lib/types.ts (2)
Learnt from: Chizaruu
PR: themesberg/flowbite-svelte#1465
File: src/lib/forms/Timepicker.svelte:105-116
Timestamp: 2024-10-18T09:38:03.879Z
Learning: In `Timepicker.svelte`, the `Dropdown` opens as intended and is used exclusively with the 'dropdown' and 'timerange-dropdown' Timepicker types.
Learnt from: superstes
PR: themesberg/flowbite-svelte#0
File: :0-0
Timestamp: 2025-03-20T11:11:53.953Z
Learning: In the Flowbite Svelte library's MultiInput component, the 'inputInvalid' property should be exported and passed to the Wrapper component to properly style the component's ring with red color when validation fails, similar to how the Input component handles validation states.
🪛 ESLint
src/lib/types.ts

[error] 367-367: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 585-585: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1083-1083: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1428-1428: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)


[error] 1438-1438: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

⏰ 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 (13)
src/lib/types.ts (13)

69-71: LGTM! New variant imports align with the unified classes prop approach.

The new variant type imports for accordion, avatar, and bottom navigation components properly support the transition to variant-based typing mentioned in the PR objectives.


161-161: LGTM! AccordionProps correctly extends AccordionVariants.

The interface now properly uses variant-based typing, which aligns with the PR's goal of introducing a unified classes prop approach.


169-169: LGTM! AccordionItemProps correctly extends AccordionItemVariants.

The interface properly adopts the variant-based typing approach consistent with the PR objectives.


194-194: LGTM! AvatarProps correctly extends AvatarVariants.

The interface now uses variant-based typing, removing redundant explicit styling properties mentioned in the AI summary.


221-221: LGTM! BannerProps correctly extends BannerVariants.

The interface properly adopts variant-based typing, supporting the new classes prop pattern mentioned in the PR objectives.


238-238: LGTM! BottomNavProps correctly extends BottomNavVariants.

The interface now uses variant-based typing, consistent with the bottom navigation component refactoring mentioned in the PR.


247-247: LGTM! BottomNavItemProps correctly extends BottomNavItemVariants.

The type properly adopts variant-based typing, aligning with the bottom navigation component refactoring.


278-278: LGTM! BottomNavHeaderProps correctly extends BottomNavHeaderVariants.

The interface properly adopts variant-based typing, consistent with the bottom navigation component refactoring.


284-284: LGTM! BottomNavHeaderItemProps correctly extends BottomNavHeaderItemVariants.

The interface properly adopts variant-based typing, completing the bottom navigation component type updates.


665-667: LGTM! Improved type definition formatting.

The restructured type definition improves readability while maintaining the same functionality.


739-739: LGTM! HelperProps correctly extends HelperVariants.

The interface properly adopts variant-based typing, consistent with the overall refactoring approach.


925-925: LGTM! Enhanced callback flexibility.

The addition of [key: string]: string to the onselect callback parameter allows for more flexible data passing, which is a reasonable enhancement.


1119-1119: LGTM! ToolbarGroupProps correctly extends ToolbarGroupVariants.

The interface properly adopts variant-based typing, consistent with the overall refactoring approach.

}

export interface NavBrandProps extends HTMLAnchorAttributes {}
export interface NavBrandProps extends HTMLAnchorAttributes { }
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.

🛠️ Refactor suggestion

Remove redundant empty interface.

The NavBrandProps interface is equivalent to its supertype HTMLAnchorAttributes. Consider removing this interface and using the base type directly, or add meaningful properties if needed.

-export interface NavBrandProps extends HTMLAnchorAttributes { }

Then update any usage to use HTMLAnchorAttributes directly.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 ESLint

[error] 1083-1083: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

🤖 Prompt for AI Agents
In src/lib/types.ts at line 1083, the NavBrandProps interface is redundant as it
only extends HTMLAnchorAttributes without adding any new properties. Remove the
NavBrandProps interface entirely and update all references in the codebase to
use HTMLAnchorAttributes directly instead.

}

export interface TestimonialPlaceholderProps extends HTMLAttributes<HTMLDivElement> {}
export interface TestimonialPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
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.

🛠️ Refactor suggestion

Remove redundant empty interface.

The TestimonialPlaceholderProps interface is equivalent to its supertype HTMLAttributes<HTMLDivElement>. Consider removing this interface and using the base type directly, or add meaningful properties if needed.

-export interface TestimonialPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }

Then update any usage to use HTMLAttributes<HTMLDivElement> directly.

📝 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
export interface TestimonialPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
// (Interface removed; use HTMLAttributes<HTMLDivElement> directly)
🧰 Tools
🪛 ESLint

[error] 1428-1428: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

🤖 Prompt for AI Agents
In src/lib/types.ts at line 1428, the interface TestimonialPlaceholderProps is
redundant as it only extends HTMLAttributes<HTMLDivElement> without adding any
new properties. Remove the TestimonialPlaceholderProps interface entirely and
update all references in the codebase to use HTMLAttributes<HTMLDivElement>
directly instead.

}

export interface CheckIconProps extends SVGAttributes<SVGSVGElement> {}
export interface CheckIconProps extends SVGAttributes<SVGSVGElement> { }
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.

🛠️ Refactor suggestion

Remove redundant empty interface.

The CheckIconProps interface is equivalent to its supertype SVGAttributes<SVGSVGElement>. Consider removing this interface and using the base type directly, or add meaningful properties if needed.

-export interface CheckIconProps extends SVGAttributes<SVGSVGElement> { }

Then update any usage to use SVGAttributes<SVGSVGElement> directly.

📝 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
export interface CheckIconProps extends SVGAttributes<SVGSVGElement> { }
// (The redundant CheckIconProps interface has been removed. Update any references to use SVGAttributes<SVGSVGElement> directly.)
🧰 Tools
🪛 ESLint

[error] 367-367: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

🤖 Prompt for AI Agents
In src/lib/types.ts at line 367, the CheckIconProps interface is redundant as it
only extends SVGAttributes<SVGSVGElement> without adding any new properties.
Remove the CheckIconProps interface entirely and update all references in the
codebase to use SVGAttributes<SVGSVGElement> directly instead.

}

export interface WidgetPlaceholderProps extends HTMLAttributes<HTMLDivElement> {}
export interface WidgetPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
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.

🛠️ Refactor suggestion

Remove redundant empty interface.

The WidgetPlaceholderProps interface is equivalent to its supertype HTMLAttributes<HTMLDivElement>. Consider removing this interface and using the base type directly, or add meaningful properties if needed.

-export interface WidgetPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }

Then update any usage to use HTMLAttributes<HTMLDivElement> directly.

📝 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
export interface WidgetPlaceholderProps extends HTMLAttributes<HTMLDivElement> { }
🧰 Tools
🪛 ESLint

[error] 1438-1438: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

🤖 Prompt for AI Agents
In src/lib/types.ts at line 1438, the WidgetPlaceholderProps interface is
redundant as it only extends HTMLAttributes<HTMLDivElement> without adding any
new properties. Remove the WidgetPlaceholderProps interface entirely and update
all references in the codebase to use HTMLAttributes<HTMLDivElement> directly
instead.

}

export interface DropdownDividerProps extends HTMLAttributes<HTMLDivElement> {}
export interface DropdownDividerProps extends HTMLAttributes<HTMLDivElement> { }
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.

🛠️ Refactor suggestion

Remove redundant empty interface.

The DropdownDividerProps interface is equivalent to its supertype HTMLAttributes<HTMLDivElement>. Consider removing this interface and using the base type directly, or add meaningful properties if needed.

-export interface DropdownDividerProps extends HTMLAttributes<HTMLDivElement> { }

Then update any usage to use HTMLAttributes<HTMLDivElement> directly.

📝 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
export interface DropdownDividerProps extends HTMLAttributes<HTMLDivElement> { }
🧰 Tools
🪛 ESLint

[error] 585-585: An interface declaring no members is equivalent to its supertype.

(@typescript-eslint/no-empty-object-type)

🤖 Prompt for AI Agents
In src/lib/types.ts at line 585, the interface DropdownDividerProps is redundant
as it only extends HTMLAttributes<HTMLDivElement> without adding any new
properties. Remove the DropdownDividerProps interface entirely and update all
references in the codebase to use HTMLAttributes<HTMLDivElement> directly
instead.

@shinokada shinokada merged commit b650e35 into themesberg:main Jul 17, 2025
1 of 2 checks passed
@jjagielka jjagielka deleted the classes branch July 17, 2025 08:21
@coderabbitai coderabbitai bot mentioned this pull request Jul 19, 2025
8 tasks
This was referenced Aug 11, 2025
@coderabbitai coderabbitai bot mentioned this pull request Aug 31, 2025
8 tasks
@coderabbitai coderabbitai bot mentioned this pull request Nov 2, 2025
8 tasks
This was referenced Dec 29, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jan 14, 2026
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.

2 participants