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

Tick import error #969

Merged
merged 6 commits into from
Aug 31, 2023
Merged

Tick import error #969

merged 6 commits into from
Aug 31, 2023

Conversation

clintonlunn
Copy link
Collaborator

@clintonlunn clintonlunn commented Aug 21, 2023

fixes #913

name: Pull request
about: Create a pull request
title: ''
labels: ''
assignees: ''


What type of PR is this?(check all applicable)

  • refactor
  • feature
  • bug fix
  • documentation
  • optimization
  • other

Description

Related Issues

Issue #913

What this PR achieves

  • Integrated react-toastify for improved error notifications.
  • Swapped headlessui modal for LeanAlert for UI consistency.

Screenshots, recordings

error messages and the new import mountain project modal
image
image

Notes

I removed some unused isButton logic that doesn't seem to be used anywhere anymore. This really simplified the component.

@vercel
Copy link

vercel bot commented Aug 21, 2023

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

Name Status Preview Updated (UTC)
open-tacos ✅ Ready (Inspect) Visit Preview Aug 31, 2023 1:59am

@clintonlunn clintonlunn marked this pull request as draft August 21, 2023 23:55
@clintonlunn clintonlunn marked this pull request as draft August 21, 2023 23:55
@clintonlunn clintonlunn temporarily deployed to Preview August 22, 2023 02:38 — with GitHub Actions Inactive
@clintonlunn clintonlunn temporarily deployed to Preview August 23, 2023 01:01 — with GitHub Actions Inactive
@clintonlunn clintonlunn temporarily deployed to Preview August 23, 2023 01:04 — with GitHub Actions Inactive
@clintonlunn clintonlunn marked this pull request as ready for review August 27, 2023 16:31
@clintonlunn
Copy link
Collaborator Author

@vnugent I've been testing this and I believe it is pretty much feature complete. The only reason I have been holding it in draft is to try to get better test coverage, but I am still struggling with mocking some of these loading states and toast messages. That can probably be improved down the road though.

Comment on lines 170 to 176
<button
type='button'
onClick={getTicks}
className='btn btn-primary'
>
{loading ? <Spinner /> : 'Get my ticks!'}
</button>
Copy link
Contributor

@vnugent vnugent Aug 27, 2023

Choose a reason for hiding this comment

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

I'd disable the button if loading is in progress

 <button
   disabled={loading}
   ... 

@vnugent
Copy link
Contributor

vnugent commented Aug 27, 2023

I was able to continue clicking on "Get my tick!" while the import is in progress (the spinner is showing), causing multiple imports. Don't worry about unit testing for now. As discussed the workflow will likely change.

Screenshot 2023-08-27 at 10 49 39 AM

@clintonlunn
Copy link
Collaborator Author

clintonlunn commented Aug 27, 2023

Got the button disabled while loading, Other than that, I think we want to cancel the request if the user clicks cancel. Working on that now

@clintonlunn clintonlunn temporarily deployed to Preview August 31, 2023 01:58 — with GitHub Actions Inactive
@vnugent vnugent merged commit 9ea5e9c into develop Aug 31, 2023
11 checks passed
@vnugent vnugent deleted the tick-import-error branch August 31, 2023 15:11
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.

warn user if tick import errors
2 participants