Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Bug? You're viewing documentation for a previous version of this software #118

Closed
heitorlessa opened this issue May 28, 2020 · 6 comments
Closed

Comments

@heitorlessa
Copy link

heitorlessa commented May 28, 2020

Hey @trevorblades,

I'm hitting an odd issue that I can't quite reproduce in my own laptop, and I suspect it might be a deployment issue (GitHub pages).

This wasn't happening before I enabled DocSearch but I can't seem to draw a connection, and find it must be something else.

Supporting files/info

Reproducing

It doesn't work for me but somehow happens in other people's browser (chrome, firefox)

  • Visit: https://awslabs.github.io/aws-lambda-powertools-python/
  • Search for “metrics”, click in any result and see if you hit either of these
    • “You’re viewing documentation for a previous version of this software” might appear at the top
    • Side effect: search focus might remain despite you clicking on a result

Any pointers is more than appreciated - Screenshot below

image

@heitorlessa
Copy link
Author

Managed to reproduce it! This only happens when you hit a search result that goes to a sub-directory (not Gatsby) that hosts other HTML files.

If you search for metrics, and select any result that has Module in its subtitle it'll hit this issue.

@heitorlessa
Copy link
Author

I've updated docSearch to no longer show results for non-Gatsby website, and that works.

@trevorblades
Copy link
Contributor

Oh this is an interesting bug either way. Thanks for reporting this. Is your current solution sufficient, or would you ideally still like to surface non-Gatsby results in your search?

@heitorlessa
Copy link
Author

heitorlessa commented May 30, 2020 via email

@heitorlessa
Copy link
Author

Reopening as I've just noticed this also happens when you use footerNavConfig

                footerNavConfig: {
                    'API Reference': {
                        href: 'https://awslabs.github.io/aws-lambda-powertools-python/api/'
                    },
...

If I were to click on the link it causes this issue

image

If I refresh the page after hitting the issue, it works

image

@heitorlessa
Copy link
Author

Reopening as I've just noticed this also happens when you use footerNavConfig

                footerNavConfig: {
                    'API Reference': {
                        href: 'https://awslabs.github.io/aws-lambda-powertools-python/api/'
                    },
...

If I were to click on the link it causes this issue

image

If I refresh the page after hitting the issue, it works

image

I shadowed the docset-switcher after some digging, and I add an explicit target attribute if known -- Full commit here

aws-powertools/powertools-lambda-python@29a6704

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants