generated from allen-cell-animated/github-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/ssot refactor #150
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e07c9c6
use object instead of string as single source of truth
interim17 2decf90
Merge branch 'feature/show-precomputed-results-tweaks' of https://git…
interim17 3a02c07
use displayName
interim17 ed152a6
add second call of editRecipe for gradient value
interim17 9de4abf
move building current recipe object from util into selector
interim17 656b14a
Merge branch 'main' of https://github.com/mesoscope/cellpack-client i…
interim17 faf266d
revert to using utility to build recipe objects
interim17 8f5f11a
add documenting comment to buildRecipeObject
interim17 98e37c5
Merge branch 'main' of https://github.com/mesoscope/cellpack-client i…
interim17 f6f6dca
rename and adjust typing of recipe object utility
interim17 67eecdf
Merge branch 'main' of https://github.com/AllenCell/cellpack-client i…
meganrm 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -7,12 +7,11 @@ import { | |
| returnOneElement, | ||
| } from "./formattingUtils"; | ||
| import "./style.css"; | ||
| import { ViewableRecipe } from "../../types"; | ||
|
|
||
| interface JSONViewerProps { | ||
| title: string; | ||
| content: string; | ||
| isEditable: boolean; | ||
| onChange: (value: string) => void; | ||
| content?: ViewableRecipe; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The The recipe content doesn't come down as string anymore but the selector can return undefined, so made it optional with the truthy check on ln21-22 retained. |
||
| } | ||
|
|
||
| const JSONViewer = (props: JSONViewerProps): JSX.Element | null => { | ||
|
|
@@ -22,8 +21,6 @@ const JSONViewer = (props: JSONViewerProps): JSX.Element | null => { | |
| return null; | ||
| } | ||
|
|
||
| const contentAsObj = JSON.parse(content); | ||
|
|
||
| // descriptions for top level key-value pairs | ||
| const descriptions: DescriptionsItemProps[] = []; | ||
| // trees for nested objects like 'objects', 'composition', 'gradients' | ||
|
|
@@ -44,7 +41,7 @@ const JSONViewer = (props: JSONViewerProps): JSX.Element | null => { | |
| }; | ||
|
|
||
| // top level objects, like name, bounding_box, etc. | ||
| Object.entries(contentAsObj).forEach(([key, value]) => { | ||
| Object.entries(content).forEach(([key, value]) => { | ||
| if (typeof value === "string") { | ||
| descriptions.push({ | ||
| label: convertUnderscoreToSpace(key), | ||
|
|
||
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.