Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Keep the editor in the quick nav rail when there is no processor (#8024)

EthanHealy015b080df25311
diff --git a/frontend/editor/src/core/components/shared/quickNav/QuickNavRailHost.tsx b/frontend/editor/src/core/components/shared/quickNav/QuickNavRailHost.tsx
index ffc49827fb..a0038538bc 100644
--- a/frontend/editor/src/core/components/shared/quickNav/QuickNavRailHost.tsx
+++ b/frontend/editor/src/core/components/shared/quickNav/QuickNavRailHost.tsx
@@ -69,7 +69,7 @@ export function QuickNavRailHost() {
return { disabled: Boolean(reason), reason };
};
- // The three apps you switch between. Reader is a mode over the editor rather
+ // The apps you switch between. Reader is a mode over the editor rather
// than a place of its own, but it leads the group because it is where most
// visits start.
const reader: QuickNavEntry = {
@@ -125,10 +125,13 @@ export function QuickNavRailHost() {
},
};
- // Editor and processor only pair off where there is a processor to reach.
- const apps: QuickNavEntry[] = HAS_PORTAL
- ? [reader, editor, processor]
- : [reader];
+ // The processor is additive: dropping the editor with it left a lone reader
+ // toggle in builds without a portal, with no way back out of reader mode.
+ const apps: QuickNavEntry[] = [
+ reader,
+ editor,
+ ...(HAS_PORTAL ? [processor] : []),
+ ];
const within: QuickNavEntry[] = [
{