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

👽️ Update GUI to match nested config for C-PAC ≥ v1.8.0 (Phase 1) #76

Merged
merged 68 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
72b2b0e
:bookmark: Bump version
shnizzedy Apr 8, 2021
d596002
:construction_worker: Delete release if already exists
shnizzedy Apr 8, 2021
456a5a4
:construction: WIP Add 1.8 (manual) card
shnizzedy Apr 9, 2021
3f2d993
:construction: Autogenerate tabs
shnizzedy Apr 9, 2021
a38fe32
:art: Generalize tab navigation
shnizzedy Apr 13, 2021
8190ee0
:construction: :recycle: Move logic-in-progress to PipelinePart compo…
shnizzedy Apr 13, 2021
513389b
:construction: :recycle: Generate form inputs based on input type
shnizzedy Apr 14, 2021
8254335
:recycle: Set names on components
shnizzedy Apr 15, 2021
49a5bb8
:art: Start on first tab. Make tabs scroll
shnizzedy Apr 15, 2021
8070694
:coffin: Remove hard-coded components
shnizzedy Apr 15, 2021
c910665
:construction: WIP Make default be 1.8 default
shnizzedy Apr 16, 2021
6a5011c
:adhesive_bandage: Replace all underscores in tabs (not just first)
shnizzedy Apr 19, 2021
7b9dce0
:recycle: Auto-generate ROI paths components
shnizzedy Apr 20, 2021
77a0131
:alien: Parse YAML 1.1 boolean aliases
shnizzedy Apr 20, 2021
54bcfcc
:twisted_rightwards_arrows: Merge develop into enh/refactor-nested
shnizzedy Apr 20, 2021
3a55221
:white_check_mark: Test loadYaml
shnizzedy Apr 21, 2021
3397603
:arrow_up: Upgrade dependencies
shnizzedy May 24, 2021
c9afdf1
:arrow_up: Upgrade material-ui @^4.11.0
shnizzedy May 28, 2021
bb029a9
:alien: Replace deprecated lifecycle
shnizzedy Jun 23, 2021
5d2d416
:lock: Replace UNSAFE_componentWillReceiveProps with componentDidUpdate
shnizzedy Jun 23, 2021
aaf4f6f
:bug: Fix handling Arrays in YAML Boolean function
shnizzedy Jun 24, 2021
1247a83
:recycle: Style dynamic lists
shnizzedy Jun 25, 2021
bb9105b
:lipstick: Set ACPC and NLMF to stay in all caps
shnizzedy Jun 30, 2021
47e13e6
:art: Make lists of On/Off series of switches
shnizzedy Jun 30, 2021
fbf3ab0
:art: Spread same-name props in OnOffSwitches
shnizzedy Jun 30, 2021
4b1adde
:bug: Fix field name nesting
shnizzedy Jun 30, 2021
2c27d94
:lipstick: Add 404 component
shnizzedy Jun 30, 2021
e582121
:art: Make pipeline cards dynamically
shnizzedy Jun 30, 2021
30a0e43
:sparkles: Load default pipeline from GitHub
shnizzedy Jul 2, 2021
cad8816
:sparkles: Load default pipeline from GitHub to GUI
shnizzedy Jul 2, 2021
db95f06
:art: Reactify PipelinePart
shnizzedy Jul 6, 2021
696c88b
:adhesive_bandage: Set version on pipeline cards
shnizzedy Jul 6, 2021
4b426cd
:mute: Remove development `console.log`s
shnizzedy Jul 6, 2021
7262435
fixup! :art: Reactify PipelinePart
shnizzedy Jul 6, 2021
11c3261
:zap: Only render visible Collapse component
shnizzedy Jul 6, 2021
f4d0f1d
:bug: Fix setting ROI path options
shnizzedy Jul 7, 2021
b71f9a7
:bug: Fix ROI path option checkbox persistence
shnizzedy Jul 7, 2021
1260f1e
:sparkles: Add new ROI → Full CRUD for ROI paths
shnizzedy Jul 8, 2021
f22ab29
:recycle: Make download work with new fomrat
shnizzedy Jul 8, 2021
1e928b2
:adhesive_bandage: Drop empty ROI paths from download
shnizzedy Jul 8, 2021
fa0f306
:adhesive_bandage: Add spaces to comma-separated ROI options
shnizzedy Jul 8, 2021
f35f480
:recycle: Persist C-PAC version on update
shnizzedy Jul 8, 2021
883ae39
:zap: Generalize custom text fields for pipeline text fields
shnizzedy Jul 9, 2021
3bb4a35
:sparkles: Keep old default pipeline when updating default
shnizzedy Jul 9, 2021
b7a332d
:art: Make old defaults immutable
shnizzedy Jul 9, 2021
9cc8eed
:recycle: Update upload button for 1.8+
shnizzedy Jul 9, 2021
92cc28e
:recycle: Handle "FROM" key
shnizzedy Jul 9, 2021
26b959e
:triangular_flag_on_post: Temporarily hide 'save' and 'revert' button…
shnizzedy Jul 9, 2021
4491bb6
:wastebasket: Remove deprecated code
shnizzedy Jul 9, 2021
894d215
:rotating_light: Lint CSS
shnizzedy Jul 9, 2021
58865a7
:rotating_light: Lint JS
shnizzedy Jul 9, 2021
615682e
:construction: WIP: handleNew, handleDelete…
shnizzedy Jul 9, 2021
8a294ef
:recycle: CRUD for lists of text fields
shnizzedy Jul 14, 2021
9d7c922
:recycle: Handle Boolean lists
shnizzedy Jul 14, 2021
f5c64d6
:coffin: Remove deprecated code
shnizzedy Jul 15, 2021
f57836b
:memo: Add docstrings for new components
shnizzedy Jul 15, 2021
5124dcb
:children_crossing: Set tab sequence
shnizzedy Jul 16, 2021
0de534e
:adhesive_bandage: Keep values immutable while modifying keys
shnizzedy Jul 16, 2021
c0b5f1c
:bug: Prevent local state from being reverted on save
shnizzedy Jul 16, 2021
7af3bab
:children_crossing: Disable fields in default pipelines
shnizzedy Jul 16, 2021
8ab22c4
:bug: default empty lists to strings
shnizzedy Jul 16, 2021
5031134
:construction: (WIP) Handle Regressors
shnizzedy Jul 16, 2021
a5a5d41
fixup! :construction: (WIP) Handle Regressors
shnizzedy Jul 19, 2021
a1866e9
:recycle: Handle Regressors
shnizzedy Jul 16, 2021
145abb7
:memo: Document Regressor GUI components
shnizzedy Jul 21, 2021
44c965c
:twisted_rightwards_arrows: Merge FCP-INDI:C-PAC_GUI@enh/refactor-nes…
shnizzedy Jul 21, 2021
eabf89c
:bug: Fix double-render on first modification of a newly duplicated p…
shnizzedy Jul 21, 2021
c7e4e18
:construction_worker: 'master' → 'main'
shnizzedy Jul 28, 2021
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
23 changes: 12 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
command: yarn && yarn run link
- run:
command: |
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "production" || echo "development")
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "main" ] && echo "production" || echo "development")
CSC_LINK=file:///tmp/default.p12 yarn run package:mac
- run:
command: mv dist dist-macos
Expand All @@ -48,7 +48,7 @@ jobs:
command: yarn && yarn run link
- run:
command: |
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "production" || echo "development")
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "main" ] && echo "production" || echo "development")
yarn run package:linux
- run:
command: mv dist dist-linux
Expand All @@ -68,12 +68,12 @@ jobs:
command: yarn && yarn run link
- run:
command: |
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "production" || echo "development")
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "main" ] && echo "production" || echo "development")
TARGET=electron yarn run build:renderer
mv ./app/dist dist-web-electron
- run:
command: |
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "production" || echo "development")
export NODE_ENV=$([ "${CIRCLE_BRANCH}" == "main" ] && echo "production" || echo "development")
TARGET=browser yarn run build:renderer
mv ./app/dist dist-web-browser
- persist_to_workspace:
Expand Down Expand Up @@ -104,10 +104,10 @@ jobs:
name: Deploy releases
command: |
VERSION=v`jq -r '.version' package.json`
TAG=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "latest" || echo "nightly")
TAG=$([ "${CIRCLE_BRANCH}" == "main" ] && echo "latest" || echo "nightly")

