Skip to content

Commit

Permalink
feat: Update styling [PT-187736835]
Browse files Browse the repository at this point in the history
- Moved Data Trial experiment to the first experiment in the list
- Changed experiment colors so that the icon colors are specified in the experiment and not in the code
- Added permanent border around experiment name in header
- Update time series sensor header to use svg sparkgraph
- Added input borders in tables
  • Loading branch information
dougmartin committed Jun 20, 2024
1 parent cacc372 commit 2d11532
Show file tree
Hide file tree
Showing 26 changed files with 413 additions and 338 deletions.
8 changes: 4 additions & 4 deletions cypress/supports/elements/ExperimentSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ class ExperimentSetup {
}

getNameInput() {
return cy.get('.experiment-wrapper-module-editing-vortex input').focus()
return cy.get('.experiment-wrapper-module-name-vortex input').focus()
}

getExperimentNameSpan() {
return cy.get('.experiment-wrapper-module-nameDisplay-vortex')
return cy.get('.experiment-wrapper-module-name-vortex')
}

getExperimentName(name) {
return cy.get('.experiment-wrapper-module-nameDisplay-vortex').contains(name)
return cy.get('.experiment-wrapper-module-name-vortex').contains(name)
}

getStudySiteDropDown() {
Expand All @@ -72,7 +72,7 @@ class ExperimentSetup {
// App Header

getSubheader(subheader) {
return cy.get('.experiment-wrapper-module-headerTitle-vortex').contains(subheader)
return cy.get('.experiment-wrapper-module-name-vortex').contains(subheader)
}

}
Expand Down
20 changes: 20 additions & 0 deletions src/authoring-app/utils/experiment-authoring-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,26 @@
"examples": [
"SI"
]
},
"iconColor": {
"$id": "#/properties/metadata/properties/iconColor",
"type": "string",
"title": "The IconColor Schema",
"description": "Icon color for this template.",
"default": "",
"examples": [
"#0f73b8"
]
},
"iconHoverColor": {
"$id": "#/properties/metadata/properties/iconHoverColor",
"type": "string",
"title": "The IconHoverColor Schema",
"description": "Icon hover color for this template.",
"default": "",
"examples": [
"#4b96ca"
]
}
}
},
Expand Down
256 changes: 132 additions & 124 deletions src/data/experiments.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,135 @@
[
{
"version": "1.0.0",
"metadata": {
"uuid": "aefb5299-c127-4d84-b7f0-78da389ebecd",
"name": "Data Trial",
"initials": "DT",
"iconColor": "#008a09",
"iconHoverColor": "#40a847"
},
"schema": {
"sections": [
{
"title": "Collect",
"icon": "collect",
"formFields": [
"experimentData"
]
},
{
"title": "Note & Photo",
"icon": "note_and_photo",
"formFields": [
"photo"
]
}
],
"dataSchema": {
"type": "object",
"required": [],
"properties": {
"experimentData": {
"type": "array",
"items": {
"type": "object",
"required": [
"timeSeries"
],
"properties": {
"timeSeries": {
"title": "Readout",
"type": "array"
},
"label": {
"title": "Label",
"type": "string"
}
}
}
},
"photo": {
"title": "Photos",
"type": "array",
"items": {
"type": "object",
"properties": {
"isPhoto": {
"type": "boolean"
},
"localPhotoUrl": {
"type": "string"
},
"remotePhotoUrl": {
"type": "string"
},
"note": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
}
}
}
},
"formUiSchema": {
"customName": {
"ui:icon": "label",
"ui:placeholder": "Time Series Investigation"
},
"note": {
"items": {
"ui:widget": "textarea"
}
},
"experimentData": {
"ui:field": "dataTable",
"ui:dataTableOptions": {
"sensorFields": [
"timeSeries"
],
"filters": [{
"namePrefix": "GDX-"
}]
}
},
"photo": {
"ui:field": "photo"
}
}
},
"data": {
"experimentData": [
{
"label": ""
},
{
"label": ""
},
{
"label": ""
},
{
"label": ""
},
{
"label": ""
}
],
"photo": []
}
},
{
"version": "1.0.0",
"metadata": {
"uuid": "e431af00-5ef9-44f8-a887-c76caa6ddde1",
"name": "Schoolyard Investigation",
"initials": "SI"
"initials": "SI",
"iconColor": "#e0007f",
"iconHoverColor": "#e8409f"
},
"schema": {
"titleField": "studySite",
Expand Down Expand Up @@ -184,7 +309,9 @@
"metadata": {
"uuid": "d27df06a-0997-4c53-8afd-d5dcc627d44f",
"name": "Stream Study",
"initials": "SS"
"initials": "SS",
"iconColor": "#0f73b8",
"iconHoverColor": "#4b96ca"
},
"schema": {
"titleField": "studySite",
Expand Down Expand Up @@ -347,7 +474,9 @@
"metadata": {
"uuid": "df02396f-a3d6-4dc5-bc10-fac4007fb6de",
"name": "Pond Study",
"initials": "PS"
"initials": "PS",
"iconColor": "#d04a06",
"iconHoverColor": "#dc7744"
},
"schema": {
"titleField": "Collect",
Expand Down Expand Up @@ -509,126 +638,5 @@
],
"photo": []
}
},
{
"version": "1.0.0",
"metadata": {
"uuid": "aefb5299-c127-4d84-b7f0-78da389ebecd",
"name": "Record Data Trials",
"initials": "RD"
},
"schema": {
"sections": [
{
"title": "Collect",
"icon": "collect",
"formFields": [
"experimentData"
]
},
{
"title": "Note & Photo",
"icon": "note_and_photo",
"formFields": [
"photo"
]
}
],
"dataSchema": {
"type": "object",
"required": [],
"properties": {
"experimentData": {
"type": "array",
"items": {
"type": "object",
"required": [
"timeSeries"
],
"properties": {
"timeSeries": {
"title": "Readout",
"type": "array"
},
"label": {
"title": "Label",
"type": "string"
}
}
}
},
"photo": {
"title": "Photos",
"type": "array",
"items": {
"type": "object",
"properties": {
"isPhoto": {
"type": "boolean"
},
"localPhotoUrl": {
"type": "string"
},
"remotePhotoUrl": {
"type": "string"
},
"note": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
}
}
}
}
}
},
"formUiSchema": {
"customName": {
"ui:icon": "label",
"ui:placeholder": "Time Series Investigation"
},
"note": {
"items": {
"ui:widget": "textarea"
}
},
"experimentData": {
"ui:field": "dataTable",
"ui:dataTableOptions": {
"sensorFields": [
"timeSeries"
],
"filters": [{
"namePrefix": "GDX-"
}]
}
},
"photo": {
"ui:field": "photo"
}
}
},
"data": {
"experimentData": [
{
"label": ""
},
{
"label": ""
},
{
"label": ""
},
{
"label": ""
},
{
"label": ""
}
],
"photo": []
}
}
]
19 changes: 1 addition & 18 deletions src/mobile-app/components/experiment-picker-item.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
justify-content: flex-start;
}

.icon {
Expand All @@ -26,23 +26,6 @@
background-color: $sensorGreenLight1;
cursor: pointer;
}

&.SS{
background-color: $streamBlue;
&:hover {
background-color: $streamBlueLight1;
cursor: pointer;
}

}
&.SI{
background-color: $sensorGreen;
&:hover {
background-color: $sensorGreenLight1;
cursor: pointer;
}
}

}

.title {
Expand Down
Loading

0 comments on commit 2d11532

Please sign in to comment.