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: add checkbox into components #27 #32

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

sun-mota
Copy link
Contributor

@sun-mota sun-mota commented Nov 7, 2024

Alaska Airlines Pull Request

#27

  • add checkbox 4.1.0 to auro-formkit
  • update rollup.config to add demo's config to bundler (each component should have index.js and api.js under /demo)

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I have performed a self-review of my own update.

Summary by Sourcery

Add a new checkbox component to the auro-formkit, update build scripts to support it, and provide detailed documentation and examples.

New Features:

  • Introduce a new checkbox component to the auro-formkit, allowing users to select one or more options from a limited set of choices.

Enhancements:

  • Update the build scripts to include the new checkbox component, ensuring it is built, tested, and included in demos.

Documentation:

  • Add comprehensive documentation for the new checkbox component, including usage examples, API details, and styling guidelines.

@sun-mota sun-mota requested a review from a team as a code owner November 7, 2024 04:05
@sun-mota sun-mota self-assigned this Nov 7, 2024
Copy link

sourcery-ai bot commented Nov 7, 2024

Reviewer's Guide by Sourcery

This PR adds a new checkbox component (v4.1.0) to the auro-formkit library. The implementation includes the main checkbox component, checkbox group functionality, and necessary build configurations. The changes primarily focus on adding new component files and updating build scripts to support the checkbox component.

Class diagram for the new checkbox component

Loading
classDiagram
    class AuroCheckbox {
        - Boolean checked
        - Boolean disabled
        - Boolean error
        - String id
        - String name
        - String value
        + handleChange(event)
        + handleInput(event)
        + handleFocusin()
        + generateIconHtml()
    }
    class AuroCheckboxGroup {
        - String validity
        - Array value
        - Boolean disabled
        - Boolean required
        - Boolean horizontal
        - AuroFormValidation validation
        - AuroLibraryRuntimeUtils runtimeUtils
        + handleValueUpdate(value, selected)
        + handlePreselectedItems()
        + handleItems()
    }
    AuroCheckboxGroup --> AuroCheckbox : contains
    note for AuroCheckbox "Custom element for selecting options"
    note for AuroCheckboxGroup "Wrapper for AuroCheckbox elements"

File-Level Changes

Change Details Files
Added new checkbox component with group functionality
  • Created auro-checkbox component with basic checkbox functionality
  • Added auro-checkbox-group component for managing multiple checkboxes
  • Implemented support for disabled, error, and required states
  • Added horizontal layout option for checkbox groups
  • Implemented form validation support
components/checkbox/src/auro-checkbox.js
components/checkbox/src/auro-checkbox-group.js
components/checkbox/src/auro-checkbox.scss
components/checkbox/src/auro-checkbox-group.scss
Updated build configuration to support checkbox component
  • Added checkbox-specific build scripts and commands
  • Updated rollup configuration to handle demo bundling
  • Added new npm scripts for building and testing checkbox component
package.json
rollup.config.mjs
Added styling and theming support for checkbox component
  • Created base styles for checkbox appearance and interactions
  • Added support for design tokens and theme customization
  • Implemented error and disabled state styles
components/checkbox/src/color.scss
components/checkbox/src/colorGroup.scss
components/checkbox/src/tokens.scss

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sun-mota sun-mota linked an issue Nov 7, 2024 that may be closed by this pull request
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sun-mota - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟡 Complexity: 2 issues found
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@sun-mota sun-mota force-pushed the sunMota/add-checkbox branch from 7fb0f7d to 4f23209 Compare November 7, 2024 17:24
jason-capsule42

This comment was marked as off-topic.

@jason-capsule42 jason-capsule42 self-requested a review November 7, 2024 22:21
@sun-mota sun-mota changed the base branch from main to sunMota/componentIntegration November 8, 2024 20:51
@jason-capsule42 jason-capsule42 requested review from jason-capsule42 and removed request for jason-capsule42 November 13, 2024 00:20
@sun-mota sun-mota merged commit a07ed07 into sunMota/componentIntegration Nov 14, 2024
1 check passed
@sun-mota sun-mota deleted the sunMota/add-checkbox branch November 14, 2024 18:36
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.

add Checkbox
3 participants