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

react-timezone-select: add popular cities for each timezone #2939

Closed
PeerRich opened this issue Jun 1, 2022 · 18 comments
Closed

react-timezone-select: add popular cities for each timezone #2939

PeerRich opened this issue Jun 1, 2022 · 18 comments
Labels
✨ feature New feature or request

Comments

@PeerRich
Copy link
Member

PeerRich commented Jun 1, 2022

based on: https://twitter.com/peer_rich/status/1531906849733222400

lets use:
https://github.com/ndom91/react-timezone-select#-custom-timezones

to add cities such as San Francisco => PT, etc.

csvData.csv

@PeerRich
Copy link
Member Author

PeerRich commented Jun 1, 2022

found this resource too: https://www.zeitverschiebung.net/en/all-time-zones.html

@Toledodev
Copy link
Contributor

i will take a look on this :)

@Toledodev
Copy link
Contributor

you mean this?
Screenshot from 2022-06-01 16-04-10
or just use as a filter?

@PeerRich
Copy link
Member Author

PeerRich commented Jun 1, 2022

you mean this?

Screenshot from 2022-06-01 16-04-10

or just use as a filter?

the dropdown should still have the default ones, but the autocomplete should search and find popular cities

@Toledodev
Copy link
Contributor

Okay, i will try

@Toledodev
Copy link
Contributor

In the library there is no kind of filter or key that refers to the capital or if the city is "popular". Until now if I type the name of the city the corresponding timezone is selected, but not rendered in the options

@Toledodev
Copy link
Contributor

Can I make all cities matching the input search be rendered in the options? as the user types more characters the options will decrease

@Toledodev
Copy link
Contributor

Please check my video 👍
https://www.loom.com/share/3fc511af5e4c4fb68946d85e2a0286ee

@PeerRich
Copy link
Member Author

PeerRich commented Jun 6, 2022

Please check my video 👍

https://www.loom.com/share/3fc511af5e4c4fb68946d85e2a0286ee

is it possible to show the city in the dropdown when typing?

@milospuac milospuac added the ✨ feature New feature or request label Jun 7, 2022
@Toledodev
Copy link
Contributor

Hey @PeerRich . there is no way to render the cities (or the corresponding timezones) in the dropdown without rendering it again
I was able to make it switch to the right timezone without being rendered on the dropdown (as I showed in a video above) and I was able to show the corresponding timezones when the dropdown is rendered again (https://www.loom.com/share/5d14b40950ef4c94b691d3efb37ef95e)

@Toledodev
Copy link
Contributor

The console on loom video shows the filtered object (with the input value)

@Toledodev
Copy link
Contributor

I opened an issue in the react time zone select repository, suggesting this feature, as they only provide the date with the timezones, without having cities to filter. When trying to make the relationship between react-timezone-select and city-timezones(library I used) I realized that react-timezone-select doesn't accept timezones different from theirs suggesting this feature

@Toledodev
Copy link
Contributor

hey @PeerRich, as you can see there is no dynamic way to filter and render the desired cities
ndom91/react-timezone-select#71

@aar2dee2
Copy link
Contributor

@PeerRich
I'm planning to add cities from this Kaggle database directly to the declared time-zones list in react-timezone-select. Here's a snapshot of the data in Kaggle:
Screenshot 2022-06-21 at 3 45 43 PM

Is it better to include the city names or city_ascii names?

@aar2dee2
Copy link
Contributor

update: just read the discussion here. Happy to work with @Toledodev / others if we have consensus on the dataset to be used.

@PeerRich
Copy link
Member Author

update: just read the discussion here. Happy to work with @Toledodev / others if we have consensus on the dataset to be used.

awesome yeah lets work in that repo 🙏

@aar2dee2
Copy link
Contributor

Hey @Toledodev if you have a fork for react-timezone-select that you're adding the cities in, could you add me as collaborator?

@Toledodev
Copy link
Contributor

Hi @aar2dee2, I am at an internship program at GitStart, we forked privately and will push as a company when it is ready, but we can push work in progress if u want too
Initially, I am thinking on just adding a new prop called “extraLabels” that will send which other labels we want and match the already existing timezones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants