Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viz legend #39

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@geneontology/wc-gocam-viz",
"version": "1.0.0",
"version": "1.0.1-beta.1",
"description": "Web component to visualize GO-CAM",
"main": "dist/index.cjs.js",
"module": "dist/index.js",
Expand Down Expand Up @@ -48,4 +48,4 @@
"homepage": "https://github.com/geneontology/wc-gocam-viz#readme",
"author": "Laurent-Philippe Albou",
"license": "BSD-3"
}
}
Binary file modified src/components/gocam-legend/assets/relation/direct_regulation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/components/gocam-legend/assets/relation/has_input.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/components/gocam-legend/assets/relation/has_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/components/gocam-legend/assets/relation/neutral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/components/gocam-legend/gocam-legend.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../scss/mixins";
@import '../../scss/mixins';

:host {
/**
Expand Down Expand Up @@ -28,6 +28,7 @@

.header {
@include standard-var-styles(header);
text-align: center;
font-weight: var(--header-font-weight);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it seems like a minor thing, but I'd prefer to keep the base style as unopinionated as possible. If a client wants this text centered there is already a way for them to accomplish that, as illustrated here:

wc-gocam-viz::part(legend-header) {
text-align: center;
}

margin-bottom: 0.5em;
}
Expand All @@ -43,6 +44,7 @@
img {
display: inline-block;
max-height: 1.25em;
min-width: 3.5em;
max-width: 3.75em;
object-fit: scale-down;
}
Expand All @@ -56,4 +58,4 @@ img {
.item-label {
display: inline-block;
margin-left: 0.5em;
}
}
2 changes: 2 additions & 0 deletions src/components/gocam-legend/gocam-legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import direct_regulation from './assets/relation/direct_regulation.png';
import indirect_regulation from './assets/relation/indirect_regulation.png';
import positive_regulation from './assets/relation/positive_regulation.png';
import negative_regulation from './assets/relation/negative_regulation.png';
import provides_input_for from './assets/relation/provides_input_for.png';
import neutral from './assets/relation/neutral.png';
import has_input from './assets/relation/has_input.png';
import has_output from './assets/relation/has_output.png';
Expand All @@ -22,6 +23,7 @@ const IMAGE_DATA = {
indirect_regulation,
positive_regulation,
negative_regulation,
provides_input_for,
neutral,
has_input,
has_output
Expand Down
3 changes: 3 additions & 0 deletions src/globals/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export const legend = {
}, {
id: 'negative_regulation',
label: 'Negative Regulation'
}, {
id: 'provides_input_for',
label: 'Provides Input For'
}, {
id: 'neutral',
label: 'Unknown/Neutral'
Expand Down
Loading