Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Page] When navigating through subfolder lists in the page contents section, links truncate subdirectory paths #1572

Open
blacklightpy opened this issue Nov 6, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@blacklightpy
Copy link

Describe the bug
In my phone, I didn't have the navbar, so I switched to a page by search and tried navigating via the breadcrumbs. The first two clicks worked right, but the third click (reason explained below) took me to a broken link.

Basically the link strips the subdirectory path. That is, if the website is hosted at example.com/subdirectory (the content being at example.com/subdirectory/path1/path2/...), the URL changes into example.com/path1/path2/path3.

This doesn't happen in desktop mode view.

Also, this only happens every third click when navigating subfolders.

That is, I go to any page, then I use breadcrumbs to switch to a folder, then I switch to a subfolder, and then switch to any note or subfolder, I'll see that the links are broken.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a quartz website with at least three levels of nesting. That is, Folder 1> Folder 2 > File X / Folder 3
  2. Go to a file under Folder 1 by search (e.g. Folder 1/Folder 2/File Y)
  3. Switch to Folder 1 via breadcrumbs
  4. Switch another folder, Folder 2 via breadcrumbs or contents list
  5. Switch to any other file or folder
  6. See that the link breaks

Expected behavior
Link doesn't break

Screenshots and Source

  1. Me at a random page
    Screenshot_20241106-082446_Chrome

  2. I switched to 🔮 World Building folder
    Screenshot_20241106-082453_Chrome

  3. I switched to the Science and Engineering subfolder (notice that it's okay, and I have the domain subfolder path (/notes/) in the URL
    markup_3196

  4. I switched to the Science Resources subfolder and it breaks (notice that I don't have the domain subfolder path in the URL)
    markup_3197

My website: https://blacklightpy.github.io/notes

Desktop (please complete the following information):

  • Quartz Version: Latest Branch (4.4.0)
  • node Version: 22 (GitHub CI job copied from docs)
  • npm version: "
  • OS: "
  • Browser: Google Chrome on Android
@blacklightpy blacklightpy added the bug Something isn't working label Nov 6, 2024
@saberzero1
Copy link
Collaborator

All breadcrumbs from folderpage seem to exhibit described behavior, even on desktop. Refreshing the page fixes the issue. I suspect a problem determining the root path.

Can you check if this issue gets worse if you are several folders deep? I want to know if deeper levels cut of more of the link.

@blacklightpy
Copy link
Author

It's actually better.

Say I start here: https://blacklightpy.github.io/notes/%F0%9F%94%AE-World-Building/Science-and-Engineering/Physics/Mechanics/Electrodynamics/Optics

I can move back to any number of folders via the breadcrumbs. But if I click a link from the subfolder list, it loads fine, but all the links in the new page, including breadcrumbs lose the /notes path and breaks. so this is not about page depth, just the routing.

@blacklightpy
Copy link
Author

Aha, turns out this isn't just for mobile, I just happened to notice this because I only navigated through the subfolder list in the contents section when I was using the phone. This is a problem in that area.

@blacklightpy blacklightpy changed the title [Mobile] When navigating through mobile view, links truncate subdirectory paths [Page] When navigating through subfolder lists in the page contents section, links truncate subdirectory paths Nov 6, 2024
@blacklightpy
Copy link
Author

This is especially a problem for mobile phones where you can't navigate well without the directory tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants