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

stoprint refactor –– mock data (part 3) #6078

Merged
merged 22 commits into from
Jun 2, 2022

Conversation

drewvolz
Copy link
Member

@drewvolz drewvolz commented May 23, 2022

view without whitespace

Noteworthy:

  • DebugNoticeButton navigation bar button
    • definition for component (909dfa6)
    • adding it to navigation (a565ade)
  • Mocked data for stoprint/papercut
  • Load stoprint printers list by removing additional callback (50a0c95)
  • Mark a stoprint 'success' type as boolean instead of as true (975adc1)
  • Pull username from the keychain instead of from navigation params (22233b4)
    • this is the same issue and fix that Hannes fixed three years ago in a separate PR that fixed releaseJob, whereas this fixes cancelJob Fix stoprint release #3730
    • we we were trying to extract the username from the navigation params rather than loading them using loadLoginCredentials. I guess this never got updated when we moved away from storing login credentials in redux itself.

Todo:

  • decide if errors should be undefined or null
  • add debug icon to printer view (it is using mocked data)
  • (optional:) add feature flag system/overrides to enable/disable mocked data instead of single boolean?

Screenshots

Basic Flow

See Jobs Select Printer for Job Release or Cancel Job
see jobs select a printer release or cancel

Alerts

Before Printing After Successful Print Before Canceling After Successful Cancel
before cancel N/A before release N/A
Mock Data Notice General Error
debug notice error

Other States

No Print Jobs Error (can't connect to API) Logged out
no jobs connection issue login

…-React-Native into drew/stoprint-part-2

# Conflicts:
#	eslint-problems
#	tsc-counts
#	tsc-errors
a button to serve as a visual identifier of views serving up data that
is mocked
this is the same issue and fix that Hannes fix three years ago in a
separate PR that fixed releaseJob, whereas this fixes cancelJob
#3730

we we were trying to extract the username from the navigation params
rather than loading them using loadLoginCredentials. I guess this never
got updated when we moved away from storing login credentials in redux
itself.
* prevent login checking if we are serving up mocked data
* branch to fetch mock data from fetching production data
* depend upon printer object because properties may be undefined
@drewvolz drewvolz merged commit 2f941e5 into drew/stoprint-part-2 Jun 2, 2022
@drewvolz drewvolz deleted the drew/stoprint-part-3 branch June 2, 2022 02:18
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.

1 participant