Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a44db26
fix: adjust layout-calculating heuristics
5ZYSZ3K Aug 12, 2026
32118ba
fix(heuristic-table-plugin): add colgrups and redistribute widths
5ZYSZ3K Sep 3, 2026
9c56356
feat(heuristic-table-plugin): make heuristic table respect external p…
5ZYSZ3K Sep 3, 2026
3120529
feat(heuristic-table-plugin): enable configuring font coeffs for tables
5ZYSZ3K Sep 8, 2026
411f351
feat(heuristic-table-plugin): implement border collapsing and stick t…
5ZYSZ3K Sep 9, 2026
ebc52ed
feat(heuristic-table-plugin): add default padding
5ZYSZ3K Sep 10, 2026
79f4cd7
feat(heuristic-table-plugin): resolve cell styles once and lay out ag…
5ZYSZ3K Sep 15, 2026
a33afa7
fix(heuristic-table-plugin): assess tests and adjust nested table ren…
5ZYSZ3K Sep 15, 2026
3e7c140
feat(heuristic-table-plugin): hide height growts behind a prop
5ZYSZ3K Sep 15, 2026
a116852
fix(heuristic-table-plugin): horizontal and vertical paddings adjuste…
5ZYSZ3K Sep 15, 2026
29f110e
fix(heuristic-table-plugin): adjust tests
5ZYSZ3K Sep 15, 2026
973961e
fix(heuristic-table-plugin): width resolution, surplus sharing and lo…
5ZYSZ3K Sep 15, 2026
a45e666
fix(heuristic-table-plugin): fill table height, preserve row heights,…
5ZYSZ3K Sep 15, 2026
27fa71f
fix(heuristic-table-plugin): scroll fixed-height tables without clipp…
5ZYSZ3K Sep 15, 2026
3921d77
fix(heuristic-table-plugin): stop requiring contentWidth in config an…
5ZYSZ3K Sep 15, 2026
a2b400e
refactor(heuristic-table-plugin): share layout helpers and drop the r…
5ZYSZ3K Sep 15, 2026
f6648d0
fix(heuristic-table-plugin): render stray cells without crashing and …
5ZYSZ3K Sep 15, 2026
1f789f1
refactor(heuristic-table-plugin): separate the table grid from config…
5ZYSZ3K Sep 15, 2026
05eb1f9
refactor(heuristic-table-plugin): split oversized modules and name th…
5ZYSZ3K Sep 15, 2026
ddf13b4
fix(heuristic-table-plugin): respect table direction when collapsing …
5ZYSZ3K Sep 15, 2026
8e7af21
feat(heuristic-table-plugin): add comparison example to the app
5ZYSZ3K Sep 15, 2026
441d587
fix: rename SCREAMING_UPPER_CASED consts
5ZYSZ3K Nov 11, 2026
3996075
fix: adjust docs after build
5ZYSZ3K Dec 2, 2026
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
50 changes: 42 additions & 8 deletions example/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react-native/no-inline-styles */
import React, { useCallback, useState } from 'react';
import { StatusBar } from 'expo-status-bar';
import * as WebBrowser from 'expo-web-browser';
Expand All @@ -7,7 +6,6 @@ import {
Text,
View,
ScrollView,
UIManager,
Platform,
Button,
useWindowDimensions
Expand All @@ -23,6 +21,7 @@ import SimpleExample from './SimpleExample';
import CustomExample from './CustomExample';
import YoutubeExample from './YoutubeExample';
import HeuristicTableExample from './HeuristicTableExample';
import ComparisonExample from './ComparisonExample';

const Stack = createStackNavigator();

Expand Down Expand Up @@ -147,6 +146,30 @@ function HeuristicTableScreen({ availableWidth, onLinkPress }) {
);
}

function ComparisonScreen({ availableWidth, onLinkPress }) {
const [instance, setInstance] = useState(0);
return (
<ScrollView
contentContainerStyle={styles.contentStyle}
style={styles.scrollViewStyle}>
<Text style={styles.welcome}>
The same HTML source rendered twice: once with{' '}
<Monospace>@native-html/table-plugin</Monospace> (WebView based) and
once with <Monospace>@native-html/heuristic-table-plugin</Monospace>{' '}
(pure native).
</Text>
<Button title="reload" onPress={() => setInstance((i) => i + 1)} />
<View style={styles.example}>
<ComparisonExample
availableWidth={availableWidth}
onLinkPress={onLinkPress}
instance={instance}
/>
</View>
</ScrollView>
);
}

function HomeScreen() {
const navigation = useNavigation();
return (
Expand Down Expand Up @@ -182,15 +205,16 @@ function HomeScreen() {
onPress={() => navigation.navigate('HeuristicTable')}
/>
</View>
<View style={styles.button}>
<Button
title="renderers comparison"
onPress={() => navigation.navigate('Comparison')}
/>
</View>
</View>
);
}

if (Platform.OS === 'android') {
UIManager.setLayoutAnimationEnabledExperimental &&
UIManager.setLayoutAnimationEnabledExperimental(true);
}

export default function App() {
const [url, setUrl] = useState(null);
const [isSnackVisible, setIsSnackVisible] = useState(false);
Expand All @@ -200,7 +224,7 @@ export default function App() {
setUrl(href);
}, []);
React.useEffect(() => {
url && setIsSnackVisible(true);
if (url) setIsSnackVisible(true);
}, [url]);
return (
<PaperProvider>
Expand Down Expand Up @@ -268,6 +292,16 @@ export default function App() {
/>
)}
</Stack.Screen>
<Stack.Screen
name="Comparison"
options={{ title: 'Renderers Comparison' }}>
{() => (
<ComparisonScreen
onLinkPress={onLinkPress}
availableWidth={availableWidth}
/>
)}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
<Portal>
Expand Down
Loading
Loading