Skip to content

Conversation

@MGREMY
Copy link
Collaborator

@MGREMY MGREMY commented Apr 8, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced dynamic class bindings for various components, enhancing styling flexibility.
    • Added support for custom styles across multiple components, including modals and dropdowns.
  • Refactor

    • Transitioned several components to extend from a new BaseComponent, standardizing functionality.
    • Simplified class management by consolidating class logic into dedicated theme files.
  • Bug Fixes

    • Resolved issues with static class assignments, improving responsiveness to component states.
  • Documentation

    • Updated theme management documentation to reflect new interfaces and functions for better clarity on usage.

MGREMY and others added 25 commits January 19, 2024 22:36
BREAKING CHANGE: `iconOnly` is now `isIconOnly` and must be `enabled` or `disabled`
BREAKING CHANGES: `boolean` variables are now FlowbiteBoolean usable with `ènabled` or `disabled`
BREAKING CHANGES: `boolean` variables are now FlowbiteBoolean usable with `ènabled` or `disabled`
BREAKING CHANGES: `boolean` variables are now FlowbiteBoolean usable with `ènabled` or `disabled`

/!\ Flowbite data attribute api don't work
BREAKING CHANGES: `boolean` variables are now FlowbiteBoolean usable with `ènabled` or `disabled`
`outline` is now either `outline` or `solid`
BREAKING CHANGES: `boolean` variables are now FlowbiteBoolean usable with `ènabled` or `disabled`
switch from flowbiteBoolean to boolean when return and setting component's data
data is still stored as FlowbiteBoolean
@vercel
Copy link

vercel bot commented Apr 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-angular ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 2:46pm

@SutuSebastian
Copy link

One quick thing, I just checked the preview and the sidebar doesn't go all the way to the bottom of the screen:

Screenshot 2024-04-08 at 17 35 50

@SutuSebastian
Copy link

But so nice u fixed that animation flicker on reload 🔥

@MGREMY
Copy link
Collaborator Author

MGREMY commented Apr 8, 2024

One quick thing, I just checked the preview and the sidebar doesn't go all the way to the bottom of the screen:

Screenshot 2024-04-08 at 17 35 50

It's fixed now !

@MGREMY MGREMY merged commit 2ef6e26 into main Apr 9, 2024
@MGREMY MGREMY deleted the refactor-components-properties branch April 9, 2024 19:51
@MGREMY MGREMY restored the refactor-components-properties branch July 12, 2024 08:22
@MGREMY MGREMY deleted the refactor-components-properties branch July 12, 2024 08:23
@MGREMY
Copy link
Collaborator Author

MGREMY commented Nov 4, 2024

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces significant updates across various components in the Flowbite Angular library, primarily focusing on enhancing the HTML structure and theming capabilities. Key modifications include replacing property bindings with direct attribute assignments, introducing dynamic class bindings using Angular's ngClass, and restructuring component properties to utilize a base component for improved maintainability. New theme files and interfaces are added to support customizable styles, promoting a more modular and flexible approach to component styling.

Changes

