From bca20ac41b32a8574849de751efe5f9e3dca3ba4 Mon Sep 17 00:00:00 2001 From: tmushayahama Date: Mon, 6 Jan 2025 17:50:40 -0800 Subject: [PATCH 1/3] Added the newpaper png and fixed ref link --- src/components/genes-panel/genes-panel.scss | 14 +++++++---- src/components/genes-panel/genes-panel.tsx | 26 ++++++--------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/components/genes-panel/genes-panel.scss b/src/components/genes-panel/genes-panel.scss index e6436a1..a8eb321 100644 --- a/src/components/genes-panel/genes-panel.scss +++ b/src/components/genes-panel/genes-panel.scss @@ -1,4 +1,4 @@ -@import "../../scss/mixins"; +@import '../../scss/mixins'; :host { /** @@ -64,7 +64,7 @@ } .process-label { - @include standard-var-styles(process-label) + @include standard-var-styles(process-label); } .activity { @@ -90,11 +90,11 @@ } .gene-product { - @include standard-var-styles(gene-product) + @include standard-var-styles(gene-product); } .function-label { - @include standard-var-styles(function-label) + @include standard-var-styles(function-label); } .function-nodes { @@ -105,7 +105,7 @@ display: flex; align-items: center; margin-bottom: 0.175em; - @include standard-var-styles(node) + @include standard-var-styles(node); } .node:last-child { @@ -125,4 +125,8 @@ } .node-evidence { + .icon { + margin-right: 0.25em; + height: 1em; + } } diff --git a/src/components/genes-panel/genes-panel.tsx b/src/components/genes-panel/genes-panel.tsx index d1f7dd1..c09be57 100644 --- a/src/components/genes-panel/genes-panel.tsx +++ b/src/components/genes-panel/genes-panel.tsx @@ -1,6 +1,8 @@ import { Component, Prop, Element, Event, EventEmitter, Watch, h, Method } from '@stencil/core'; import { State } from '@stencil/core'; -import { Activity, ActivityNode, ActivityNodeType, Cam, Evidence, noctuaFormConfig } from '../../globals/@noctua.form'; +import { Activity, ActivityNode, Cam, Evidence, noctuaFormConfig } from '../../globals/@noctua.form'; + +import newspaperPNG from './assets/newspaper.png'; /** * @part process - Process containers @@ -102,22 +104,6 @@ export class GenesPanel { } } - /** - * Render the references of a GP but does not display "with" field for the moment - * @param gp a gene product object (see graphHandler) - */ - renderGeneReferences(gp) { - return ( - - { - gp.evidences.map(evidence => { - return ev.label).join(",")}> - }) - } - - ) - } - /** * Render the references for a biological context * @param context a biological context (see graphHandler) @@ -127,8 +113,10 @@ export class GenesPanel { { evidences.map(evidence => { - return E + return + newspaper + }) } From 0c78ea70c33c0f22d983bd034673a516be51dc87 Mon Sep 17 00:00:00 2001 From: tmushayahama Date: Mon, 6 Jan 2025 18:07:02 -0800 Subject: [PATCH 2/3] ran build for asset update --- .../genes-panel/assets/newspaper.png | Bin 0 -> 3220 bytes .../genes-panel/assets/newspaper.svg | 37 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/components/genes-panel/assets/newspaper.png create mode 100644 src/components/genes-panel/assets/newspaper.svg diff --git a/src/components/genes-panel/assets/newspaper.png b/src/components/genes-panel/assets/newspaper.png new file mode 100644 index 0000000000000000000000000000000000000000..ebe0b7d13111d5e98175095fa76713d27eda3e3c GIT binary patch literal 3220 zcmeHJ_ct4g7mv-eSBjQCq^hk^HA+zujZq<}8WFVmtdgoyPtX`uySCb~YF897+SrO3 zkD??JJ4R7k?eO&bZ+ze9oO|!NpL_1P=YH-lH`2sdkMj?aKL7v#r-A-Gv-9Y4Ztqwb z&b@|aOx}5*^D@(e0B{4Bmd_JLXRr|%0H}&%KY7dq0MM_Sz|5iN{D1gQf&UW)Y6k(> z^Hq<$&5R!a=oKHD8{c4LQAgb6w$SAhgj!yagz7|H+AhodER_^-H0Y?%^+{jy6j%}sx1Z+|WG{)AUnrB7 zHfOwM$i=0MWMTw`3-B#$k_5mIu(pvBa7Z@r0l@2yah+XR<`EPWOgUqh>9R&xp94W5 zRYR$3Qm`x#=$s?NPsLi+W?VLupaRlPWeZBqDscK#mR9P~tJ_6iCk4f@kdQ7kEod6M z&e_ky6qU|)@Da^-FhK8ge0avwdWmLFWlM{0EuB;KWgPkk-3GuYfxc_AD($&r8S$UL zv0U~$;N@(W2?v^@8dSL=B0yh!n(NVcc2;rr%S`$D-Y^->Y#{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RK7cc`sRKN5g}{yy^I4D zTwoHpMc!m^v`qH&nAAG2jP*V{1DT%sJp-CoG-TuR;RPQ!Y+1C(ZFBajfJBArKTwV&3S`^diF`r^X^g5T13-QeHPlf5?DhL zUh%d#5J|%CLr2RH57k4($va${w=PgYr{&Bq2|vryODbj`Y?5yFI=O${ zUx3lhdTa+8y^o#+ZS@JD4Z@CEauQoKA>MZ?cz-!-3v4@YSFvP@wk+Q9iPz&hL+MNs`ha7dbJ z6z*+eZbBB?S^k)$!cP{x5hm*Z^zHFWWqXE?T9uD#- + + + + Newspaper + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 5467502e377b304cc0d8e8bb9ba05626a0a492bb Mon Sep 17 00:00:00 2001 From: Patrick Kalita Date: Tue, 7 Jan 2025 10:11:31 -0800 Subject: [PATCH 3/3] Use inline SVG instead of asset file for evidence icon --- .../genes-panel/assets/newspaper.png | Bin 3220 -> 0 bytes .../genes-panel/assets/newspaper.svg | 37 ------------------ src/components/genes-panel/genes-panel.scss | 4 +- src/components/genes-panel/genes-panel.tsx | 16 ++++++-- 4 files changed, 16 insertions(+), 41 deletions(-) delete mode 100644 src/components/genes-panel/assets/newspaper.png delete mode 100644 src/components/genes-panel/assets/newspaper.svg diff --git a/src/components/genes-panel/assets/newspaper.png b/src/components/genes-panel/assets/newspaper.png deleted file mode 100644 index ebe0b7d13111d5e98175095fa76713d27eda3e3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3220 zcmeHJ_ct4g7mv-eSBjQCq^hk^HA+zujZq<}8WFVmtdgoyPtX`uySCb~YF897+SrO3 zkD??JJ4R7k?eO&bZ+ze9oO|!NpL_1P=YH-lH`2sdkMj?aKL7v#r-A-Gv-9Y4Ztqwb z&b@|aOx}5*^D@(e0B{4Bmd_JLXRr|%0H}&%KY7dq0MM_Sz|5iN{D1gQf&UW)Y6k(> z^Hq<$&5R!a=oKHD8{c4LQAgb6w$SAhgj!yagz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8CW|%o>S7ET4kz`grWR z>^9+}@C+9wNMV%}MU!tB;8=oWB$1OJt6fElC>KE(NA~mK3wM_44f)J;!%b8LTsd{p znDa+ol1+~j-avNT9P^%bE?g>mw?G+-^>n z?dNZ$a4bv`8Byl&XNjN+rldFb1zgor1E#v;r|o22w48GQetu@5_XS**Rr8e^_mYC6 z1rq}hgGP*bLY1{Y??r-It>qpaCNEw$aDVpp!gU2ZLg~*5n8B&1@tN~_^bpx}BhHk) zQ>a3jyUYSPuq8UC%j|vQN^9t`N=Z|>k+3rFk?UVwZiB!YRK7cc`sRKN5g}{yy^I4D zTwoHpMc!m^v`qH&nAAG2jP*V{1DT%sJp-CoG-TuR;RPQ!Y+1C(ZFBajfJBArKTwV&3S`^diF`r^X^g5T13-QeHPlf5?DhL zUh%d#5J|%CLr2RH57k4($va${w=PgYr{&Bq2|vryODbj`Y?5yFI=O${ zUx3lhdTa+8y^o#+ZS@JD4Z@CEauQoKA>MZ?cz-!-3v4@YSFvP@wk+Q9iPz&hL+MNs`ha7dbJ z6z*+eZbBB?S^k)$!cP{x5hm*Z^zHFWWqXE?T9uD#- - - - - Newspaper - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/components/genes-panel/genes-panel.scss b/src/components/genes-panel/genes-panel.scss index a8eb321..963018c 100644 --- a/src/components/genes-panel/genes-panel.scss +++ b/src/components/genes-panel/genes-panel.scss @@ -125,8 +125,10 @@ } .node-evidence { + text-align: right; .icon { - margin-right: 0.25em; + margin-left: 0.25em; height: 1em; + width: 1em; } } diff --git a/src/components/genes-panel/genes-panel.tsx b/src/components/genes-panel/genes-panel.tsx index c09be57..339666e 100644 --- a/src/components/genes-panel/genes-panel.tsx +++ b/src/components/genes-panel/genes-panel.tsx @@ -2,8 +2,6 @@ import { Component, Prop, Element, Event, EventEmitter, Watch, h, Method } from import { State } from '@stencil/core'; import { Activity, ActivityNode, Cam, Evidence, noctuaFormConfig } from '../../globals/@noctua.form'; -import newspaperPNG from './assets/newspaper.png'; - /** * @part process - Process containers * @part activity - Activity containers @@ -104,6 +102,18 @@ export class GenesPanel { } } + renderReferenceIcon() { + // SVG originally from https://icons.getbootstrap.com/icons/newspaper/ + // Modified to remove the width and height attributes in order to allow the size to be + // controlled via CSS + return ( + + + + + ) + } + /** * Render the references for a biological context * @param context a biological context (see graphHandler) @@ -115,7 +125,7 @@ export class GenesPanel { evidences.map(evidence => { return - newspaper + { this.renderReferenceIcon() } }) }