-
Notifications
You must be signed in to change notification settings - Fork 53
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
PTV-1315 Fix AlignmentSet viewer #2501
Open
eapearson
wants to merge
57
commits into
develop
Choose a base branch
from
PTV-1315-AlignmentSet-viewer
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
6ca7e5c
Initial fix for PTV-1315
eapearson c918671
Merge remote-tracking branch 'upstream/develop' into fix-PTV-1315
eapearson acb152e
add AMD support for React; tried to use the commented-out shim, but c…
eapearson 91ae02c
port preact components to react
eapearson bd57026
remove commented-out preact from page
eapearson bb54451
remove unused variables, move some styles to stylesheet, refactor pro…
eapearson d1885db
update npm deps (med security warning), upgrade testing chrome to 93,…
eapearson fb5e493
address code styling issues
eapearson d505ca6
move mswUtils to a better home, and adjust import paths
eapearson 0bfc5a9
silly tabs
eapearson 2b80522
add direct suppport for react and react-dom, rather than using global…
eapearson e4a5e2b
refactor set viewer code
eapearson 8f6bb25
tests simple react component, stub test for another
eapearson 7d49f12
add peer dependency stylelint; change name of install-npm -> install-…
eapearson cd58cf5
move styles to stylesheet
eapearson af4524a
typo
eapearson eeaa4bf
move test utils and adjust, and make absolute, imports
eapearson cff7f08
add more tests, test data, and light refactoring for testability
eapearson abd0057
add shebang to shell script
eapearson de8fc7e
refactor naming, keep truckin' on docs
eapearson 5dc8ef6
update usage of list_objects to use list of workspaces; tests pass ag…
eapearson 11e1f54
removed comments, have been moved to a README
eapearson 505b59f
use safer setState
eapearson 6559f7b
remove now-unused arg
eapearson 5ae7ca1
improve file comment
eapearson f3d16aa
codacy now uses "remark" for formatting, so switch to that and reform…
eapearson c79a888
improve select control display with very long labels
eapearson b6e0e90
fix error display, add "loading" text, remove data generation logging
eapearson 0412355
add tests for all viewer states;
eapearson 8364701
add prop-types, refactor components to suit, refactor tests to suit t…
eapearson 5b4a457
make codacy happier through simplification?
eapearson f7cc9dd
codacy formatting changes
eapearson 4a382e4
replace node-module installer shell script with javascript script
eapearson 7ae5fc8
move type to module mapping into shared function, remove commented ou…
eapearson 687a147
improve KBaseSets viewer README
eapearson 4c3e873
rename components
eapearson 0369e62
backport list_objects fix from truss branch
eapearson e30fc6b
more backporting list_workspaces changes (fixes to the previous chang…
eapearson 86fa014
change name of install-node-modules to copy-node-modules-to-ext-modules
eapearson c9feac9
Add specific error message for unsupported type and object; add more …
eapearson cb89ffe
tidying up tests.
eapearson a819699
add tsets for SetTypeResolver
eapearson 43ee556
refactor react component rendering into utils
eapearson c241c8a
update release notes
eapearson 6170784
re-cherrypick list_objects changes in prep for merge from canonical repo
eapearson bab2335
Merge remote-tracking branch 'upstream/develop' into PTV-1315-Alignme…
eapearson d56e40e
udpate release notes
eapearson 9ea17c4
styling
eapearson d1d796f
bootstrap select -> inline
eapearson a690d54
add more information to "unknown error"; should never occur
eapearson a8a0d79
Merge remote-tracking branch 'origin/develop' into PTV-1315-Alignment…
eapearson d2c482c
sync from origin, add back in what we need
eapearson b07e84d
catch up dependencies post-merge; I don't trust package.json post mer…
eapearson 5a01d4a
move unit test utils into main amd module file tree to remove warning…
eapearson 152e8a6
remove unit test utils pattern
eapearson 4ce8d52
restore script name changed in sync from origin
eapearson a904655
make tab test more reliable
eapearson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "stylelint-config-standard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
kbase-extension/static/kbase/css/widgets/function_output/KBaseSets/SetElementLoader.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.KBaseSets-SetElement { | ||
position: relative; | ||
} | ||
|
||
.KBaseSets-SetElement .LoadingOverlay { | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
top: 0; | ||
bottom: 0; | ||
background-color: rgba(255, 255, 255, 0.5); | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
color: rgba(150, 150, 150, 1); | ||
} | ||
|
||
.KBaseSets-SetElement table th { | ||
width: 20%; | ||
font-weight: bold; | ||
text-align: left; | ||
} |
15 changes: 15 additions & 0 deletions
15
...e-extension/static/kbase/css/widgets/function_output/KBaseSets/SetElements/SetElement.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
table.SetElement tbody tr { | ||
background: none; | ||
} | ||
|
||
table.SetElement tbody tr th { | ||
color: rgb(100 100 100); | ||
} | ||
|
||
table.SetElement tbody tr:nth-child(odd) { | ||
background: none; | ||
} | ||
|
||
table.SetElement tbody tr:hover { | ||
background: none; | ||
} |
32 changes: 32 additions & 0 deletions
32
kbase-extension/static/kbase/css/widgets/function_output/KBaseSets/SetViewer.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.KBaseSets-SetViewer .HeaderTable { | ||
display: flex; | ||
flex-direction: column; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.KBaseSets-SetViewer .HeaderTable > .Row { | ||
flex: 0 0 auto; | ||
display: flex; | ||
flex-direction: row; | ||
margin: 4px 0; | ||
align-items: center; | ||
height: 1.5em; | ||
} | ||
|
||
.KBaseSets-SetViewer .HeaderTable > .Row > .Col:nth-child(1) { | ||
font-weight: bold; | ||
color: rgba(100, 100, 100); | ||
flex: 0 0 8em; | ||
} | ||
|
||
.KBaseSets-SetViewer .HeaderTable > .Row > .Col:nth-child(2) { | ||
flex: 1 1 0; | ||
} | ||
|
||
/* tweak bootstrap styling here */ | ||
.KBaseSets-SetViewer select.form-control { | ||
margin-left: 0; | ||
margin-right: 0; | ||
padding: 4px; | ||
width: 100%; | ||
} |
48 changes: 48 additions & 0 deletions
48
kbase-extension/static/kbase/js/react_components/ErrorMessage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
define([ | ||
'react' | ||
], ( | ||
React | ||
) => { | ||
'use strict'; | ||
|
||
const { createElement: e, Component } = React; | ||
|
||
/** | ||
* A class to display an error message. | ||
* | ||
* This is a simple error viewer. It does not show extended information like | ||
* stacktrace, or richer data from Service clients, like the error code. | ||
* It should handle service client errors, any error based on the Error class, | ||
* any object which has a "message" property, and a simple string. | ||
*/ | ||
class ErrorMessage extends Component { | ||
render() { | ||
const error = this.props.error; | ||
let message; | ||
if (typeof error === 'object' && error !== null) { | ||
if (error.error && error.error.message) { | ||
// handle errors thrown by kbase service clients | ||
message = error.error.message; | ||
} else if (error.message) { | ||
// Standard Error objects or descendants, or those which act like one in this regard. | ||
message = error.message; | ||
} else { | ||
message = 'Unknown Error (incompatible object)'; | ||
} | ||
} else if (typeof error === 'string') { | ||
message = error; | ||
} else { | ||
message = `Unknown Error (incompatible type ${typeof error})`; | ||
} | ||
|
||
return e('div', { | ||
className: 'alert alert-danger' | ||
}, [ | ||
'Error: ', | ||
message | ||
]); | ||
} | ||
} | ||
|
||
return ErrorMessage; | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could remove both the
else
s and have the default text formessage
beUnknown Error
-- save a bit of space and repetition