File Path Change Summary
apps/docs/src/app/app.component.html Removed [fluid] binding from <flowbite-navbar> and extraClass="border-r" from <flowbite-sidebar>.
apps/docs/src/app/pages/accordion-page/accordion-page.component.html Changed open attribute in <flowbite-accordion-panel> from [open]="true" to open.
apps/docs/src/app/pages/alert-page/alert-page.component.html Changed borderAccent from [withBorderAccent]="true" to borderAccent.
apps/docs/src/app/pages/alert-page/alert-page.component.ts Reorganized import statements without functional changes.
apps/docs/src/app/pages/badge-page/badge-page.component.html Renamed iconOnly attribute to isIconOnly in <flowbite-badge>.
apps/docs/src/app/pages/button-page/button-page.component.html Simplified button attributes and updated badge styling from customStyle="py-0" to [customStyle]="badgeCustomTheme".
apps/docs/src/app/pages/button-page/button-page.component.ts Added badgeCustomTheme property to ButtonPageComponent.
apps/docs/src/app/pages/dropdown-page/dropdown-page.component.html Updated position attributes in <flowbite-dropdown> to more generalized values.
apps/docs/src/app/pages/floating-label-page/floating-label-page.component.html Updated attributes in <flowbite-form-field> to standardize naming conventions.
apps/docs/src/app/pages/forms-page/form-page.component.html Similar updates to attributes in form fields as above.
apps/docs/src/app/pages/indicator-page/indicator-page.component.html Replaced content within <flowbite-demo-page> without functional changes.
apps/docs/src/app/pages/input-field-page/input-field-page.component.html Updated attributes in form fields for consistency with other components.
apps/docs/src/app/pages/modal-page/modal-page.component.html Simplified modal attributes and improved formatting.
libs/flowbite-angular/src/lib/common/flowbite.theme.ts Introduced new types and interfaces for theming within the Flowbite library.
libs/flowbite-angular/src/lib/components/accordion/*.component.html Replaced static classes with dynamic class bindings using ngClass.
libs/flowbite-angular/src/lib/components/accordion/*.component.ts Extended BaseComponent, added properties, and implemented dynamic class handling.
libs/flowbite-angular/src/lib/components/alert/*.component.html Simplified class management in alert components.
libs/flowbite-angular/src/lib/components/alert/*.component.ts Transitioned to extend BaseComponent and updated properties for dynamic styling.
libs/flowbite-angular/src/lib/components/badge/*.component.html Simplified class bindings in badge components.
libs/flowbite-angular/src/lib/components/badge/*.component.ts Updated to extend BaseComponent and manage properties dynamically.
libs/flowbite-angular/src/lib/components/dropdown/*.component.html Replaced static classes with dynamic bindings.
libs/flowbite-angular/src/lib/components/dropdown/*.component.ts Extended BaseComponent, added properties for dynamic styling.
libs/flowbite-angular/src/lib/components/form-field/directives/*.theme.ts Introduced new theme files for various form field directives.
libs/flowbite-angular/src/lib/components/modal/*.component.html Updated to use dynamic class bindings instead of static classes.
libs/flowbite-angular/src/lib/components/modal/*.component.ts Enhanced modal components to extend BaseComponent and manage styles dynamically.
libs/flowbite-angular/src/lib/components/modal/*.theme.ts Introduced new theme files for modal components.
libs/flowbite-angular/src/lib/components/indicators/*.component.html Simplified class bindings for indicators.
libs/flowbite-angular/src/lib/components/indicators/*.component.ts Updated to extend BaseComponent and manage properties dynamically.

Possibly related PRs

  • fix(modal): close on route change #33 #56: The changes in the main PR involve modifications to the HTML structure of components, including the removal of property bindings in favor of direct attribute assignments. This is relevant to the changes in the ModalComponent and ModalThemeService, which also focus on enhancing the modal's structure and styling through dynamic class bindings and improved lifecycle management.

Poem

🐰 In the land of code where changes bloom,
Attributes shift, dispelling the gloom.
With classes that dance, so lively and bright,
Our components now sparkle, a beautiful sight!
From buttons to modals, all styled with flair,
A rabbit's delight, in this code we share! 🐇

Warning

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

🔧 eslint

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

apps/docs/src/app/pages/alert-page/alert-page.component.ts

Oops! Something went wrong! :(

ESLint: 8.56.0

TypeError: Error while loading rule '@nx/enforce-module-boundaries': Cannot read properties of undefined (reading 'keyword')
Occurred while linting /apps/docs/src/app/pages/alert-page/alert-page.component.ts
at ensureGlobalProjectGraph (/node_modules/@nx/eslint-plugin/src/utils/project-graph-utils.js:35:51)
at readProjectGraph (/node_modules/@nx/eslint-plugin/src/utils/project-graph-utils.js:46:5)
at create (/node_modules/@nx/eslint-plugin/src/rules/enforce-module-boundaries.js:134:137)
at Object.create (/node_modules/@nx/eslint-plugin/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js:38:20)
at createRuleListeners (/node_modules/eslint/lib/linter/linter.js:895:21)
at /node_modules/eslint/lib/linter/linter.js:1066:110
at Array.forEach ()
at runRules (/node_modules/eslint/lib/linter/linter.js:1003:34)
at Linter._verifyWithoutProcessors (/node_modules/eslint/lib/linter/linter.js:1355:31)
at /node_modules/eslint/lib/linter/linter.js:1913:29


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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

@MGREMY
Copy link
Collaborator Author

MGREMY commented Nov 11, 2024

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

MGREMY added a commit that referenced this pull request Jul 15, 2025
* refactor(component/badge): refactor styling code

* feat(component/badge): add customizable theme

* refactor(theme): move theme to comon theme file

* refactor(component/indicator): refactor styling code

* refactor(component/indicator): use conditional classes from twMerge

* refactor(component/navbar): refactor styling code

* refactor(component/alert): refactor styling code

* refactor(component/alert): remove flowbite data attribute

* refactor(component/button): refactor styling code

* refactor(component/accordion): refactor styling code

* refactor(component/breadcrumb): refactor styling code

* refactor(component/dropdown): refactor styling code

* refactor(component/sidebar): refactor styling code

* refactor(component/dropdown): refactor styling code

* refactor(component/modal): refactor styling code

* refactor(component/forms): refactor styling code

* refactor(component): update theme name file

* refactor(component): update theme return type

* feat(component): add dynamic update style

* docs(component): add comment to components and Input

* feat(component): flowbiteBoolean to boolean

* feat(component): add customizable properties value

* refactor(doc): remove [] in template

---------

Co-authored-by: GREMY Miguel <miguel.gremy@sully-group.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add custom value for theme Refacto components to fit with global styling file

3 participants