Code Monkey home page Code Monkey logo

Comments (5)

divyammadhok avatar divyammadhok commented on September 25, 2024 1

Hey @oliviertassinari I can work on resolving this bug. It would be great if you can assign this to me.

from material-ui.

oliviertassinari avatar oliviertassinari commented on September 25, 2024 1

This should be a simple bug to fix but one that will be increasingly more annoying as we improve the use of "layouts" in our docs to improve performance.

@divyammadhok Go ahead, thanks

from material-ui.

divyammadhok avatar divyammadhok commented on September 25, 2024

Hey @oliviertassinari I added a PR for this issue - 41128
Now there were 2 approaches - either track for page changes and close the popper or pass the close callback through props and call it whenever the links are clicked but the 2nd approach felt a bit more manual to handle. Every time a new link / component is added we would need to handle for this handleClose callback so I instead went ahead with the 1st approach by tracking page changes.

from material-ui.

oliviertassinari avatar oliviertassinari commented on September 25, 2024

Same bug, the user feedback is broken, it should close when going to the same area:

Screen.Recording.2024-02-18.at.15.02.15.mov

https://mui.com/material-ui/getting-started/


Off-topic wonder if we shouldn't open in a new tab as the Google app switcher works:

SCR-20240218-njlx

from material-ui.

divyammadhok avatar divyammadhok commented on September 25, 2024

@oliviertassinari
Ah Gotcha, so for the same tab as the opened route we need it to close, then I believe the best path forward would be to pass an event to close it whenever it is clicked and treat every item as a close button.


Yeah, but for Google app switcher I believe the motivation is that it's possible a user is editing on the current tab but for MUI docs it's more of a readonly documentation, so not sure, if opening in new tab good for UX. Also you can check this accessibility guideline for redirection in new tab https://www.w3.org/TR/WCAG20-TECHS/G201.html Ideally from a better accessibility perspective it's advised to open in same tab as opening in new tab takes away from the ability to use back to continue where they were previously.

Edit: Kindly check the PR once more, have updated the logic.

from material-ui.

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.