Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,21 @@ export class EntityPopupComponent {
.map(([label, rows]) => ({ label, rows }));
}

// Each answer is a pathway; one new or updated in this release says which
// (releaseStatus, as Event has it), which the popup does not show.
private readonly pathways = rxResource({
params: () => (this.tab() === 'pathways' ? this.target()?.stId : undefined),
stream: ({ params }) =>
params
? this.http
.get<
{ stId: string; displayName: string; speciesName: string; hasDiagram?: boolean }[]
{
stId: string;
displayName: string;
speciesName: string;
hasDiagram?: boolean;
releaseStatus?: string;
}[]
>(`${CONTENT_SERVICE}/data/pathways/low/entity/${params}`)
.pipe(
map((items): PopupGroup[] => [
Expand Down
8 changes: 4 additions & 4 deletions projects/pathway-browser/src/app/services/download.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ export class DownloadService {
* button that does nothing: no file, no message, and no reason to think the
* click had registered.
*
* Found on the one illustration a browser refuses to rasterise -- Circadian
* clock embeds HTML in a `<foreignObject>`, which taints the canvas -- where
* the reason was known, specific and useful, and went to a console nobody
* had open.
* Found on an illustration a browser refused to rasterise -- Circadian
* clock, until Release 98, embedded HTML in a `<foreignObject>`, which
* taints the canvas -- where the reason was known, specific and useful, and
* went to a console nobody had open.
*/
readonly failure = signal<string | null>(null);

Expand Down
11 changes: 6 additions & 5 deletions projects/pathway-browser/src/app/services/ehld.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,12 @@ export class EhldService {
// then throws a SecurityError, several frames away from the cause, and the
// render service answered a bare "Tainted canvases may not be exported".
//
// One illustration does this: Circadian clock (R-HSA-9909396) carries six,
// each a div with a conic-gradient, which is how a drawing tool exports a
// gradient SVG has no primitive for. The other 217 have none. There is no
// way to rasterise it in a browser -- so this says which file and why,
// rather than leaving a stack trace to be traced back.
// Circadian clock (R-HSA-9909396) carried six until Release 97, each a div
// with a conic-gradient, which is how a drawing tool exports a gradient SVG
// has no primitive for; Release 98's copy was redrawn without them. Artwork
// exported that way again cannot be rasterised in a browser, so this says
// which file and why, rather than leaving a stack trace to be traced back.
// The e2e test plants one to keep this path tested.
if (markup.includes('<foreignObject')) {
throw new Error(
'this illustration embeds HTML in a <foreignObject>, which a browser refuses to ' +
Expand Down
8 changes: 2 additions & 6 deletions scripts/check-har.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,16 @@ const HAR_DIR = path.join(import.meta.dirname, '..', 'e2e', 'har');
const ABANDONED = [
{
recording: /^legacy-links--legacy-pathway-links-/,
// The pathways these tests open, by dbId or stable id, and the hierarchy.
request:
/\/data\/(query\/enhanced\/v2\/|event\/[^/]+\/ancestors|detail\/[^/]+\/locationsInPWB|eventsHierarchy\/9606\?)/,
/\/data\/(query\/enhanced\/v2\/(R-HSA-)?(1280218|202733)\?|event\/(R-HSA-)?(1280218|202733)\/ancestors|detail\/R-HSA-(1280218|202733)\/locationsInPWB|eventsHierarchy\/9606\?)/,
why: 'each test backs out of the pathway browser while the pathway is still loading, and a dbId is swapped for its stable id mid-load',
},
{
recording: /^legacy-links--legacy-fragments-that-are-only-settings-diagram-dbid-/,
request: /\/data\/query\/enhanced\/v2\/9006934\?/,
why: 'the page swaps the dbId for its stable id mid-load',
},
{
recording: /^analysis-results--a-result-that-cannot-be-loaded-/,
request: /\/data\/query\/enhanced\/v2\/R-HSA-109582\?/,
why: 'a result that is gone takes analysis= off the address, which reloads the details',
},
{
recording:
/^diagram-load-errors--the-analysis-overlay-(says-so-when-the-pathway-s-results-can|a-hit-pathway-s-matches-say-so-when-th)/,
Expand Down
2 changes: 1 addition & 1 deletion tools/api-types/calls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const CALLS: Call[] = [
{ file: `${PB}/diagram/entity-popup/entity-popup.component.ts`, method: 'molecules', http: 'GET', route: '/data/query/enhanced/{id}', type: 'any' },
{ file: `${PB}/diagram/entity-popup/entity-popup.component.ts`, method: 'molecules', n: 2, http: 'GET', route: '/data/query/{id}', type: 'any' },
{ file: `${PB}/diagram/entity-popup/entity-popup.component.ts`, method: 'annotated', http: 'GET', route: '/data/participants/{id}/referenceEntities', type: 'ReferenceEntityIds[]' },
{ file: `${PB}/diagram/entity-popup/entity-popup.component.ts`, method: 'pathways', http: 'GET', route: '/data/pathways/low/entity/{id}', type: '{ stId: string; displayName: string; speciesName: string; hasDiagram?: boolean }[]' },
{ file: `${PB}/diagram/entity-popup/entity-popup.component.ts`, method: 'pathways', http: 'GET', route: '/data/pathways/low/entity/{id}', type: '{ stId: string; displayName: string; speciesName: string; hasDiagram?: boolean; releaseStatus?: string }[]' },
{ file: `${PB}/diagram/entity-popup/entity-popup.component.ts`, method: 'interactors', http: 'GET', route: '/interactors/static/molecule/{acc}/details', type: 'any', gap: 'the recordings never open an interactor popup' },
{ file: `${PB}/interactors/services/interactor.service.ts`, method: 'fetchInteractorData', http: 'POST', route: ['/interactors/static/molecules/details', '/interactors/psicquic/molecules/{resource}/details'], type: 'Interactors' },
{ file: `${PB}/interactors/services/interactor.service.ts`, method: 'getCustomInteractorsByAcc', http: 'GET', route: '/interactors/static/molecule/enhanced/{acc}/details', type: 'CustomInteraction[]' },
Expand Down
2 changes: 1 addition & 1 deletion tools/api-types/known-problems.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"GET /data/participants/{id}/referenceEntities as ReferenceEntityIds[]": 1108,
"GET /data/participants/{id}/referenceEntities as ReferenceEntity[]": 138,
"GET /data/pathways/low/entity/{id} as Pathway[]": 194,
"GET /data/pathways/low/entity/{id} as { stId: string; displayName: string; speciesName: string; hasDiagram?: boolean }[]": 1060,
"GET /data/pathways/low/entity/{id} as { stId: string; displayName: string; speciesName: string; hasDiagram?: boolean; releaseStatus?: string }[]": 1059,
"GET /data/pathways/top/{taxId} as TopLevelPathway[]": 170,
"GET /data/person/{id} as Person": 42,
"GET /data/person/{id} as { displayName?: string }": 15,
Expand Down
Loading