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(input): add ionic theme styles and size property #29380

Open
wants to merge 39 commits into
base: next
Choose a base branch
from

Commits on Apr 1, 2024

  1. feat(input): add ionic theme (#29247)

    Issue number: internal
    
    ---------
    
    ## What is the new behavior?
    Adds the initial files for the Ionic input.
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    brandyscarney committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    4fc3bbb View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. feat(input): add the large size for the ionic theme (#29249)

    Issue number: internal
    
    ---------
    
    ## What is the current behavior?
    Input does not have a size property.
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    - Adds the `size` property with support for the `"large"` size on the
    `"ionic"` theme only
    - Adds tests for the size property
    - Note: the screenshots will not look right until the fill styles are
    added
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    brandyscarney committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    e965443 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. Configuration menu
    Copy the full SHA
    3a1e70d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5b62a1e View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2024

  1. chore(): sync with next branch (#29299)

    Issue number: resolves #
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the current behavior?
    <!-- Please describe the current behavior that you are modifying. -->
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    -
    -
    -
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [ ] No
    
    <!--
      If this introduces a breaking change:
    1. Describe the impact and migration path for existing applications
    below.
      2. Update the BREAKING.md file with the breaking change.
    3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
    See
    https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
    for more information.
    -->
    
    
    ## Other information
    
    <!-- Any other information that is important to this PR such as
    screenshots of how the component looks before and after the change. -->
    
    ---------
    
    Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
    Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
    Co-authored-by: Marcelino <brunoapmarcelino@gmail.com>
    Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Brandy Carney <brandy@ionic.io>
    Co-authored-by: Bernardo Cardoso <32780808+BenOsodrac@users.noreply.github.com>
    8 people committed Apr 8, 2024
    Configuration menu
    Copy the full SHA
    ca59d6c View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. feat(input): add outline appearance for stacked label to ionic theme (#…

    …29268)
    
    Issue number: Internal
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    All changes are specific to the `ionic` theme.
    - Styles added for `fill="outline"` plus `labelPlacement="stacked"`.
    - Markup rearranged slightly to ensure label sits above outline while
    still being clickable to focus the input. See code comments for details.
    - The default `labelPlacement` is now `"stacked"`.
    - Values for `labelPlacement` besides `"stacked"` and `"floating"`
    cannot be used.
    
    Note that per the ticket, I did not account for any other scope,
    including styles for helper text, `labelPlacement="floating"`,
    `shape="round"`, etc. This means that some states will look broken for
    now, and will be addressed in future tickets.
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    <!--
      If this introduces a breaking change:
    1. Describe the impact and migration path for existing applications
    below.
      2. Update the BREAKING.md file with the breaking change.
    3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
    See
    https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
    for more information.
    -->
    
    
    ## Other information
    
    <!-- Any other information that is important to this PR such as
    screenshots of how the component looks before and after the change. -->
    
    ---------
    
    Co-authored-by: ionitron <hi@ionicframework.com>
    Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
    3 people committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    bb516f0 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2024

  1. Configuration menu
    Copy the full SHA
    c6b7dfe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3d7b669 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. fix(input) match invalid state to ionic design (#29291)

    Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
    thetaPC and sean-perkins committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    96e5b2b View commit details
    Browse the repository at this point in the history
  2. feat(input): add hover state to the ionic theme (#29313)

    Issue number: internal
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the current behavior?
    The ionic input does not have a hover state.
    
    ## What is the new behavior?
    Adds a hover state. 
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    ## Other information
    We do not currently have a way to test hover states. See
    microsoft/playwright#12077 for more
    information.
    
    ---------
    
    Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
    brandyscarney and sean-perkins committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    c30d685 View commit details
    Browse the repository at this point in the history
  3. fix(input): match valid state to ionic design (#29277)

    Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
    Co-authored-by: ionitron <hi@ionicframework.com>
    3 people committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    67ec745 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. test(input): change size tests to use stacked label placements (#29334)

    Issue number: N/A
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the current behavior?
    <!-- Please describe the current behavior that you are modifying. -->
    
    Some of the size screenshot tests use `label-placement="floating"`.
    Because this label placement isn't scope we've gotten to yet, the
    screenshots look broken. This is okay in itself, but it causes confusion
    when the screenshots are updated for other unrelated features since
    reviewers don't expect the appearance to be off.
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    Tests changed to use `label-placement="stacked"`, which is functionally
    the same as `floating` when the input has a value, but has the proper
    styling.
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    <!--
      If this introduces a breaking change:
    1. Describe the impact and migration path for existing applications
    below.
      2. Update the BREAKING.md file with the breaking change.
    3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
    See
    https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
    for more information.
    -->
    
    
    ## Other information
    
    <!-- Any other information that is important to this PR such as
    screenshots of how the component looks before and after the change. -->
    
    ---------
    
    Co-authored-by: ionitron <hi@ionicframework.com>
    amandaejohnston and Ionitron committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    6e45fef View commit details
    Browse the repository at this point in the history
  2. fix(input): add disabled state to the ionic theme (#29323)

    Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
    thetaPC and brandyscarney committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    3b0f3af View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. feat(input): add styles for round shape to ionic theme (#29329)

    Issue number: Internal
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    Added styles for `shape="round"`, including:
    - Increased border radius
    - Increased padding when additionally using outline fill and large size
    - Horizontal padding also applied to label when using outline fill
    
    I also changed the `$ionic-border-radius-rounded-full` design token from
    100% to 999px. `border-radius: 100%` is pretty obviously incorrect for
    most browsers (screenshot taken in Chrome):
    
    ![image](https://github.com/ionic-team/ionic-framework/assets/90629384/5dc47a65-0446-4e39-9ce3-1c749b6329e7)
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    <!--
      If this introduces a breaking change:
    1. Describe the impact and migration path for existing applications
    below.
      2. Update the BREAKING.md file with the breaking change.
    3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
    See
    https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
    for more information.
    -->
    
    
    ## Other information
    
    <!-- Any other information that is important to this PR such as
    screenshots of how the component looks before and after the change. -->
    
    ---------
    
    Co-authored-by: ionitron <hi@ionicframework.com>
    amandaejohnston and Ionitron committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    cb71258 View commit details
    Browse the repository at this point in the history
  2. feat(input): add styles for clear action to ionic theme (#29337)

    Issue number: Internal
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    For the `ionic` theme: Adjusted the size of the clear button to match
    design specs, and updated the behavior so the button additionally only
    shows if the native input *or* any other actions within the `ion-input`
    are focused. (See code comments for details.)
    
    The actual icon used has not been modified. The ticket says to "use the
    material design clear icon as the reference icon for this feature," and
    we've already added a feature allowing the icon to be customized at the
    app level. Let me know if the intention was to use a different default
    icon with the `ionic` theme.
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    <!--
      If this introduces a breaking change:
    1. Describe the impact and migration path for existing applications
    below.
      2. Update the BREAKING.md file with the breaking change.
    3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
    See
    https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
    for more information.
    -->
    
    
    ## Other information
    
    <!-- Any other information that is important to this PR such as
    screenshots of how the component looks before and after the change. -->
    
    ---------
    
    Co-authored-by: ionitron <hi@ionicframework.com>
    amandaejohnston and Ionitron committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    ac102cf View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. fix(input): add focused state for ionic theme (#29342)

    Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
    thetaPC and amandaejohnston committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    930f275 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. Configuration menu
    Copy the full SHA
    d7eb539 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c6127e9 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. Configuration menu
    Copy the full SHA
    c855add View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2024

  1. feat(input): add item highlight for ionic theme (#29395)

    Issue number: N/A
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the current behavior?
    <!-- Please describe the current behavior that you are modifying. -->
    
    The current border implementation causes layout shift. 
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    - Matches MD highlight effect for the focus border
    - Border implementation does not cause layout shift
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    <!--
      If this introduces a breaking change:
    1. Describe the impact and migration path for existing applications
    below.
      2. Update the BREAKING.md file with the breaking change.
    3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
    See
    https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
    for more information.
    -->
    
    
    ## Other information
    
    <!-- Any other information that is important to this PR such as
    screenshots of how the component looks before and after the change. -->
    sean-perkins committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    e0dfb61 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    4a4d447 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Configuration menu
    Copy the full SHA
    09a0e6e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5c7a782 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2eb1dbd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e792e6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fd14ddf View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. fix(input): implement default shape for ionic theme (#29469)

    Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
    thetaPC and brandyscarney committed May 8, 2024
    Configuration menu
    Copy the full SHA
    7333376 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Configuration menu
    Copy the full SHA
    e17db2c View commit details
    Browse the repository at this point in the history
  2. feat(input): add rectangular shape for the ionic theme (#29476)

    Issue number: internal
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the current behavior?
    The input supports an undefined and a `round` shape.
    
    ## What is the new behavior?
    Adds support for the `rectangular` shape for the `ionic` theme &
    screenshot tests for this shape with the outline fill.
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    brandyscarney committed May 9, 2024
    Configuration menu
    Copy the full SHA
    75333c0 View commit details
    Browse the repository at this point in the history
  3. feat(input): add soft shape for ionic theme (#29477)

    Issue number: internal
    
    ---------
    
    <!-- Please do not submit updates to dependencies unless it fixes an
    issue. -->
    
    <!-- Please try to limit your pull request to one type (bugfix, feature,
    etc). Submit multiple pull requests if needed. -->
    
    ## What is the current behavior?
    <!-- Please describe the current behavior that you are modifying. -->
    
    The input component does not support the `soft` shape.
    
    ## What is the new behavior?
    <!-- Please describe the behavior or changes that are being added by
    this PR. -->
    
    - `soft` has been added to shape, but will only work for the `ionic`
    theme.
    - Added tests
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    <!--
      If this introduces a breaking change:
    1. Describe the impact and migration path for existing applications
    below.
      2. Update the BREAKING.md file with the breaking change.
    3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
    See
    https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
    for more information.
    -->
    
    
    ## Other information
    
    <!-- Any other information that is important to this PR such as
    screenshots of how the component looks before and after the change. -->
    
    
    [Preview](https://ionic-framework-git-fw-6096-ionic1.vercel.app/src/components/input/test/shape?ionic:theme=ionic)
    thetaPC committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c1bba3b View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. fix(input): only apply the shape to the outline fill in ionic theme (#…

    …29482)
    
    Issue number: internal
    
    ---------
    
    ## What is the current behavior?
    The shape styles are being applied when the `fill` is unset in the
    `ionic` theme. This is incorrect per the input UX requirements as shape
    should only apply when `fill` is set to `"outline"`. This is made
    apparent when looking at the existing styles for `disabled`.
    
    ## What is the new behavior?
    - Only apply the shape styles to the `"outline"` fill
    - Move the use of the `--background` css variable to the native wrapper
    since this is what we use to style both the disabled and readonly states
    
    | Before | After |
    | ---| ---|
    |
    ![before](https://github.com/ionic-team/ionic-framework/assets/6577830/44b6e7e4-70f4-49d5-844f-a015b7284ed5)
    |
    ![after](https://github.com/ionic-team/ionic-framework/assets/6577830/06ac9431-17f4-4741-8ceb-19b40d8ba7d9)
    |
    
    I am not sure why this wasn't caught with the shape additions, but it's
    probably because the minimum pixel ratio was not met.
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    brandyscarney committed May 10, 2024
    Configuration menu
    Copy the full SHA
    8515c4e View commit details
    Browse the repository at this point in the history
  2. feat(input): add the readonly styles for the ionic theme (#29483)

    Issue number: internal
    
    ---------
    
    ## What is the current behavior?
    There are no custom styles when readonly is added to an input.
    
    ## What is the new behavior?
    - Applies an `input-readonly` class when the `readonly` property is
    `true`
    - Styles the class in the `ionic` theme to match the design requirements
    for readonly inputs
    - Adds screenshot tests for the readonly style for an unset `fill` and
    `"outline"` fill
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    brandyscarney committed May 10, 2024
    Configuration menu
    Copy the full SHA
    09935fd View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. chore(): add updated snapshots (#29492)

    Co-authored-by: ionitron <hi@ionicframework.com>
    brandyscarney and Ionitron committed May 13, 2024
    Configuration menu
    Copy the full SHA
    ef7a454 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    24c0bc3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7a7a688 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. Configuration menu
    Copy the full SHA
    310bde6 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Configuration menu
    Copy the full SHA
    916d8a4 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. feat(input): add styles for counter text on ionic theme (#29516)

    Issue number: internal
    
    ---------
    
    ## What is the current behavior?
    The counter text for the ionic theme does not have added styles.
    
    ## What is the new behavior?
    - Updates the `color` of the counter text to match the design
    - Updates the screenshots that were changed with this update
    
    ## Does this introduce a breaking change?
    - [ ] Yes
    - [x] No
    brandyscarney committed May 17, 2024
    Configuration menu
    Copy the full SHA
    bf8dfdb View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. fix(input): adjust colors, padding, fonts & heights for ionic theme (#…

    …29520)
    
    Issue number: internal
    
    ---------
    
    ## What is the current behavior?
    Input styles were slightly different from the ionic theme design. 
    
    ## What is the new behavior?
    Updates the following:
    - The font size for input (14px) and labels (12px)
    - The font weight, line-height and color for the label
    - The padding for the label & helper message
    - Removes the label transform in order to set `font-size` directly
    - Updates the Sass variables to be referenced from `tokens` where they
    were not
    
    ## Does this introduce a breaking change?
    
    - [ ] Yes
    - [x] No
    
    ## Other information
    
    The underline (undefined) fill looks off from the design but issue
    ROU-5151 exists for implementing it so I assume it will be fixed there.
    
    - [Shapes
    preview](https://ionic-framework-git-fix-input-placeholder-ionic1.vercel.app/src/components/input/test/shape?ionic:theme=ionic)
    - [Fills
    preview](https://ionic-framework-git-fix-input-placeholder-ionic1.vercel.app/src/components/input/test/fill?ionic:theme=ionic)
    
    ## Image Comparison
    
    | Before | After | UX Design |
    | ---| ---| ---|
    |
    ![ionic-before](https://github.com/ionic-team/ionic-framework/assets/6577830/14158641-1118-498a-b970-c277ad505583)
    |
    ![ionic-after](https://github.com/ionic-team/ionic-framework/assets/6577830/fbd1d167-ac3c-4fa7-817d-c5a4ac8b8d3c)
    | ![UX
    design](https://github.com/ionic-team/ionic-framework/assets/6577830/a3d06503-ce9e-4b15-a1ad-6d11615ec673)
    |
    
    > [!NOTE]
    > The design is not going to match perfectly because we are not using
    the Inter font in our tests.
    brandyscarney committed May 22, 2024
    Configuration menu
    Copy the full SHA
    7a4843b View commit details
    Browse the repository at this point in the history