Coder Social home page Coder Social logo

Comments (17)

alexvoss avatar alexvoss commented on June 7, 2024

Thanks for reporting. This must be a bad interaction between features or between features and customization. Can you please provide a minimal reproduction? If you got the warning that the .zip file was too big to upload to GitHub then chances are what you tried to share was not minimal enough.

We are talking about removing all but the essential content, all customizations and removing things from mkdocs.yml until the problem no longer occurs, then adding back in the last bit removed. This usually provides a good indication of where the problem lies so we can start looking in the right place. This is particularly important in the case of bad interactions. This will help you get a speedy resolution.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 7, 2024

I get a warning that the zip is too big.

Please carefully read our reproduction guide. If your zip file is too big, your reproduction is not minimal, so you likely did not follow the required steps as outlined in our bug reporting guide.

Closing as incomplete. We're happy to reopen once you manage to provide a reproduction, so we can observe the issue, which we currently can't. No double click is necessary, so it boils down to "works on my machine".

from mkdocs-material.

markmcb avatar markmcb commented on June 7, 2024

@squidfunk if you want to ignore the bug, totally up to you. Just letting you know it exists. When I get a chance, I'll try the triage steps to narrow down the source. I see now that I misread it and a new project is required, not an existing one.

When you say you can't observe it, are you saying markmcb.com works for you with single clicks, or just that I didn't follow your process? If you did get it to work on that site, I'd be curious what platform it works for you on. I've tested on Linux Firefox, FreeBSD Firefox, macOS M2 Firefox/Safari, macOS Intel Firefox/Safari/Chrome, Windows 10 Edge. All exhibit the same issue every time, double-click required "sub-hamburger" (to be clear, the hamburger/3-bar menu expands with one click, the sub menus do not).

from mkdocs-material.

alexvoss avatar alexvoss commented on June 7, 2024

I could see the effect on your website (MacOS, both Firefox and Safari). We do need a reproduction so we can play with it locally, know what versions are used, etc. Debugging someone else's site and now knowing these details is not feasible.

from mkdocs-material.

markmcb avatar markmcb commented on June 7, 2024

@alexvoss thanks. Just validating I'm not crazy. Will follow up on using the steps outlined. As for versions, it's fully up-to-date as of last night. I updated everything one last time before reporting. The bug has existed for months, since I first starting using mkdocs-material, I just never got around to reporting it.

from mkdocs-material.

markmcb avatar markmcb commented on June 7, 2024

9.5.6-double-click.zip

It seems navigation.expand is the trigger for the issue.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 7, 2024

@squidfunk if you want to ignore the bug, totally up to you.

I did not mention that at any point. We did not receive something we can work with, and we cannot observe it, so it is currently not considered a bug. I also said, that we will reopen it once you provide the reproduction, which we do now.

When you say you can't observe it, are you saying markmcb.com works for you with single clicks, or just that I didn't follow your process?

No, I did not test your site. There could be dozens of customizations in place which is code that we do not control. I'm sorry, but we can only put time and effort into debugging and improving our platform, not helping you with bugs that only appear on your site, possibly due to customizations. This is why we ask for minimal reproductions. Once we receive them, we're happy to investigate and, if we can observe the problem, fix it ☺️

from mkdocs-material.

markmcb avatar markmcb commented on June 7, 2024

@squidfunk no worries, I get it. We're victims of the same clock. You don't have time for reading terse bug reports, I don't have time for writing proper ones. ;) Hopefully you have what you need now. Thanks for the help!

from mkdocs-material.

markmcb avatar markmcb commented on June 7, 2024

Just for clarity, in case anyone reads the thread and looks to markmcb.com for an example, I have removed that feature from my config and therefore the double-click is no longer required.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 7, 2024

Thanks for providing the reproduction. I'm not able to reproduce this in either Chrome, Firefox or Safari on macOS:

Case 1:

  1. Open http://localhost:8000 on narrow viewport
  2. Click on hamburger menu which opens on single click
  3. Click on "Subpage" which opens on single click

Case 2:

  1. Open http://localhost:8000 on wide viewport
  2. Narrow screen so hamburger shows
  3. Click on hamburger menu which opens on single click
  4. Click on "Subpage" which opens on single click

In both cases, only a single click is necessary in Firefox or Safari. Thus, I cannot reproduce it on my machine, which is weird. Could you please provide exact instructions what you do? The instructions provided are either incomplete or do not reproduce the problem.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 7, 2024

Closing as not reproducible. Happy for more input on this issue, but it's currently not an issue, as we cannot observe the problem you reported. If you or somebody else manages to come up with something that reproduces the problem, we're happy to reopen and investigate.

from mkdocs-material.

markmcb avatar markmcb commented on June 7, 2024

Very strange. I'm on a different computer now and just set it up and reproduced it again (macOS, both Firefox and Safari).

Exact steps copied from cli:

mkdir /tmp/retestbug
cd /tmp/retestbug
python3 -m venv venv
source venv/bin/activate
pip install --upgrade --force-reinstall mkdocs-material
deactivate
source venv/bin/activate
mkdocs new .
mkdir docs/sublevel
touch docs/sublevel/index.md
nvim mkdocs.yml

site_name: My Docs
theme:
  name: material
  features:
  - navigation.expand
plugins:
  - info
 
mkdocs serve

Double-click required. New zip attached using 9.5.7 this time.

9.5.7-double-click-2ndexample.zip

from mkdocs-material.

alexvoss avatar alexvoss commented on June 7, 2024

I have had a look and was able to reproduce it in Safari. A double click was needed when first opening the hamburger menu and clicking on "Sublevel". In Firefox the problem did not seem to occur. This is odd because I think it did show the behavior on the website the OP pointed to (before it was changed).

DoubleClick.mp4

Running Safari Version 17.2.1 (19617.1.17.11.12) on MacOS 14.2.1 (23C71).

from mkdocs-material.

squidfunk avatar squidfunk commented on June 7, 2024

Thanks for checking. I did the exact same – opens immediately on my machine. Interestingly, I'm running Safari 16.1 (can't currently update), so it might be related to this discrepancy. However, since this seems to affect a tiny fraction of users, and is pretty much an edge case (hamburger menu = rather mobile users = touch, only happens on pointer), I'd close it as currently infeasible for investigation. We'll reconsider this once we do the facelift, since navigation mechanics might change.

from mkdocs-material.

soronpo avatar soronpo commented on June 7, 2024

I'm also experiencing this on both my computer and mobile website at https://dfianthdl.github.io/ (EDIT: fixed the website with a workaround I commented below)
Tried both firefox and edge on my computer.
Can someone look to confirm they see it too?

from mkdocs-material.

soronpo avatar soronpo commented on June 7, 2024

I noticed that on my website we have this md-toggle--indeterminate whereas it does not exist on the mkdocs material documentation website. Unclear as to why.
bad

from mkdocs-material.

soronpo avatar soronpo commented on June 7, 2024

I found a workaround. I created a javascript that removes the md-toggle-indeterminate class from the element:

document.addEventListener('DOMContentLoaded', function() {
  const elements = document.querySelectorAll('input.md-nav__toggle.md-toggle--indeterminate');
  elements.forEach(function(element) {
      element.classList.remove('md-toggle--indeterminate');
  });
});

Not sure if I'm doing something bad here or not, but everything seems to workout fine.

from mkdocs-material.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.