kendraio / kendraio-app

Kendraio App
https://app.kendra.io
MIT License
22 stars 6 forks source link

Stepping Stones: Issue with PDF deep linking on macOS #478

Open halibeanz opened 2 months ago

halibeanz commented 2 months ago

Bug description When clicking on an Action in the Stepping Stones Flow, the last page of the PDF document is what is highlighted instead of the mentioned action.

Upon further research, the link does not resemble what it would look like if it was accessed via Firefox (which is where it currently operates correctly). This issue has come up on both Safari and Google Chrome.

Stepping Stones Bug Stepping Stones link error Stepping Stones action error 2

Reproduction steps

  1. Go to Kendraio App
  2. Click on Flow Cloud
  3. Search for Stepping Stones
  4. Launch Stepping Stones
  5. Scroll down to fourth row
  6. Click on Action 18
  7. See error

Expected behaviour When clicking on the Action number, it should redirect you to the PDF and highlight that specific Action within the document.

Flow Configuration

Runtime environment

lukestanley commented 1 month ago

The cause is that WebKit (used by Safari) supports fragments and provides an empty location hash when it finds one, as per the specification. I am working on a fix that avoids depending on the location hash part.

lukestanley commented 1 month ago

A fix has been made that uses the "search" query parameter instead. https://kendraio.github.io/kendraio-gists/pdf_deep_link.htm?site=https://documents.un.org/api/symbol/access?j=N1039021&t=pdf&search=Action%2018%3A Does this link work on Safari and Google Chrome for you? @halibeanz