RELEASE_OPTS=""
if [ "${CIRCLE_BRANCH}" != "master" ]; then
if [ "${CIRCLE_BRANCH}" != "main" ]; then
RELEASE_OPTS="--pre-release"
fi

Expand All @@ -122,7 +122,8 @@ jobs:
git tag "${TAG}"
git push origin "${TAG}" -f

if [ "${CIRCLE_BRANCH}" == "master" ]; then
if [ "${CIRCLE_BRANCH}" == "main" ]; then
github-release delete -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} --tag "${VERSION}" || true
github-release release -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} --tag "${VERSION}" --name "${VERSION}" ${RELEASE_OPTS}
github-release upload -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} --tag "${VERSION}" --name "c-pac_gui-${VERSION}-linux-amd64.deb" --file /tmp/workspace/dist-linux/c-pac_gui_*_amd64.deb
github-release upload -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} --tag "${VERSION}" --name "c-pac_gui-${VERSION}-linux-amd64.snap" --file /tmp/workspace/dist-linux/c-pac_gui_*_amd64.snap
Expand Down Expand Up @@ -159,12 +160,12 @@ jobs:
name: Deploy web-version
command: |
VERSION=v`jq -r '.version' package.json`
TAG=$([ "${CIRCLE_BRANCH}" == "master" ] && echo "latest" || echo "nightly")
TAG=$([ "${CIRCLE_BRANCH}" == "main" ] && echo "latest" || echo "nightly")

