Skip to content

Commit 2884825

Browse files
committed
app: Drop persistent docs position.
This was very complicated, particularly between versions and tabs and windows, for something that offers only a minor convenience. This also makes it simpler to navigate to a particular page interactively by just setting the iframe URL, which is useful for interactive help from the block editor.
1 parent a09383d commit 2884825

2 files changed

Lines changed: 2 additions & 60 deletions

File tree

src/app/App.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import StatusBar from '../status-bar/StatusBar';
1717
import Toolbar from '../toolbar/Toolbar';
1818
import Tour from '../tour/Tour';
1919
import { isMacOS } from '../utils/os';
20-
import { useAppLastDocsPageSetting } from './hooks';
20+
import { docsDefaultPage } from './constants';
2121
import { useI18n } from './i18n';
2222

2323
const Editor = React.lazy(async () => {
@@ -48,7 +48,6 @@ const Terminal = React.lazy(async () => {
4848

4949
const Docs: React.FunctionComponent = () => {
5050
const { setIsSettingShowDocsEnabled } = useSettingIsShowDocsEnabled();
51-
const { initialDocsPage, setLastDocsPage } = useAppLastDocsPageSetting();
5251

5352
return (
5453
<iframe
@@ -80,10 +79,8 @@ const Docs: React.FunctionComponent = () => {
8079
if (document.body.classList.contains(Classes.DARK)) {
8180
contentWindow.document.documentElement.classList.add(Classes.DARK);
8281
}
83-
84-
setLastDocsPage(contentWindow.location.href);
8582
}}
86-
src={initialDocsPage}
83+
src={docsDefaultPage}
8784
allowFullScreen={true}
8885
width="100%"
8986
height="100%"

src/app/hooks.ts

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)