quartz icon indicating copy to clipboard operation
quartz copied to clipboard

Explorer doesn't refresh page when moving between index.md pages.

Open djotto opened this issue 1 year ago • 3 comments

Describe the bug

When Explorer is configured with:

Component.Explorer({
    folderClickBehavior: "link",
})

and you attempt to move between two Folder pages in Explorer, the web browser does not update.

To Reproduce

git clone [email protected]:djotto/quartz.git
cd quartz
npm i
npx quartz build --serve
  1. Navigate to http://localhost:8080
  2. Click "Things"
  3. You will see the text "This page is Things/index.md"
  4. Click "Places"

Actual result: You will see the text "This page is Things/index.md"

Expected result: You will see the text "This page is Places/index.md"

If you click on a Content page (eg Unrelated) between the two folder clicks, you get the correct behaviour. Problem only surfaces when navigating between two Folder pages.

Expected behavior

When clicking between Folder pages in Explorer, the content should update.

Desktop (please complete the following information):

  • Quartz Version: HEAD of v4
  • node Version: v22.9.0
  • npm version: 10.8.3
  • OS: Sonoma 14.7 (23H124)
  • Browser Firefox 131.0.2 (64-bit), Chrome 129.0.6668.101, Safari 17.6

Additional context

The only changes I've made on top of v4 for this bug demo are:

diff --git a/quartz.layout.ts b/quartz.layout.ts
index 4a78256..1742edc 100644
--- a/quartz.layout.ts
+++ b/quartz.layout.ts
@@ -27,7 +27,12 @@ export const defaultContentPageLayout: PageLayout = {
     Component.MobileOnly(Component.Spacer()),
     Component.Search(),
     Component.Darkmode(),
-    Component.DesktopOnly(Component.Explorer()),
+    Component.DesktopOnly(Component.Explorer({
+      folderClickBehavior: "link",
+      filterFn: (node) => {
+        return !["People"].includes(node.name);
+      }
+    })),
   ],
   right: [
     Component.Graph(),

djotto avatar Oct 20 '24 03:10 djotto

Thanks for the report. I'll look into it.

saberzero1 avatar Oct 20 '24 08:10 saberzero1

@saberzero1 check folderpage and tagpage behavior regarding filters.

saberzero1 avatar Oct 20 '24 09:10 saberzero1

@saberzero1 I've updated the example to include tag pages. Behaviour also occurs on tag pages.

djotto avatar Oct 20 '24 10:10 djotto

fixed now

jackyzha0 avatar Mar 10 '25 15:03 jackyzha0