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

fix(core/form-controls): Input, Select, Textarea readonly states #485

Merged
merged 5 commits into from
Apr 14, 2023

Conversation

goncalosard
Copy link
Contributor

@goncalosard goncalosard commented Apr 10, 2023

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (yarn build) was run locally and any changes were pushed
  • Unit tests (yarn test) were run locally and passed
  • Visual Regression Tests (yarn visual-regression) were run locally and passed
  • Linting (npm lint) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bug fix
  • Feature
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue [IX-143]

What is the new behavior?

  • Placeholder are hidden when readonly is active
  • Changed cursor style to default when readonly is active

All other topics mentioned on the issue, look already correct.

Code tested

    <form class="needs-validation m-2">
      <input
        class="form-control"
        defaultValue=""
        placeholder="Enter text here"
        type="text"
        readonly
      />
    </form>

    <ix-select readonly selected-indices="1">
      <ix-select-item label="Item 1" value="1"></ix-select-item>
      <ix-select-item label="Item 2" value="2"></ix-select-item>
      <ix-select-item label="Item 3" value="3"></ix-select-item>
      <ix-select-item label="Item 4" value="4"></ix-select-item>
    </ix-select>

    <textarea
      class="form-control"
      placeholder="Enter text here"
      readonly
    ></textarea>

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

Copy link
Collaborator

@danielleroux danielleroux left a comment

Choose a reason for hiding this comment

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

Overall we should a testcases (visual regression) to test all readonly states

packages/core/src/components/select/select.tsx Outdated Show resolved Hide resolved
@danielleroux danielleroux added this to the 1.5.0 milestone Apr 12, 2023
@danielleroux danielleroux added the pull request affects patch version The pull request affects only patch version label Apr 12, 2023
Copy link
Collaborator

@nuke-ellington nuke-ellington left a comment

Choose a reason for hiding this comment

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

lgtm

@danielleroux danielleroux merged commit 696366d into main Apr 14, 2023
@danielleroux danielleroux deleted the fix/form-controls-readonly branch April 14, 2023 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request affects patch version The pull request affects only patch version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants