Skip to content

Commit

Permalink
[native] Fix the styling of the QR URL screen on virtual devices
Browse files Browse the repository at this point in the history
Summary:
Update the styling.

https://linear.app/comm/issue/ENG-10168/improve-qr-login-flow-on-dev

{F4036713}

Depends on D14314

Test Plan: Check if the field is displayed correctly.

Reviewers: kamil, bartek

Reviewed By: kamil

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D14315
  • Loading branch information
palys-swm committed Feb 10, 2025
1 parent 9f63b70 commit 4a42709
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions native/account/qr-auth/secondary-device-qr-code-scanner.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
import { useStyles, useColors } from '../../themes/colors.js';
import Alert from '../../utils/alert.js';
import { deviceIsEmulator } from '../../utils/url-utils.js';
import AuthContainer from '../auth-components/auth-container.react.js';
import AuthContentContainer from '../auth-components/auth-content-container.react.js';

const barCodeTypes = [BarCodeScanner.Constants.BarCodeType.qr];

Expand Down Expand Up @@ -118,21 +120,23 @@ function SecondaryDeviceQRCodeScanner(props: Props): React.Node {

if (deviceIsEmulator) {
return (
<View style={styles.textInputContainer}>
<Text style={styles.header}>QR Code URL</Text>
<View style={styles.inputContainer}>
<TextInput
style={styles.input}
value={urlInput}
onChangeText={onChangeText}
placeholder="QR Code URL"
placeholderTextColor={panelForegroundTertiaryLabel}
autoFocus={true}
autoCapitalize="none"
autoCorrect={false}
/>
</View>
</View>
<AuthContainer>
<AuthContentContainer style={styles.scrollViewContentContainer}>
<Text style={styles.header}>QR Code URL</Text>
<View style={styles.inputContainer}>
<TextInput
style={styles.input}
value={urlInput}
onChangeText={onChangeText}
placeholder="QR Code URL"
placeholderTextColor={panelForegroundTertiaryLabel}
autoFocus={true}
autoCapitalize="none"
autoCorrect={false}
/>
</View>
</AuthContentContainer>
</AuthContainer>
);
}
// Note: According to the BarCodeScanner Expo docs, we should adhere to two
Expand Down Expand Up @@ -167,8 +171,8 @@ const unboundStyles = {
right: 0,
bottom: 0,
},
textInputContainer: {
paddingTop: 8,
scrollViewContentContainer: {
flexGrow: 1,
},
header: {
color: 'panelBackgroundLabel',
Expand Down

0 comments on commit 4a42709

Please sign in to comment.