git clone --single-branch --branch gh-pages [email protected]:${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git /tmp/repo
cd /tmp/repo

if [ "${CIRCLE_BRANCH}" == "master" ]; then
if [ "${CIRCLE_BRANCH}" == "main" ]; then
rm -Rf /tmp/repo/versions/${VERSION} 2> /dev/null | true
mkdir -p /tmp/repo/versions/${VERSION}
cp -Rf /tmp/workspace/dist-web-browser /tmp/repo/versions/${VERSION}/browser
Expand Down Expand Up @@ -206,7 +207,7 @@ workflows:
filters:
branches:
only:
- master
- main
- develop
requires:
- build-linux
Expand All @@ -216,7 +217,7 @@ workflows:
filters:
branches:
only:
- master
- main
- develop
requires:
- build-web
6 changes: 4 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@
}],
"react/jsx-no-bind": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],
"react/prefer-stateless-function": "off"
"react/prefer-stateless-function": "off",
"unused-imports/no-unused-imports": "error"
},
"plugins": [
"@babel",
"import",
"promise",
"compat",
"react"
"react",
"unused-imports"
],
"settings": {
"import/resolver": {
Expand Down
24 changes: 16 additions & 8 deletions app/app.global.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@

* {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}

html, body { margin: 0; padding: 0; overflow: hidden; }
html,
body { margin: 0; padding: 0; overflow: hidden;
}

body {
position: relative;
Expand All @@ -30,10 +32,11 @@ header#root-header {
}

header#root-header a {
opacity: 1.0;
opacity: 1;
}

header#root-header img, header#root-header a img {
header#root-header img,
header#root-header a img {
max-height: 50px;
box-shadow: #232c39;
}
Expand Down Expand Up @@ -69,3 +72,8 @@ a:hover {
text-decoration: none;
cursor: pointer;
}

div#image_credit {
bottom: 2ex;
position: fixed;
}
28 changes: 28 additions & 0 deletions app/components/404.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React, { Component } from 'react';
import Treachery from 'resources/treachery.jpg';
import { withRouter } from 'react-router-dom';

/** Custom 404 component */
class NotFound extends Component {
render() {
return(
<div id="404">
<h2>The requested pipeline or page could not be found.</h2>
<div>
<img
src={Treachery}
alt="The Treachery of Images: This is not a pipe nor a territory."
id="treachery"
/>
</div><div>
<br/>
<div id="image_credit">
Image credit: "<a href="https://www.flickr.com/photos/10688882@N00/18658146046">The Treachery of Images</a>" by Bill Smith (<a href="https://creativecommons.org/licenses/by/2.0">CC BY 2.0</a>) alluding to <i>The Treachery of Images</i> by Ren&eacute; Magritte.
</div>
</div>
</div>
)
}
}

export default NotFound;
15 changes: 9 additions & 6 deletions app/components/Help.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
Expand All @@ -15,8 +15,8 @@ import {
HelpIcon
} from './icons'


class Help extends React.Component {
/** TODO: Refactor for 1.8+ syntax */
class Help extends PureComponent {
state = {
open: false,
}
Expand Down Expand Up @@ -58,8 +58,8 @@ class Help extends React.Component {
let code = ""

if (type && regex){
// @TODO include other templates
const t = type == "pipeline" ? cpac.pipeline.rawTemplate : ""
// @TODO replace this functionality
const t = '' // type == "pipeline" ? cpac.pipeline.rawTemplate : ""
const lines = t.split('\n')

for (matchedLine in lines) {
Expand Down Expand Up @@ -94,6 +94,8 @@ class Help extends React.Component {
}

const button = (
<>
{/* TODO: fix help
<IconButton
aria-label="Help"
disableRipple
Expand All @@ -103,7 +105,8 @@ class Help extends React.Component {
style={{ buttonStyle, ...rootStyle }}
onClick={this.handleOpen}>
<HelpIcon fontSize="small" />
</IconButton>
</IconButton> */}
</>
)

return (
Expand Down
Loading