Skip to content

Fix/pathway browser redirects#49

Closed
el-rabies wants to merge 12 commits into
mainfrom
fix/pathway-browser-redirects
Closed

Fix/pathway browser redirects#49
el-rabies wants to merge 12 commits into
mainfrom
fix/pathway-browser-redirects

Conversation

@el-rabies
Copy link
Copy Markdown
Collaborator

Change Summary:

  • Fixed double click on reacfoam cell
  • Resolved tool-tips position issue
  • Resolved issue where certain diagrams wouldn't display
  • Removed reaction diagram from details tab
  • Fixed breadcrumb home button redirect

@el-rabies el-rabies self-assigned this Mar 30, 2026
@el-rabies el-rabies linked an issue Mar 30, 2026 that may be closed by this pull request
5 tasks
@autofix-troubleshooter
Copy link
Copy Markdown

Hi! I'm the autofix logoautofix.ci troubleshooter bot.

It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃

@EliotRagueneau
Copy link
Copy Markdown
Contributor

EliotRagueneau commented Apr 2, 2026

  • Reaction diagrams are no longer part of the document ✅ , but still part of the TOC on the right, you probably want to change that
  • Some diagrams are still broken, seems like which ends is pointing (needs to have an arrow head) is incorrect:
  • Going back home (to reacfoam) from a diagram freezes the page (can be reproduced by clicking on the little home in the breadcrumbs while being in a diagram), didn't used to happen before the integration in the website, might be something related to the lazy loading of the dependency somehow. Is fixed with the following snippet in ReacfoamComponent, but shouldn't be necessary to use a setTimeout there when it used to work. Might need to work with Stanislaw to understand what's going on there, but seems rather hard to reproduce as a context. From what I could see, the issue is not the data being empty, nor the container not being the right one, but somehow in this new infrastructure, Foamtree needs a bit more delay between Object creation and data initialization, otherwise it get stuck in an endless loops
    effect(() => { // Initialise
      if (!(this.reacfoam.data() && this.foamTree())) return; // Set data whenever it is updated
      setTimeout(() => {
        this.foamTree().set('dataObject', {groups: this.reacfoam.data()!})
      })
      if (untracked(this.correctedSelectedId)) { // Initial select
        this.foamTree().select({groups: untracked(this.correctedSelectedId), keepPrevious: false}) // Preselect the group before relaxation happens to have the selection indicator during relaxation
      }
    });

@el-rabies
Copy link
Copy Markdown
Collaborator Author

[ ] Going back home (to reacfoam) from a diagram freezes the page (can be reproduced by clicking on the little home in the breadcrumbs while being in a diagram), didn't used to happen before the integration in the website, might be something related to the lazy loading of the dependency somehow. Is fixed with the following snippet in ReacfoamComponent, but shouldn't be necessary to use a setTimeout there when it used to work. Might need to work with Stanislaw to understand what's going on there, but seems rather hard to reproduce as a context. From what I could see, the issue is not the data being empty, nor the container not being the right one, but somehow in this new infrastructure, Foamtree needs a bit more delay between Object creation and data initialization, otherwise it get stuck in an endless loops

I am not able to replicate this issue.

@el-rabies
Copy link
Copy Markdown
Collaborator Author

Some diagrams are still broken, seems like which ends is pointing (needs to have an arrow head) is incorrect:

* http://localhost:4200/PathwayBrowser/R-HSA-112307?path=R-HSA-112316&tab=details

* http://localhost:4200/PathwayBrowser/R-HSA-1296071?path=R-HSA-112316&tab=details

I can't seem to figure this issue out. Not exactly sure what is causing the problems in these arrows when other diagrams seems to be working fine. Any ideas @EliotRagueneau ?

adamjohnwright added a commit that referenced this pull request May 20, 2026
…om TOC

Salvaging the still-relevant parts of PR #49 (open since March 30,
since superseded for the description-tab arrow-function form). Two
behaviour changes in diagram.service.ts, plus Eliot's review note:

diagram.service.ts:
- Connectors whose segments are missing endpoints now fall back to
  the underlying nodeP/reactionP positions instead of sourceP/targetP.
  source/target swap for OUTPUT connectors, which was pulling some
  edges the wrong way (Eliot's repro: R-HSA-112307, R-HSA-1296071).
- console.assert near MIN_DIST drops the abs() so the assert reflects
  the actual signed distance (negative d would always pass otherwise).

description-tab.component.ts:
- The `case 'reactionDiagram'` arm of isTOCIncluded picked up the
  same `&& showReactionDiagram()` guard the elements array already
  uses, so reactions whose embedded diagram is suppressed no longer
  leave an orphaned "Reaction Diagram" item in the right-rail TOC
  (Eliot's review comment).

Closes PR #49.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@adamjohnwright
Copy link
Copy Markdown
Contributor

Closing -- the two still-relevant changes from this branch were cherry-picked onto main in 79e2a8e (the nodeP/reactionP edge fallback in diagram.service.ts + dropping the orphaned 'Reaction Diagram' TOC entry). The description-tab arrow-function form was already on main from another commit; the Docker setup is now in the repo via a different path; the other items in the original description either don't appear in the diff or have been addressed independently. Thanks @el-rabies! See main for the merged behaviour.

adamjohnwright added a commit that referenced this pull request May 20, 2026
Two unrelated fixes folded together:

Safari (closes #100):
- .logo-image had `width: min-content`. WebKit treats min-content on
  raster images as the smallest intrinsic dimension, often collapsing
  the logo to zero width. `width: auto` lets the browser scale by the
  PNG aspect ratio against the explicit height, which is what Chrome
  and Firefox already did.

diagram.service edge fallback (#49 follow-up):
- The PR #49 cherry-pick replaced `from ?? sourceP; to ?? targetP;`
  with `from ?? nodeP; to ?? reactionP;`. That helped INPUT direction
  edges with missing segment endpoints, but broke OUTPUT edges --
  Adam observed on R-HSA-1296071 that arrow tips now point at the
  reaction square's centre, hidden by the square itself. Restore the
  source/target fallback (which swaps correctly per connector type)
  and keep the assertion-only Math.abs cleanup from the cherry-pick.
@adamjohnwright adamjohnwright deleted the fix/pathway-browser-redirects branch May 20, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make PathwayBrowser really work in that new context

5 participants