mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat: finalize pretext feed sizing rollout (#1120)
* feat(feeds): add pretext-backed item sizing across board, catalog, and thread replies * feat: finalize pretext feed sizing rollout * fix(catalog): raise multiboard viewport buffer * fix(board): preserve pretext query overrides
This commit is contained in:
+8
-7
@@ -16,8 +16,7 @@ import { Analytics } from '@vercel/analytics/react';
|
||||
const isVercelDeployment =
|
||||
typeof window !== 'undefined' && (window.location.hostname === '5chan.app' || window.location.hostname === 'www.5chan.app') && !window.isElectron;
|
||||
const e2eStartHash = import.meta.env.VITE_E2E_START_HASH?.trim();
|
||||
const shouldRenderThreadAutoUpdateHarness =
|
||||
import.meta.env.DEV && typeof window !== 'undefined' && new URLSearchParams(window.location.search).get('e2e') === 'thread-auto-update';
|
||||
const requestedE2EHarness = import.meta.env.DEV && typeof window !== 'undefined' ? new URLSearchParams(window.location.search).get('e2e') : null;
|
||||
|
||||
if (typeof window !== 'undefined' && e2eStartHash && window.location.hash.length === 0) {
|
||||
window.location.hash = e2eStartHash.startsWith('#') ? e2eStartHash : `#${e2eStartHash}`;
|
||||
@@ -25,15 +24,17 @@ if (typeof window !== 'undefined' && e2eStartHash && window.location.hash.length
|
||||
|
||||
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
|
||||
const renderRoot = async () => {
|
||||
let threadAutoUpdateHarness: React.ComponentType | null = null;
|
||||
if (shouldRenderThreadAutoUpdateHarness) {
|
||||
threadAutoUpdateHarness = (await import('./e2e/thread-auto-update-harness')).default;
|
||||
let e2eHarness: React.ComponentType | null = null;
|
||||
if (requestedE2EHarness === 'thread-auto-update') {
|
||||
e2eHarness = (await import('./e2e/thread-auto-update-harness')).default;
|
||||
} else if (requestedE2EHarness === 'pretext-benchmark') {
|
||||
e2eHarness = (await import('./e2e/pretext-benchmark-harness')).default;
|
||||
}
|
||||
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
{threadAutoUpdateHarness ? (
|
||||
React.createElement(threadAutoUpdateHarness)
|
||||
{e2eHarness ? (
|
||||
React.createElement(e2eHarness)
|
||||
) : (
|
||||
<Router>
|
||||
<AppUpdateRegistration />
|
||||
|
||||
Reference in New Issue
Block a user