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

Round devices not fully visible logs #1588

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions packages/app-harness/src/app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Button, Image, ScrollView, Text, View } from 'react-native';
import { Api, isPlatformIos } from '@rnv/renative';
import { Api, isPlatformIos, isTizenwatch, isAndroidwear } from '@rnv/renative';
import { OrientationLocker, PORTRAIT, LANDSCAPE } from '../components/OrientationLocker';
import { NewModuleButton } from '../components/NewModuleButton';
import { useSplashScreen } from '../components/SplashScreen';
Expand Down Expand Up @@ -54,6 +54,7 @@ const App = () => (

const AppContent = () => {
const [showVideo, setShowVideo] = useState(false);
const [logsFocused, setLogsFocused] = useState(false);
const { logDebug, logs } = useLoggerContext();
const { SplashScreen } = useSplashScreen();

Expand Down Expand Up @@ -102,6 +103,9 @@ const AppContent = () => {
backgroundColor: 'white',
padding: 10,
}}
onTouchStart={()=>{
setLogsFocused(false);
}}
>
<TestCase id={1} title="Hermes support ">
<Text style={styles.text}>{`hermes: ${
Expand Down Expand Up @@ -156,7 +160,7 @@ const AppContent = () => {
<ScrollView
style={{
backgroundColor: '#EEEEEE',
maxHeight: '20%',
maxHeight: (isTizenwatch() || isAndroidwear()) && logsFocused ? '50%' : '20%',
width: '100%',
borderTopWidth: 1,
borderTopColor: 'black',
Expand All @@ -165,11 +169,15 @@ const AppContent = () => {
contentContainerStyle={{
paddingBottom: 10,
}}
onTouchStart={()=>{
setLogsFocused(true);
}}

>
<Text style={[styles.dynamicText, { fontWeight: 'bold' }]}>{`Logs: `}</Text>
<Text style={[styles.dynamicText, { fontWeight: 'bold', paddingHorizontal: 25 }]}>{`Logs: `}</Text>
{logs
? logs.map((it, idx) => (
<Text key={idx} style={styles.dynamicText}>
<Text key={idx} style={[styles.dynamicText, {paddingHorizontal: 25}, idx === logs.length - 1 && { paddingBottom: 80}]}>
{it}
</Text>
))
Expand Down
Loading