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] qr code scanner bug fixes #80

Merged
merged 16 commits into from
Apr 25, 2024
Merged

Conversation

stephaniewong2
Copy link
Collaborator

@stephaniewong2 stephaniewong2 commented Apr 11, 2024

What's new in this PR

Description

QR Code:

  • Created a separate bottom tab option for the qr code scanner.
  • Migrated to the expo camera library.
  • Added green borders and toast message on valid scans.
  • Added red borders on invalid scans.
  • Moved toasts to top of the screen and improved misc usability.
  • Rewrote queries to fetch case data more efficiently.

Case Screen:

  • Removed 3 dots from CaseCard.
  • Fixed AllCases to span entire screen.

Screenshots

How to review

  • Check that AllCases screen looks proper with a varying number of cases. Might need to account for bottom tab in setting height.
  • Use the qr code scanner on a variety of codes and verify that the correct output occurs.

Relevant Links

Online sources

Expo Camera Documentation
Debouncing Functions
Lodash Library for Debouncing

CC: @ronniebeggs

@stephaniewong2 stephaniewong2 changed the title [fix ] qr code scanner bug fixes [fix] qr code scanner bug fixes Apr 11, 2024
Copy link
Collaborator

@ronniebeggs ronniebeggs left a comment

Choose a reason for hiding this comment

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

I like the changes so far. I'm considering a few edge cases that we haven't decided how to handle yet.

When a user scans a valid barcode, the view case option will pop up and the border will turn green. However, if a different barcode is scanned right after, the screen should update:

  • If the other barcode is valid, it'd be nice to somehow indicate that a different case was now scanned.
  • If the other barcode is invalid, the view case option should disappear while the error toast message pops up. Maybe the border should turn red as well.

It also might be nice to move toast messages to the top of the screen so they don't overlap with the view case button.

@ronniebeggs
Copy link
Collaborator

Also..... BarCodeScanner is lowkey being deprecated: https://docs.expo.dev/versions/latest/sdk/bar-code-scanner/#component

@ronniebeggs
Copy link
Collaborator

Josh Notes:

  • new qr codes should be processed when looked at
  • red border for invalid codes
  • toast message for valid codes
  • move all toast messages (valid and invalid) to the top of the screen

Copy link
Collaborator

@ronniebeggs ronniebeggs left a comment

Choose a reason for hiding this comment

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

I basically rewrote the qr code query logic so it might look like a lot. Can you double check that the qr code works for different scanning scenarios?

@ronniebeggs ronniebeggs merged commit b2a5da2 into main Apr 25, 2024
2 checks passed
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.

2 participants