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: implemented a reset feature when a user has selected a province #30

Merged
merged 2 commits into from
Apr 29, 2023

Conversation

chaaals
Copy link
Contributor

@chaaals chaaals commented Apr 27, 2023

Closes #25

Description

This PR adds a reset feature to the web app.

Implementation Details

I utilized context api in this change so that we can make provinceLevels a global state. I implemented the reset button beside the save image button. I also implemented a constraint that users will only be able to reset when at least 1 province is selected. I also added a toast for better UX :))

Demo

2023-04-27.15-00-15.mp4

@vercel
Copy link

vercel bot commented Apr 27, 2023

@chaaals is attempting to deploy a commit to the OSSPH Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Apr 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
my-philippines-travel-map ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2023 5:03am

@jofftiquez
Copy link
Member

Nice, this is exactly what I was looking for. Thank you!

Copy link
Member

@jofftiquez jofftiquez left a comment

Choose a reason for hiding this comment

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

Looks good to me, but I'll let a react expert do another review. Thanks.

@jofftiquez
Copy link
Member

@denzdelvillar @warengonzaga do you mind reviewing this? Thanks.

Copy link
Member

@warengonzaga warengonzaga left a comment

Choose a reason for hiding this comment

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

LGTM, good to have a custom message after reset.

@jofftiquez
Copy link
Member

LGTM, good to have a custom message after reset.

I'm good with the current message in the success snackbar. Do you have something else in mind?

@warengonzaga
Copy link
Member

LGTM, good to have a custom message after reset.

I'm good with the current message in the success snackbar. Do you have something else in mind?

No, I mean glad to have the message after reset.

Copy link
Collaborator

@denzdelvillar denzdelvillar left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for this

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

Successfully merging this pull request may close these issues.

✏️ Enhancement: Add a way to reset selected provinces
4 participants