Skip to content

Commit

Permalink
feat: removing statusBar (#1062)
Browse files Browse the repository at this point in the history
Signed-off-by: Caroline Lucas Calheirani <[email protected]>
  • Loading branch information
CarolineLCa authored Feb 13, 2024
1 parent f5f7999 commit 99f62c9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 39 deletions.
8 changes: 1 addition & 7 deletions packages/legacy/core/App/screens/CredentialOfferAccept.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import { useCredentialById } from '@aries-framework/react-hooks'
import { useNavigation } from '@react-navigation/core'
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Platform, Modal, StatusBar, StyleSheet, Text, View, ScrollView, AccessibilityInfo } from 'react-native'
import { Modal, StyleSheet, Text, View, ScrollView, AccessibilityInfo } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'

import Button, { ButtonType } from '../components/buttons/Button'
import { useAnimatedComponents } from '../contexts/animated-components'
import { useConfiguration } from '../contexts/configuration'
import { useTheme } from '../contexts/theme'
import { Screens, TabStacks } from '../types/navigators'
import { statusBarStyleForColor, StatusBarStyles } from '../utils/luminance'
import { testIdWithKey } from '../utils/testable'

enum DeliveryStatus {
Expand Down Expand Up @@ -108,11 +107,6 @@ const CredentialOfferAccept: React.FC<CredentialOfferAcceptProps> = ({ visible,
return (
<Modal visible={visible} transparent={true} animationType={'none'}>
<SafeAreaView style={{ ...ListItems.credentialOfferBackground }}>
<StatusBar
barStyle={
Platform.OS === 'android' ? StatusBarStyles.Light : statusBarStyleForColor(styles.container.backgroundColor)
}
/>
<ScrollView style={[styles.container]}>
<View style={[styles.messageContainer]}>
{credentialDeliveryStatus === DeliveryStatus.Pending && (
Expand Down
3 changes: 0 additions & 3 deletions packages/legacy/core/App/screens/PINCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Keyboard,
StyleSheet,
Text,
StatusBar,
View,
TextInput,
TouchableOpacity,
Expand All @@ -32,7 +31,6 @@ import { useTheme } from '../contexts/theme'
import { BifoldError } from '../types/error'
import { AuthenticateStackParams, Screens } from '../types/navigators'
import { PINCreationValidations, PINValidationsType } from '../utils/PINCreationValidation'
import { StatusBarStyles } from '../utils/luminance'
import { testIdWithKey } from '../utils/testable'

interface PINCreateProps extends StackScreenProps<ParamListBase, Screens.CreatePIN> {
Expand Down Expand Up @@ -171,7 +169,6 @@ const PINCreate: React.FC<PINCreateProps> = ({ setAuthenticated, route }) => {

return (
<KeyboardView>
<StatusBar barStyle={StatusBarStyles.Light} />
<View style={style.screenContainer}>
<View style={style.contentContainer}>
<Text style={[TextTheme.normal, { marginBottom: 16 }]}>
Expand Down
4 changes: 1 addition & 3 deletions packages/legacy/core/App/screens/PINEnter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useNavigation } from '@react-navigation/core'
import { CommonActions } from '@react-navigation/native'
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { StatusBar, Keyboard, StyleSheet, Text, Image, View, DeviceEventEmitter } from 'react-native'
import { Keyboard, StyleSheet, Text, Image, View, DeviceEventEmitter } from 'react-native'

import Button, { ButtonType } from '../components/buttons/Button'
import PINInput from '../components/inputs/PINInput'
Expand All @@ -18,7 +18,6 @@ import { useTheme } from '../contexts/theme'
import { BifoldError } from '../types/error'
import { Screens } from '../types/navigators'
import { hashPIN } from '../utils/crypto'
import { StatusBarStyles } from '../utils/luminance'
import { testIdWithKey } from '../utils/testable'

interface PINEnterProps {
Expand Down Expand Up @@ -297,7 +296,6 @@ const PINEnter: React.FC<PINEnterProps> = ({ setAuthenticated, usage = PINEntryU

return (
<KeyboardView>
<StatusBar barStyle={StatusBarStyles.Light} />
<View style={style.screenContainer}>
<View style={style.contentContainer}>
<Image source={Assets.img.logoSecondary.src} style={style.image} />
Expand Down
8 changes: 1 addition & 7 deletions packages/legacy/core/App/screens/ProofRequestAccept.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ import { useProofById } from '@aries-framework/react-hooks'
import { useNavigation } from '@react-navigation/core'
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Platform, Modal, StatusBar, StyleSheet, Text, View, ScrollView } from 'react-native'
import { Modal, StyleSheet, Text, View, ScrollView } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'

import Button, { ButtonType } from '../components/buttons/Button'
import { useAnimatedComponents } from '../contexts/animated-components'
import { useTheme } from '../contexts/theme'
import { Screens, TabStacks } from '../types/navigators'
import { statusBarStyleForColor, StatusBarStyles } from '../utils/luminance'
import { testIdWithKey } from '../utils/testable'

export interface ProofRequestAcceptProps {
Expand Down Expand Up @@ -73,11 +72,6 @@ const ProofRequestAccept: React.FC<ProofRequestAcceptProps> = ({ visible, proofI

return (
<Modal visible={visible} transparent={true} animationType={'none'}>
<StatusBar
barStyle={
Platform.OS === 'android' ? StatusBarStyles.Light : statusBarStyleForColor(styles.container.backgroundColor)
}
/>
<SafeAreaView style={{ backgroundColor: ColorPallet.brand.modalPrimaryBackground }}>
<ScrollView style={[styles.container]}>
<View style={[styles.messageContainer]}>
Expand Down
17 changes: 1 addition & 16 deletions packages/legacy/core/App/screens/UseBiometry.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import React, { useState, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import {
StyleSheet,
Text,
View,
Modal,
Switch,
StatusBar,
Platform,
ScrollView,
Pressable,
DeviceEventEmitter,
} from 'react-native'
import { StyleSheet, Text, View, Modal, Switch, ScrollView, Pressable, DeviceEventEmitter } from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'

import Button, { ButtonType } from '../components/buttons/Button'
Expand All @@ -21,7 +10,6 @@ import { useAuth } from '../contexts/auth'
import { DispatchAction } from '../contexts/reducers/store'
import { useStore } from '../contexts/store'
import { useTheme } from '../contexts/theme'
import { statusBarStyleForColor, StatusBarStyles } from '../utils/luminance'
import { testIdWithKey } from '../utils/testable'

import PINEnter, { PINEntryUsage } from './PINEnter'
Expand Down Expand Up @@ -120,9 +108,6 @@ const UseBiometry: React.FC = () => {

return (
<SafeAreaView edges={['left', 'right', 'bottom']}>
<StatusBar
barStyle={Platform.OS === 'android' ? StatusBarStyles.Light : statusBarStyleForColor(ColorPallet.brand.primary)}
/>
<ScrollView style={styles.container}>
<View style={{ alignItems: 'center' }}>
<Assets.svg.biometrics style={[styles.image]} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useNavigation } from '@react-navigation/core'
import { render, fireEvent, act } from '@testing-library/react-native'
import React from 'react'

import CameraDisclosureModal from '../../App/components/modals/CameraDisclosureModal'
import { testIdWithKey } from '../../App/utils/testable'

Expand All @@ -14,10 +13,10 @@ jest.mock('@react-navigation/native', () => {
})

describe('CameraDisclosureModal Component', () => {
beforeAll(()=>{
beforeAll(() => {
jest.useFakeTimers()
})
afterAll(()=>{
afterAll(() => {
jest.useRealTimers()
})
beforeEach(() => {
Expand Down

0 comments on commit 99f62c9

Please sign in to comment.