Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(docs): add the Switch page #93

Merged
merged 5 commits into from
Oct 30, 2024
Merged

feat(docs): add the Switch page #93

merged 5 commits into from
Oct 30, 2024

Conversation

desmondinho
Copy link
Contributor

@desmondinho desmondinho commented Oct 30, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a documentation page for the LumexSwitch component, detailing its usage, states, sizes, colors, icons, and two-way data binding.
    • Added multiple examples for the LumexSwitch, showcasing various configurations including size, color, disabled, read-only, and custom thumb icons.
  • Improvements

    • Enhanced the visual representation of the LumexSwitch component with updated styles and icon handling.
    • Improved transition durations for better user experience.
  • Bug Fixes

    • Streamlined parameter handling in the LumexAccordionItem and LumexSwitch components to ensure proper state management.

@desmondinho desmondinho self-assigned this Oct 30, 2024
Copy link

coderabbitai bot commented Oct 30, 2024

Walkthrough

The changes in this pull request primarily focus on the Lumex UI framework, particularly enhancing the functionality and examples for the LumexSwitch component. Key modifications include the removal of the locked parameter for the LumexSwitch in the ComponentsCategory, updates to various examples showcasing the switch's features, and the introduction of new preview components. Additionally, a new delegate IndicatorResolver has been added to improve state management for the switch's icon. Other adjustments include refinements in CSS class handling and transition durations across several components.

Changes

File Path Change Summary
docs/LumexUI.Docs.Client/Common/Navigation/NavigationStore.cs Removed locked parameter for LumexSwitch in ComponentsCategory.
docs/LumexUI.Docs.Client/Pages/Components/Checkbox/Examples/CustomStyles.razor Modified font weight and border color in LumexCheckbox.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Colors.razor Added multiple LumexSwitch instances with different colors.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/CustomStyles.razor Introduced a new LumexSwitch example with custom styles.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/CustomThumbIcon.razor Added example demonstrating dynamic thumb icon changes.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Disabled.razor Introduced disabled LumexSwitch instances.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/ReadOnly.razor Added read-only LumexSwitch instances.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Sizes.razor Introduced LumexSwitch instances with small, medium, and large sizes.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/TwoWayDataBinding.razor Added two-way data binding example for LumexSwitch.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Usage.razor Added LumexSwitch instance labeled "Auto Updates".
docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/_Icons.razor Introduced LumexSwitch with icon properties for dark mode.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Colors.razor Added preview for color examples related to LumexSwitch.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/CustomStyles.razor Added preview for custom styles related to LumexSwitch.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/CustomThumbIcon.razor Added preview for custom thumb icon functionality.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Disabled.razor Added preview for disabled switch functionality.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Icons.razor Added preview for icons in the switch component.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/ReadOnly.razor Added preview for read-only switch functionality.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Sizes.razor Added preview for size variations of the switch.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/TwoWayDataBinding.razor Added preview for two-way data binding functionality.
docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Usage.razor Added preview for usage example of the switch.
docs/LumexUI.Docs.Client/Pages/Components/Switch/Switch.razor Introduced documentation for the LumexSwitch component, covering usage, states, sizes, and colors.
src/LumexUI/Common/IndicatorResolver.cs Added new delegate IndicatorResolver for resolving indicator icons based on state.
src/LumexUI/Components/Accordion/LumexAccordionItem.razor.cs Removed IndicatorResolver delegate; updated parameter validation logic.
src/LumexUI/Components/Checkbox/LumexCheckbox.razor Adjusted transition duration in RenderCheckIcon method.
src/LumexUI/Components/Switch/LumexSwitch.razor Modified properties for dynamic HTML attributes and icon handling.
src/LumexUI/Components/Switch/LumexSwitch.razor.cs Updated ThumbIcon property to use IndicatorResolver type.
src/LumexUI/Components/Switch/SwitchSlots.cs Redefined Label property without changing its type.
src/LumexUI/Scripts/Plugin/transitions.js Updated DEFAULT_TRANSITION_DURATION from 200ms to 250ms.
src/LumexUI/Styles/Switch.cs Modified CSS class generation logic for switch states.
tests/LumexUI.Tests/Components/Switch/SwitchTests.cs Updated ThumbIcon assignment method in tests for flexibility.

Poem

In the garden of code, where switches play,
A rabbit hops by, brightening the day.
With colors and styles, they dance in delight,
Custom icons and bindings, all shining so bright.
Hooray for the changes, so clever and spry,
In the world of Lumex, our spirits soar high! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9a44ec1 and a488488.

📒 Files selected for processing (30)
  • docs/LumexUI.Docs.Client/Common/Navigation/NavigationStore.cs (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Checkbox/Examples/CustomStyles.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Colors.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/CustomStyles.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/CustomThumbIcon.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Disabled.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/ReadOnly.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Sizes.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/TwoWayDataBinding.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/Usage.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Examples/_Icons.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Colors.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/CustomStyles.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/CustomThumbIcon.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Disabled.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Icons.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/ReadOnly.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Sizes.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/TwoWayDataBinding.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/PreviewCodes/Usage.razor (1 hunks)
  • docs/LumexUI.Docs.Client/Pages/Components/Switch/Switch.razor (1 hunks)
  • src/LumexUI/Common/IndicatorResolver.cs (1 hunks)
  • src/LumexUI/Components/Accordion/LumexAccordionItem.razor.cs (0 hunks)
  • src/LumexUI/Components/Checkbox/LumexCheckbox.razor (1 hunks)
  • src/LumexUI/Components/Switch/LumexSwitch.razor (2 hunks)
  • src/LumexUI/Components/Switch/LumexSwitch.razor.cs (1 hunks)
  • src/LumexUI/Components/Switch/SwitchSlots.cs (1 hunks)
  • src/LumexUI/Scripts/Plugin/transitions.js (1 hunks)
  • src/LumexUI/Styles/Switch.cs (3 hunks)
  • tests/LumexUI.Tests/Components/Switch/SwitchTests.cs (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

@desmondinho desmondinho merged commit fe1fb1a into main Oct 30, 2024
4 checks passed
@desmondinho desmondinho deleted the docs/switch branch October 30, 2024 20:35
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