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

Source holidays from user's location #11

Closed
tupaschoal opened this issue Sep 17, 2019 · 6 comments · Fixed by #314
Closed

Source holidays from user's location #11

tupaschoal opened this issue Sep 17, 2019 · 6 comments · Fixed by #314
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@tupaschoal
Copy link
Collaborator

It would be great if the users could type in their locations and the calendar would adapt accordingly including holidays.
There are several ways to make this more complex

  • Start with just a country
  • Move to city-based
  • Make app read approximate location, instead of having user type it
@tupaschoal tupaschoal changed the title Source holidays from user location Source holidays from user's location Sep 17, 2019
@thamara thamara added the enhancement New feature or request label Sep 17, 2019
@tupaschoal
Copy link
Collaborator Author

Seems like sourcing it from the location might be difficult, but I found some resources on where to get the holidays from.

There's this date-holidays module and it even has an html example which can probably be used as inspiration on how to make a list of checkboxes in the configuration to choose from.

@tupaschoal tupaschoal added the help wanted Extra attention is needed label Oct 30, 2019
@thamara thamara self-assigned this Oct 30, 2019
@thamara
Copy link
Owner

thamara commented Jul 16, 2020

I'm currently working on this and would like some feedback on the flow I'm implementing. @tupaschoal and @araujoarthur0 can you please share some thoughts on this?

Basically I'm adding a tab on Workday Waiver called Holiday. In it, the user selects the year, country, state, and city (if available). All the holidays matching that are displayed automatically bellow, with some columns to indicate if that's on a working day if there's any conflict with any previously added waiver. There's also a select button that is enabled if there's no conflict and if the holiday is on a working day. The user can select which holidays to the source, and click the button below, which will add the holidays.

Here's a gif of that in action:
Screen-Recording-2020-07-15-at-23 56 26

thamara added a commit that referenced this issue Jul 16, 2020
@thamara thamara mentioned this issue Jul 16, 2020
@araujoarthur0
Copy link
Collaborator

I think that looks wonderful. The conflict feature is even more than I expected :)

@tupaschoal
Copy link
Collaborator Author

It looks brilliant. I have a few comments and questions:

  1. What happens if you choose to add a holiday on a day that has a conflict? Does it override the previous entry or just fails silently?
  2. What happens if you choose to add a holiday on a day that is a non working day? It just fails silently?
  3. Do we remember the last location set by the user? If not, I think it would be a nice to have, so that they don't have to select country/state/city every time they want to source it (though arguably it would be once a year).

@thamara
Copy link
Owner

thamara commented Jul 16, 2020

What happens if you choose to add a holiday on a day that has a conflict? Does it override the previous entry or just fails silently?

It overrides the previous entry.

What happens if you choose to add a holiday on a day that is a non working day? It just fails silently?

Just adds it anyway, but this entry is not used by the app.

Do we remember the last location set by the user? If not, I think it would be a nice to have, so that they don't have to select country/state/city every time they want to source it (though arguably it would be once a year).

For now, it doesn't. I have thought about "inferring" the user location based on geolocalization, but I could not find a good (and light) library for this. This could be an enhancement in the future.

For the 2 first topics, I think I can create a warning message, or confirmation box informing this to the user. Let me work on this tonight and I'll update you. The 3rd one is a bit trickier and I would like to avoid having to store it somewhere in the tool for now. I prefer to do some more research and offer an even better solution (automatic identifying the user location).

Another enhancement I can see is to allow the user to customize the waiver hours from the table of of holidays to be sourced. But again, I think this one should be done later.

@tupaschoal
Copy link
Collaborator Author

I think we're alright with them overwriting for now, pop-up may be a bit distracting.

As for saving the location, like I said, it's a nice to have to avoid a few clicks once a year (potentially)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants