quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.81k stars 309 forks source link

Issue with dashboard navigation after clicking external links online #9411

Open olivroy opened 5 months ago

olivroy commented 5 months ago

Bug description

Navigation after opening external dashboard (hosted on Quarto-pub) link doesn't work well.

---
title: title
format: dashboard
execute: 
  echo: false
---

# Title

## Row 

<https://github.com/quarto-dev/quarto-cli/issues/9411>

See it there.

Not a quartopub issue 

## Row

# Another page

## Row 

<https://github.com/quarto-dev/quarto-cli/issues/9411>

## Another

```{r}
ggplot2::ggplot()

### Steps to reproduce

1. Go to https://grrrck.quarto.pub/mynorfolk-dash/#about

2. Click on a link
 (source code for example)

3. Navigate back in browser (Alt + left)

### Expected behavior

I would expect that going back to the page (With the back button)

### Actual behavior

Get a blank page.
![image](https://github.com/quarto-dev/quarto-cli/assets/52606734/7a0af736-fb65-4c26-980b-f7f5c47275fe)

### Your environment

Web. I tested with MS Edge and Chrome

But it happened also for one of my dashboard created with Quarto 1.4.553 on WIndows and published on Quarto-pub.

IF I refresh, the correct page shows correctly again

With a local dashboard, I can't reproduce it. Only if published to QuartoPub at the moment.

gallery of dashboards to test other oneshttps://quarto.org/docs/dashboards/examples/

but got the same from https://isabelizimm.me/vetiverdashboard/# and https://mine-cetinkaya-rundel.github.io/ld-dashboard/

I can reproduce locally with quarto preview in RStudio

### Quarto check output

Quarto 1.4.553 [>] Checking versions of quarto binary dependencies... Pandoc version 3.1.11: OK Dart Sass version 1.69.5: OK Deno version 1.37.2: OK [>] Checking versions of quarto dependencies......OK [>] Checking Quarto installation......OK Version: 1.4.553 Path: C:\~\AppData\Local\Programs\RStudio\resources\app\bin\quarto\bin CodePage: 1252

[>] Checking tools....................OK TinyTeX: (external install) Chromium: (not installed)

[>] Checking LaTeX....................OK Using: TinyTex Path: C:\~\AppData\Roaming\TinyTeX\bin\windows\ Version: 2024

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....(None)

  Unable to locate an installed version of Python 3.
  Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........OK Version: 4.3.2 Path: C:/PROGRA~1/R/R-43~1.2 LibPaths:

[>] Checking Knitr engine render......OK

cscheid commented 5 months ago

This behavior is by design - the navigation changes the URL so that you can share a link to a specific state of the dashboard panes. Is that what you're referring to?

olivroy commented 5 months ago

Enregistrement-20240418_154352.webm

I mean this. Is this expected?

https://quarto.org/docs/output-formats/html-basics.html#external-links

Even if my link is external i.e.

[link](https://github.com/quarto-dev/quarto-cli/issues/9411){.external target="_blank"}

there seems that there is a redirection to a white page before opening the link, which makes navigation back and forth (between outside link and dashboard) (Navigation within the dashboard is fine, as there is no need for the browser nav buttons)

If this is expected, is there a workaround to be able to use nav buttons correctly?

Here is what is going on locally with quarto preview. As you can see after clicking on the link (which opens correctly in external browser, the page becomes white. Need to click on the page title to refresh

Enregistrement-20240418_155117.webm

cscheid commented 5 months ago

I see what you mean. The external link behavior is definitely not good.