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-time-zone): fix handling of unknown and cityless time zones from offset display mode #7947

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Oct 5, 2023

Related Issue: #7944

Summary

This updates the component to remove cityless time zone entries in the offset mode and for unknown entries (either from browser differences or updated values) their city part will be displayed as is.

Note: due to time constraints, testing will be tackled in #7951.

@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Oct 5, 2023
@geospatialem geospatialem added the p - critical Issue preventing EVERYONE from using a component or core functionality label Oct 5, 2023
@@ -4,6 +4,48 @@ import { InputTimeZoneMessages } from "./assets/input-time-zone/t9n";

const hourToMinutes = 60;

const timeZoneNameBlockList = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a way to get this list from a trusted source rather than having to maintain it ourselves?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. I could reliably exclude Etc/X ones, but would have to investigate separately if entries with no delimiter are reliable to block as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

I focused too much on having this dynamically generated that I didn't address the "trusted source" part of your question. Unfortunately, Intl doesn't provide metadata for time zone names, so we have to handle this on our side. That would definitely make things simpler here.

@jcfranco jcfranco changed the title fix(input-time-zone): fix handling of unknown and regionless time zones from offset display mode fix(input-time-zone): fix handling of unknown and cityless time zones from offset display mode Oct 5, 2023
@jcfranco jcfranco marked this pull request as ready for review October 5, 2023 22:26
@jcfranco jcfranco requested a review from a team as a code owner October 5, 2023 22:26
@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Oct 5, 2023
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👏 👍 💯

@jcfranco jcfranco merged commit 75e0302 into main Oct 5, 2023
@jcfranco jcfranco deleted the jcfranco/7944-fix-handling-of-unknown-and-regionless-time-zones branch October 5, 2023 23:11
@github-actions github-actions bot added this to the 1.9.1 Maintenance Release milestone Oct 5, 2023
geospatialem pushed a commit that referenced this pull request Oct 6, 2023
🤖 I have created a release *beep* *boop*
---


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

##
[1.9.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.9.0...@esri/calcite-components@1.9.1)
(2023-10-05)


### Bug Fixes

* **combobox:** Fix issue causing value to be cleared when selecting an
item (Windows + trackpad)
([#7954](#7954))
([557d658](557d658))
* **input-time-zone:** Fix handling of unknown and cityless time zones
from offset display mode
([#7947](#7947))
([75e0302](75e0302))
* **panel:** Fix collapse action title and reverse icon direction
([#7927](#7927))
([5f620f8](5f620f8))
</details>

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

##
[1.9.1](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.9.0...@esri/calcite-components-react@1.9.1)
(2023-10-05)


### Miscellaneous Chores

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


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @esri/calcite-components bumped from ^1.9.1-next.1 to ^1.9.1
</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>
@jcfranco jcfranco added the regression Issues that are caused by changes in a release, but were working before that. label Oct 7, 2023
jcfranco added a commit that referenced this pull request Oct 10, 2023
…7971)

**Related Issue:** #7944

## Summary

Addresses an issue caused by time zone label index adjustment (from time
zone group filtering) ended up as -1 and cause an error when using it as
a lookup index.

This also adds missing tests from
#7947.
benelan added a commit that referenced this pull request Oct 11, 2023
* origin/main: (83 commits)
  chore: add design tokens to monorepo (#7948)
  test(input-time-zone): restore common tests (#7963)
  chore: release next
  fix(input-time-zone): fix error caused by time zone group filtering (#7971)
  chore: release next
  fix(table): Improve scrollbar display (#7967)
  build: bump timezone-groups (#7962)
  chore: release next
  fix(flow-item): update collapsed property when collapse button is clicked (#7960)
  chore: release main (#7945)
  chore: release next
  fix(input-time-zone): fix handling of unknown and cityless time zones from offset display mode (#7947)
  fix(combobox): fix issue causing value to be cleared when selecting an item (Windows + trackpad) (#7954)
  chore(deps): update calcite-ui-icons to 3.24.7 (#7949)
  test(flow-item, panel): add tests for internal property. (#7931)
  chore: release next
  fix(panel): fix collapse action title and reverse icon direction (#7927)
  chore: update issue template labels to support workflows (#7938)
  build(deps): bump timezone-groups (#7933)
  build(deps): update dependency @esri/calcite-ui-icons to v3.24.6 (#7925)
  ...
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. p - critical Issue preventing EVERYONE from using a component or core functionality pr ready for visual snapshots Adding this label will run visual snapshot testing. regression Issues that are caused by changes in a release, but were working before that.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants