dvc.org icon indicating copy to clipboard operation
dvc.org copied to clipboard

VS Code Extension redirect is buggy

Open jorgeorpinel opened this issue 2 years ago • 7 comments

Report

  • If you go to https://dvc.org/doc/install/ide-plugins#visual-studio-code and click on DVC Extension link

    Install the DVC Extension for VS Code to use DVC right from your IDE!

  • you will be redirected to the 404 not found page and then redirected to the VS Code DVC extension page.

  • [x] the direct link is working fine

But it's the issue with the internal redirects as pointed by @rogermparent

Weird interaction with redirects that look like local pages, which are handled differently by the Gatsby's SPA via the Link component

  • [ ] Find a way to ensure that links to local page redirects are recognized as such and treated as external links

jorgeorpinel avatar Jan 19 '23 04:01 jorgeorpinel

Cc @iterative/websites

jorgeorpinel avatar Jan 19 '23 04:01 jorgeorpinel

Weird interaction with redirects that look like local pages, which are handled differently by the Gatsby's SPA via the Link component. From what I can see, we'll have to:

  • Find a way to ensure that links to local page redirects are recognized as such and treated as external links (either automatically or manually, with pros/cons to each)
  • Possibly fight with gatsby-plugin-catch-links because it's kind of kludgy and invasive.

It's a bit late for me, but I can get a patch in early tomorrow if it's not already done.

rogermparent avatar Jan 19 '23 04:01 rogermparent

Sounds good. I don't think it's critical or anything, but it sure looks like a bug. Feel free to relabel though.

jorgeorpinel avatar Jan 19 '23 06:01 jorgeorpinel

I remember fixing a similar issue mentioned for cml.dev.

  • https://github.com/iterative/cml.dev/issues/346#issuecomment-1283932384

But, I don't see that issue with dvc.org. Could it be a cache issue?

  • Firefox Screenshot 2023-01-19 at 14 24 53

  • Chrome Screenshot 2023-01-19 at 14 25 05

  • Also working fine with Safari

yathomasi avatar Jan 19 '23 08:01 yathomasi

Works OK after force-reload... 🤦🏼 Sorry for false alarm!

jorgeorpinel avatar Jan 19 '23 10:01 jorgeorpinel

The issue seems genuine. Since it's not the direct link issue similar to cml.dev, so I guess it's not critical as mentioned. I have updated the description and assigned the priority accordingly.

yathomasi avatar Jan 19 '23 11:01 yathomasi

I'm pretty sure it's just a generic behavior that'll happen using Gatsby's Link on things that aren't actually local links, but our wrapper Link component only reads the URL when making that decision. We have optOutPreRedirect on these markdown links, which would otherwise automatically transform the links into the absolute form, which would solve the problem but in a way I assume we also don't really want because we would never see the redirect in the links, and at that point just replacing the redirect with absolute links would work the same.

As far as gatsby-plugin-catch-links, it intercepts all links and applies the same behavior, so that's why I expect it to be a problem after the first issue is solved, but both problems need to be solved in order to properly use these redirects. I think I remember a long while ago dealing with this for cml.dev when there was a link for that in the sidebar, but things have changed a lot since then.

rogermparent avatar Jan 19 '23 16:01 rogermparent