Commit e1aa29a
committed
fix: detail-page links stop going to dev.reactome.org + leave the pathway-browser cleanly when an author is clicked
Three bugs on the detail-page description panel (which is shared between
WebsiteAngular's /content/detail/* and the standalone PathwayBrowser app):
1. The dark-blue arrow icon in Events / Parent pathway / Components rows
navigated to https://dev.reactome.org/... instead of the host the
page was served from. environment.host in pathway-browser/environments/
environment.ts was hardcoded to 'https://dev.reactome.org'; compute it
from window.location.origin at module load so every URL built from it
(CONTENT_DETAIL, CONTENT_SERVICE, ANALYSIS_SERVICE, DOWNLOAD, OVERLAYS,
RESTFUL_API, CONTENT_QUERY) follows the current site. Same pattern as
the earlier swagger and search same-origin fixes.
2. Author names under "Authorship" linked to /content/detail/<personDbId>,
which hits the generic DetailComponent and renders an "entity not
found" view -- Person records belong on /content/detail/person/<id>.
3. The three template links that hopped from pathway-browser to a
/content/detail route used [routerLink]. That works when the
description-tab is embedded inside WebsiteAngular's DetailComponent
(same SPA, same router), but the standalone PathwayBrowser app
(/beta/PathwayBrowser/ ...) is a separate Angular bundle with its
own router that doesn't define /content/detail/* routes. The
RouterLink fired, the URL changed, but PathwayBrowser's router
matched no route so its components never tore down -- the user saw
the new Person page rendered on top of leftover PathwayBrowser DOM
("Collapse all", download icons, etc).
Switch all three links (Details-page button, inline PE link, author
link) to plain [href]. Browser navigation is forced, which correctly
unloads whichever Angular app was in front and loads WebsiteAngular
at the new URL. The embedded use case eats a full reload instead of
an SPA transition, which is acceptable for "leave the diagram"
navigations.
Verified via Playwright on beta: a click on the first author from
/content/detail/R-HSA-164843 lands on /content/detail/person/73870 with
the person header rendered, zero leftover pathway-browser viewport DOM
in the result page. Also confirmed no remaining dev.reactome.org refs
in runtime source via grep, and that the existing /content/toc and
/content/doi author renderers already use the /person/ route.1 parent 1a9b924 commit e1aa29a
2 files changed
Lines changed: 12 additions & 4 deletions
File tree
- projects/pathway-browser/src
- app/details/tabs/description-tab
- environments
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
1 | 9 | | |
2 | 10 | | |
3 | | - | |
| 11 | + | |
4 | 12 | | |
5 | 13 | | |
6 | 14 | | |
| |||
0 commit comments