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

Address input bugs #122

Merged
merged 18 commits into from
Dec 31, 2024
Merged

Address input bugs #122

merged 18 commits into from
Dec 31, 2024

Conversation

jordanjones243
Copy link
Contributor

@jordanjones243 jordanjones243 commented Dec 16, 2024

Alaska Airlines Pull Request

Before Submitting this pull request:

  • Link all tickets in this repository related to this PR in the Development section
    note: all pull requests require at least one linked ticket
  • If this PR is Ready For Review, all ticket's linked under Development must have their status changed to Ready For Review as well

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 reset() method to all form components to clear the value and validity state.

New Features:

  • Add reset() methods to auro-checkbox, auro-checkbox-group, auro-combobox, auro-datepicker, auro-input, auro-radio, auro-radio-group, and auro-select components. These methods reset the components to their initial states, clearing any user input and validation errors.

Tests:

  • Add tests for the new reset() methods.

@jordanjones243 jordanjones243 self-assigned this Dec 16, 2024
@jordanjones243 jordanjones243 changed the base branch from main to beta December 16, 2024 21:46
Copy link

sourcery-ai bot commented Dec 16, 2024

Reviewer's Guide by Sourcery

This PR addresses input bugs by changing the input type from "numeric" to "number" in the code and documentation. It also introduces a new "reset()" method to reset the component's value and validity state.

Class diagram showing updated input components with reset functionality

classDiagram
    class BaseInput {
        -Boolean icon
        -Boolean disabled
        -Boolean required
        -String type
        -String value
        -String validity
        +reset() void
        +validate() void
    }
    class AuroFormValidation {
        +reset(elem) void
        +validate(elem) void
    }
    class AuroCheckbox {
        -Boolean checked
        -Boolean error
        +reset() void
    }
    class AuroRadioGroup {
        -Number index
        -String value
        +reset() void
    }
    class AuroSelect {
        +reset() void
    }
    class AuroCombobox {
        -String auroInputHelpText
        +reset() void
        +focus() void
    }
    BaseInput ..> AuroFormValidation : uses
    note for BaseInput "Changed inputMode from 'numeric' to 'number'"
    note for AuroFormValidation "Added reset() method"
Loading

File-Level Changes

Change Details Files
Change input type to "number"
  • Changed input type from "numeric" to "number" in the base input component.
  • Updated documentation to reflect the change from "numeric" to "number".
  • Added tests to verify the "number" input type functionality.
components/input/src/base-input.js
components/input/docs/partials/api.md
components/input/test/auro-input.test.js
Introduce a "reset()" method
  • Added a "reset()" method to reset the component's value and validity.
  • Updated documentation to include the new "reset()" method.
  • Added tests to verify the functionality of the "reset()" method.
  • Implemented the "reset()" method in the checkbox, select, datepicker, combobox, and radio components.
components/input/src/base-input.js
components/input/docs/partials/api.md
components/input/test/auro-input.test.js
components/checkbox/test/auro-checkbox.test.js
components/checkbox/src/auro-checkbox-group.js
components/checkbox/docs/partials/api.md
components/checkbox/docs/api.md
components/checkbox/src/auro-checkbox.js
components/select/docs/partials/api.md
components/select/src/auro-select.js
components/select/test/auro-select.test.js
components/datepicker/docs/partials/api.md
components/datepicker/src/auro-datepicker.js
components/datepicker/test/auro-datepicker.test.js
components/combobox/docs/partials/api.md
components/combobox/src/auro-combobox.js
components/combobox/test/auro-combobox.test.js
components/radio/docs/partials/api.md
components/radio/src/auro-radio-group.js
components/radio/src/auro-radio.js
components/radio/test/auro-radio.test.js
packages/form-validation/src/validation.js

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

Copy link
Contributor

@sun-mota sun-mota left a comment

Choose a reason for hiding this comment

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

also, the disabled state colors are off from https://www.figma.com/design/VpUz89Ov6ImBpY5YvzYbZW/Auro-toolkit?node-id=3264-27509&m=dev (not sure if this is the latest design)

packages/form-validation/src/validation.js Outdated Show resolved Hide resolved
@jordanjones243
Copy link
Contributor Author

jordanjones243 commented Dec 18, 2024

also, the disabled state colors are off from https://www.figma.com/design/VpUz89Ov6ImBpY5YvzYbZW/Auro-toolkit?node-id=3264-27509&m=dev (not sure if this is the latest design)

Per this design spec, the disabled colors are correct:
https://www.figma.com/design/tSkHw1uJfDHy0Ml0aDp7Io/branch/SWOHKZpz2K78PPL43uvp5z/Auro-color-palette-(Variables)?node-id=4224-10615&m=dev

The design spec linked in the previous comment is outdated.

packages/form-validation/src/validation.js Outdated Show resolved Hide resolved
packages/form-validation/src/validation.js Outdated Show resolved Hide resolved
@jordanjones243 jordanjones243 force-pushed the jjones/fixInputBugs branch 4 times, most recently from ab0c7a0 to 8845302 Compare December 18, 2024 22:47
chrisfalaska
chrisfalaska previously approved these changes Dec 18, 2024
Copy link
Contributor

@chrisfalaska chrisfalaska left a comment

Choose a reason for hiding this comment

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

🚀

@jordanjones243 jordanjones243 force-pushed the jjones/fixInputBugs branch 5 times, most recently from cef190d to 516a7ba Compare December 23, 2024 21:49
@jordanjones243 jordanjones243 marked this pull request as draft December 23, 2024 21:49
@jordanjones243 jordanjones243 force-pushed the jjones/fixInputBugs branch 3 times, most recently from c8cd386 to 5aef36e Compare December 24, 2024 01:18
components/input/docs/partials/api.md Outdated Show resolved Hide resolved
components/input/apiExamples/minLength.html Outdated Show resolved Hide resolved
components/input/docs/partials/api.md Outdated Show resolved Hide resolved
components/input/docs/partials/api.md Outdated Show resolved Hide resolved
components/checkbox/test/auro-checkbox.test.js Outdated Show resolved Hide resolved
@jordanjones243 jordanjones243 merged commit 3c48343 into beta Dec 31, 2024
4 checks passed
@jordanjones243 jordanjones243 deleted the jjones/fixInputBugs branch December 31, 2024 21:22
@jason-capsule42
Copy link
Member

🎉 This PR is included in version 1.6.0-beta.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants