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(input-date-picker): update the focus and hover chevron icon color #9146

Merged
merged 8 commits into from
Apr 23, 2024

Conversation

aPreciado88
Copy link
Contributor

@aPreciado88 aPreciado88 commented Apr 17, 2024

Related Issue: 7712

Summary

This updates input-date-picker chevron colors to be --calcite-color-text-3 when idle and --calcite-color-text-1 when hovered or pressed.

@aPreciado88 aPreciado88 requested a review from a team as a code owner April 17, 2024 23:09
@aPreciado88 aPreciado88 changed the title fix(input-date-picker) updated chevron icons colors to be ui-text-3 w… fix:(input-date-picker) updated chevron icons colors to be ui-text-3 w… Apr 17, 2024
@aPreciado88 aPreciado88 changed the title fix:(input-date-picker) updated chevron icons colors to be ui-text-3 w… fix: (input-date-picker) updated chevron icon colors Apr 17, 2024
@aPreciado88 aPreciado88 changed the title fix: (input-date-picker) updated chevron icon colors fix: input-date-picker, updated chevron icon colors Apr 17, 2024
@aPreciado88 aPreciado88 changed the title fix: input-date-picker, updated chevron icon colors fix: input date picker, updated chevron icon colors Apr 17, 2024
@aPreciado88 aPreciado88 changed the title fix: input date picker, updated chevron icon colors fix(input-date-picker): updated chevron icon colors to be ui-text-3 when idle and ui-text-1 when hovered or pressed. Apr 17, 2024
…hen idle and ui-text-1 when hovered or pressed.
@aPreciado88 aPreciado88 force-pushed the aPreciado88/7712-update-date-picker-chevron-colors branch from 5400a86 to 873e528 Compare April 17, 2024 23:30
@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Apr 17, 2024
Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

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

First PR lets go! 🎉

The PR title is a bit too long and it shouldn't end with any punctuation. Also, we want to keep implementation details out of the PR title. Maybe change it to something like:

fix(input-date-picker): consistent chevron icon color

The implementation details (like the design tokens used) can go in the PR body. And the tokens should be --calcite-color-text-N like you have in the code, rather than the legacy --calcite-ui-text-N tokens that are currently in the PR title/body.

Once you are done making changes, add the pr ready for visual snapshots label to run Chromatic.

@@ -681,6 +681,7 @@ export class InputDatePicker
// we set tab index to -1 to prevent delegatesFocus from stealing focus before we can set it
<span class={CSS.toggleIcon} tabIndex={-1}>
<calcite-icon
class={open ? "chevron-icon-up" : "chevron-icon-down"}
Copy link
Member

@benelan benelan Apr 17, 2024

Choose a reason for hiding this comment

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

Can you add these classes to the CSS object in resources.ts. See two lines above for a usage example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I consolidated this css into a single class and added it to resources.ts.

Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

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

I took a closer look at the issue, and it doesn't say anything about the open property effecting the chevron color. For example, the current implementation wouldn't work for the Figma design's last example:

image

Can you take another look? The :focus and/or :active pseudo-classes may do what we want.

@aPreciado88 aPreciado88 changed the title fix(input-date-picker): updated chevron icon colors to be ui-text-3 when idle and ui-text-1 when hovered or pressed. fix(input-date-picker): consistent chevron icon color Apr 18, 2024
…olor-text-3 when idle and --calcite-color-text-1 when hovered or pressed.
@aPreciado88 aPreciado88 added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Apr 18, 2024
Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

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

Nice changes, code LGTM! cc @ashetland for snapshot review

@ashetland
Copy link

Nice changes, code LGTM! cc @ashetland for snapshot review

I'm going to approve the screenshots as all the changes are expected, but the change to text.1 is only happening while I hover on the icon. It should change onHover and onFocus of the entire input. See PR #8955.

@aPreciado88 aPreciado88 added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 18, 2024
@aPreciado88
Copy link
Contributor Author

@ashetland I updated the component to change the chevron's color when the input is hovered.

…eciado88/7712-update-date-picker-chevron-colors
Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

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

@ashetland mentioned text-1 should be applied on :focus too

@aPreciado88 aPreciado88 added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 18, 2024
@aPreciado88
Copy link
Contributor Author

aPreciado88 commented Apr 18, 2024

@benelan @ashetland I updated the component to apply text-1 on :hover, :active and :focus

Copy link
Member

@benelan benelan left a comment

Choose a reason for hiding this comment

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

LGTM!

@ashetland
Copy link

Heyo, I'm still only seeing it on hover.

@jcfranco
Copy link
Member

@aPreciado88 Can you update the PR title (specifically, the description part) to use the imperative, present tense per the conventions we link to in our contributing doc? You can look at previous commits on main as examples.

@aPreciado88 aPreciado88 changed the title fix(input-date-picker): consistent chevron icon color fix(input-date-picker): update the focus and hover chevron icon color Apr 19, 2024
@aPreciado88
Copy link
Contributor Author

@jcfranco I updated the title! Please let me know if that looks good.

@jcfranco
Copy link
Member

@aPreciado88 Looks perfect, thanks!

@aPreciado88 aPreciado88 added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 19, 2024
@ashetland
Copy link

🤘🚀🚢🎉

…eciado88/7712-update-date-picker-chevron-colors
@aPreciado88 aPreciado88 added skip visual snapshots Pull requests that do not need visual regression testing. pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Apr 22, 2024
…eciado88/7712-update-date-picker-chevron-colors
@aPreciado88 aPreciado88 merged commit ca895e9 into main Apr 23, 2024
11 checks passed
@aPreciado88 aPreciado88 deleted the aPreciado88/7712-update-date-picker-chevron-colors branch April 23, 2024 16:58
@github-actions github-actions bot added this to the 2024-04-30 - Apr Release milestone Apr 23, 2024
benelan pushed a commit that referenced this pull request Apr 24, 2024
…#9146)

**Related Issue:**
[7712](#7712)

### Summary
This updates `input-date-picker` chevron colors to be
`--calcite-color-text-3` when idle and `--calcite-color-text-1` when
hovered or pressed.
geospatialem pushed a commit that referenced this pull request May 1, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>@esri/calcite-design-tokens: 2.2.0</summary>

##
[2.2.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-design-tokens@2.1.2...@esri/calcite-design-tokens@2.2.0)
(2024-04-30)


### Features

* Ensure all components inherit font-family
([#8388](#8388))
([90f8923](90f8923))
</details>

<details><summary>@esri/eslint-plugin-calcite-components:
1.2.0</summary>

##
[1.2.0](https://github.com/Esri/calcite-design-system/compare/@esri/eslint-plugin-calcite-components@1.1.0...@esri/eslint-plugin-calcite-components@1.2.0)
(2024-04-30)


### Features

* **enforce-ref-last-prop:** Add fixer
([#8671](#8671))
([688bc51](688bc51))


### Bug Fixes

* **slider:** Improve snapping + step logic
([#8169](#8169))
([8b83042](8b83042))
</details>

<details><summary>@esri/calcite-components: 2.8.0</summary>

##
[2.8.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.7.1...@esri/calcite-components@2.8.0)
(2024-04-30)


### Features

* Add calciteInvalid event for form validation
([#9211](#9211))
([a504508](a504508))
* Add validity property to form components
([#9210](#9210))
([e49902b](e49902b))
* **carousel:** Add Carousel and Carousel Item components
([#8995](#8995))
([b1ba428](b1ba428))
* **enforce-ref-last-prop:** Add fixer
([#8671](#8671))
([688bc51](688bc51))
* Ensure all components inherit font-family
([#8388](#8388))
([90f8923](90f8923))
* **input-time-zone:** Add readonly support
([#9111](#9111))
([153a122](153a122))
* **input-time-zone:** Allow clearing value
([#9168](#9168))
([193bb7d](193bb7d))
* **list-item-group:** Update list item group styles
([#9072](#9072))
([c734849](c734849))
* **navigation-logo:** Add heading level
([#9054](#9054))
([c2beba8](c2beba8))
* **pagination:** Add navigation methods
([#9154](#9154))
([5ca6a5f](5ca6a5f))
* **slider:** Add support for custom label formatting
([#9179](#9179))
([710d1ee](710d1ee))
* **slider:** Allow configuring fill behavior
([#9170](#9170))
([1b2cdbf](1b2cdbf))
* **tile, tile-group:** Support single, multi, single-persist, none
selection modes and icon and border selection appearances
([#9159](#9159))
([2d77470](2d77470))


### Bug Fixes

* **action:** Maintain equal height when text is not enabled in a small
scale
([#9051](#9051))
([407824a](407824a))
* **chip-group:** Improve programmatic Chip selection behavior
([#9213](#9213))
([b7a4c77](b7a4c77))
* **combobox:** Update the focus and hover chevron icon color
([#9187](#9187))
([a1317da](a1317da))
* **combobox, input-time-zone:** Improve readOnly behavior and styling
([#9222](#9222))
([606d80f](606d80f))
* **combobox:** Fix aria-role for proper voiceover support
([#9039](#9039))
([eebe8ca](eebe8ca))
* **combobox:** Update the focused chevron icon color
([#9202](#9202))
([27ac02d](27ac02d))
* **date-picker:** Ensure `proximitySelectionDisabled` resets range on
post-range-commit selection
([#9171](#9171))
([f466b14](f466b14))
* **date-picker:** Restore focus on date when navigating month with
arrow/page keys
([#9063](#9063))
([db109e0](db109e0))
* Fix memory leak affecting components using conditionally-rendered
slots
([#9208](#9208))
([28701b6](28701b6))
* **input-date-picker:** Update the focus and hover chevron icon color
([#9146](#9146))
([ca895e9](ca895e9))
* **input-time-zone:** Ensure selected item is properly displayed when
there are other items with the same offset
([#9134](#9134))
([1f94903](1f94903))
* **input, input-number, input-text, input-date-picker,
input-time-picker, filter, menu-item:** Ignore canceled events and
enforce cancellations where needed
([#8952](#8952))
([d0fa977](d0fa977))
* **list, list-item, list-item-group:** Improve drag experience by
indenting items
([#9169](#9169))
([88aab49](88aab49))
* **list, list-item:** Support keyboard sorting in screen readers
([#9038](#9038))
([b2e1b9b](b2e1b9b))
* **list:** Closed list-items no longer render extra space
([#9031](#9031))
([3985004](3985004))
* **panel:** Support cancelling the esc key event to prevent closing a
panel
([#9032](#9032))
([ecfa5f1](ecfa5f1))
* **preset:** Update the focus outline color
([#9098](#9098))
([725f47c](725f47c))
* **radio-button:** Display validation message in parent group
([#9218](#9218))
([b1e869f](b1e869f))
* **select:** Update the focus and hover chevron icon color and select
focus and hover background color
([#9160](#9160))
([b187340](b187340))
* **slider:** Fix fill placement and tick styling when ranged
([#9204](#9204))
([a84d831](a84d831))
* **slider:** Improve snapping + step logic
([#8169](#8169))
([8b83042](8b83042))
* **slider:** Rename `highlightPlacement` to `fillPlacement`
([#9195](#9195))
([9e5a713](9e5a713))
* **slider:** Style ticks according to the fill placement
([#9196](#9196))
([5eb4e10](5eb4e10))
* **stepper-item:** Remove delay in highlighting item
([#8996](#8996))
([bcf23dd](bcf23dd))
* **tree-item:** Do not select when chevron clicked
([#9115](#9115))
([99ad8f1](99ad8f1))


### Dependencies

* The following workspace dependencies were updated
  * devDependencies
    * @esri/calcite-design-tokens bumped from ^2.2.0-next.0 to ^2.2.0
* @esri/eslint-plugin-calcite-components bumped from ^1.2.0-next.1 to
^1.2.0
</details>

<details><summary>@esri/calcite-components-angular: 2.8.0</summary>

##
[2.8.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.7.1...@esri/calcite-components-angular@2.8.0)
(2024-04-30)


### Miscellaneous Chores

* **@esri/calcite-components-angular:** Synchronize components versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from ^2.8.0-next.20 to ^2.8.0
</details>

<details><summary>@esri/calcite-components-react: 2.8.0</summary>

##
[2.8.0](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.7.1...@esri/calcite-components-react@2.8.0)
(2024-04-30)


### Miscellaneous Chores

* **@esri/calcite-components-react:** Synchronize components versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from ^2.8.0-next.20 to ^2.8.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. pr ready for visual snapshots Adding this label will run visual snapshot testing. skip visual snapshots Pull requests that do not need visual regression testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants