While the QR code work is in progress, we don't want it to be the first login page displayed. Instead, we're hiding it behind a 'login via QR code button' as done earlier in the stack.
The context is in [[ https://linear.app/comm/issue/ENG-4585/route-to-a-barebones-qr-code-login-page | ENG-4585 ]], but the basics for this diff are:
- Update `NavInfo` to include a `loginMethod: form | qr-code`
- Update `URLInfo` to include a `qrCode?: boolean` prop
- Add the RegEx statement alongside the [[ https://github.com/CommE2E/comm/blob/6421b301872e4ce3b5c353addd1a45d466b3a675/lib/utils/url-utils.js#L21-L40 | other url regex statements ]] to match for `qr-code`
in the URL
- In `web/url-utils.js`, we should do two things:
-- in `canonicalURLFromReduxState`: append 'qr-code' to the url if the user is not logged in and `navInfo.loginMethod === 'qr-code'`
-- in `navInfoFromURL`: if `urlInfo.qrCode === true`, we want to set `newNavInfo.loginMethod === 'qr-code'`, otherwise we set it to 'form'
- Lastly, in `web/app.react.js`, instead of just rendering `Splash` when the user is not logged in, we look at the `navInfo` and decide whether to render `Splash` or the new page that will display the QR code
(this logic is pretty similar to what is done for renderMainContent()
Mainly followed by the settings stack (D3342) for inspiration on writing this code
Depends on D8811