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

MMT-3410: Adds UMM-T draft forms #1091

Merged
merged 168 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 166 commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
b576adc
MMT-3410: Adds routes for tool-drafts
macrouch Nov 7, 2023
8c9b002
MMT-3410: Sets up apollo client to use local cmr token
macrouch Nov 7, 2023
a1676e7
MMT-3410: Adds draft preview page
macrouch Nov 13, 2023
aafa483
MMT-3410: Added form and custom text widget
macrouch Nov 14, 2023
b41df15
MMT-3410: Navigate to form by clicking preview section title
macrouch Nov 14, 2023
0e021ca
MMT-3410: Fixes fixes the preview page field level links
macrouch Nov 15, 2023
f35db7e
MMT-3410: Added widgets and templates
Nov 17, 2023
7cd4dd7
MMT-3410: Convert BoundingRechtangleField
htranho Nov 17, 2023
e1c4b36
MMT-3410: Fix scss file, typo in file name BoundingRechtangleField
htranho Nov 17, 2023
5f620d3
MMT-3410: Add BoundingRectangleField
htranho Nov 17, 2023
5e82267
MMT-3410: adding CustomRadioWidget
mandyparson Nov 17, 2023
97017dc
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
mandyparson Nov 17, 2023
2035104
MMT-3410: fixing conflicts
mandyparson Nov 17, 2023
7aeee85
MMT-3410: Moved StreetAddressField to use Functional Components.
Nov 17, 2023
9df2ba1
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Nov 17, 2023
ab6fdbd
MMT-3410: Store active draft in context
macrouch Nov 17, 2023
8e24057
MMT-3410: Added StreetAddress field to registered fields.
Nov 17, 2023
e2ebb4e
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Nov 17, 2023
3dc997a
MMT-3410: Fixed styles
Nov 17, 2023
8debaae
MMT-3410: Added LayoutGridField support.
Nov 20, 2023
1cbdcd4
MMT-3410: Change Class to functional component for CustomTitleField.jsx
tle1989 Nov 20, 2023
5ffd039
MMT-3410: Remove the editor in functional component for CustomTitleFi…
tle1989 Nov 20, 2023
67575c4
MMT-3410: Fix typo on MetadataForm.jsx
tle1989 Nov 20, 2023
4ef762d
MMT-3410: Fixing display of form navigation
trevorlang Nov 20, 2023
4297585
MMT-3410: Add CustomCountrySelectWidget
htranho Nov 20, 2023
e8d4265
MMT-3410: Remove unused import
htranho Nov 20, 2023
cfc4a49
MMT-3410: Update to use CustomCountrySelectWidget
htranho Nov 20, 2023
3d6c5bb
MMT-3410: Adding CutomFieldTemplate
mandyparson Nov 20, 2023
6c95cff
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
mandyparson Nov 20, 2023
c029fe9
MMT-3410: Removing console.log
mandyparson Nov 20, 2023
45f9573
MMT-3410: Converse class to functional component CustomTitleFieldTemp…
tle1989 Nov 20, 2023
c34cc23
MMT-3410: Create folders for CustomTitleField, and CustomTitleFieldTe…
tle1989 Nov 20, 2023
10a355e
MMT-3410: Bug fixes to layout grid schema, street address field, and …
Nov 20, 2023
bdae507
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Nov 20, 2023
c98aeb5
MMT-3410: Component clean up
macrouch Nov 20, 2023
546e3ef
MMT-3410 Comments added, updated after feedback
htranho Nov 20, 2023
fd52fa9
MMT-3410: Added JsonPreview, started on LayoutGridControlledField.
Nov 20, 2023
97853b4
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Nov 20, 2023
961a487
MMT-3410: Add uiSchema prop types, and comments based on Matthew's fe…
tle1989 Nov 20, 2023
43d5ca1
MMT-3410: Fix uiSchema Prop types based on Matthew's second feedback
tle1989 Nov 21, 2023
5e0efb8
MMT-3410: Remove eslint exception in import
htranho Nov 21, 2023
99b437d
MMT-3410: added CustomSelect keywords from CMR
Nov 21, 2023
022d45f
MMT-3410: Fixed a bug in CustomSelect
Nov 21, 2023
58052dc
MMT-3410: Editing CRadioWidget and CFieldTemplate
mandyparson Nov 21, 2023
f5d83f6
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
mandyparson Nov 21, 2023
1eb16de
MMT-3410: Adding back in files
mandyparson Nov 21, 2023
3710e68
MMT-3410: fixing radio buttons
mandyparson Nov 21, 2023
1f152fa
MMT-3410: Updates NagivationItemError
macrouch Nov 21, 2023
9e38e35
MMT-3410: Updates to LayoutGridControlledField and CustomSelectBox
Nov 22, 2023
d295d75
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Nov 22, 2023
c955e80
MMT-3410: Updated comment.
Nov 22, 2023
710a387
MMT-3410: More refactoring done on GridLayout
Nov 22, 2023
5176f2a
MMT-3410: Add data-testid for CustomTitleField, it was missed when do…
tle1989 Nov 22, 2023
add7d3f
MMT-3410: Added a test, refactored widgets
macrouch Nov 22, 2023
e463fba
MMT-3410: Fixed issues with GridLayout
Nov 22, 2023
645d82f
MMT-3410: Fixed bad data
Nov 22, 2023
fc54843
MMT-3410: Added test
macrouch Nov 22, 2023
1892ea2
MMT-3410: Added Keyword Picker
Nov 24, 2023
92f7ff0
MMT-3410: Added CustomMultiSelect
Nov 24, 2023
9055304
MMT-3410: Addressed Matthew's comment
Nov 24, 2023
bb77cb6
MMT-3410: Refactored KeywordPicker
Nov 27, 2023
4c8e361
MMT-3410: Fixed test errors
macrouch Nov 27, 2023
66ce69c
MMT-3410: Added jsDoc to the components and util
Nov 27, 2023
6b714a1
MMT-3410: Fixed issue with CustomSelect propType
Nov 27, 2023
2a216c7
MMT-3410: Added more tests
macrouch Nov 27, 2023
7a4d0ab
MMT-3410: Updating bootstrap imports
mandyparson Nov 27, 2023
1fb61ed
MMT-3410: Added jsDoc to all the components
Nov 27, 2023
35eb20f
MMT-3410: Fixed issues with form disappearing when selecting a value …
Nov 28, 2023
35e9841
MMT-3410: Fixed bug with StreetAddressField where it was not setting …
Nov 28, 2023
f3d898a
MMT-3410: Adding tests
macrouch Nov 28, 2023
15ff23e
MMT-3410: Add tests for clearFormData and convertToDottedNotation
htranho Nov 28, 2023
69d4130
MMT-3410: Add tests to clearFormData
htranho Nov 28, 2023
a33e90a
MMT-3410: Added errorLogger Lambda
Nov 29, 2023
88d3a63
MMT-3410: Tests for isRequired.js and remove extra export
tle1989 Nov 29, 2023
06b85e8
MMT-3410: Add test for getConceptTypeByDraftConceptId.js
htranho Nov 29, 2023
bbe26f7
MMT-3410: Replace it() to test()
tle1989 Nov 29, 2023
f257bf3
MMT-3410: Change file name getFormData to getParentFormData
htranho Nov 29, 2023
bb5faa2
MMT-3410: Add tests for removeEmpty.js
tle1989 Nov 29, 2023
186ff04
MMT-3410: Rename getNextForm.js to getNextFormName.js
htranho Nov 29, 2023
8d2f390
MMT-3410: Add tests for shouldHideGetData.js
tle1989 Nov 30, 2023
896e38e
MMT-3410: Cleaned up errorLogger and added tests
Nov 30, 2023
466308b
MMT-3410: Add tests for shouldHideGetService.js
tle1989 Nov 30, 2023
1e3f000
MMT-3410: Change variable name from getData to setService for shouldH…
tle1989 Nov 30, 2023
7310441
MMT-3410: Add test for getNextFormName.js
htranho Nov 30, 2023
d571d69
MMT-3410: getAvailableKey and OnKeyChange Edits
mandyparson Nov 30, 2023
db9bc1e
MMT-3410: Add tests for shouldFocusField.js
tle1989 Nov 30, 2023
dec0df2
MMT-3410: Add test for getFormSchema.js
htranho Nov 30, 2023
678ac61
MMT-3410: Added tests for:
Dec 1, 2023
db7b665
MMT-3410: Added test cases for getConfig.js
Dec 1, 2023
1cec8d0
MMT-3410: Building Manage and Drafts pages
trevorlang Dec 1, 2023
abc9ba7
MMT-3410: Add tests, remove eslint-disable-next-line, remove named ex…
tle1989 Dec 1, 2023
832ff76
MMT-3410: Fixing issue with draft preview
trevorlang Dec 1, 2023
593cdd9
MMT-3410: Changes GridField back to a class that extends ObjectField
macrouch Dec 4, 2023
5c2adb0
MMT-3410: Minor formatting changes
macrouch Dec 4, 2023
c76a41f
MMT-3410: Linter fixes
macrouch Dec 5, 2023
0d41364
MMT-3410: Added tests for getKeywords, getParentFormData, parseCmrRes…
Dec 5, 2023
af22431
MMT-3410: Fixed import and variable name.
Dec 5, 2023
ff438ba
MMT-3410: Updated calling to CMR in KeywordPicker
Dec 5, 2023
09158bf
MMT-3410: Fixed the related-ur-ls in the URL
Dec 5, 2023
9ba3849
MMT-3410: Added toLowerKebabCase util function
Dec 5, 2023
260b77b
MMT-3410: Follow describe/test blocks in the tests for removeEmpty.js…
tle1989 Dec 5, 2023
55e930e
MMT-3410: Polish test description
tle1989 Dec 5, 2023
e79896f
MMT-3410: Restructure and add tests to createResponseFromKeywords
htranho Dec 5, 2023
a7ad01b
MMT-3410: Updated traverse to pass in a node object and will now retu…
Dec 5, 2023
9e8550c
MMT-3410: Updated variable name to make it a bit more understandable.
Dec 5, 2023
7459d64
MMT-3410: Fixes validations
macrouch Dec 6, 2023
0464f37
MMT-3410: Added test cases for CustomTitleField
Dec 6, 2023
6dda652
MMT-3410: Refactors
macrouch Dec 6, 2023
d0cccff
MMT-3410: Adding notifications
trevorlang Dec 7, 2023
4090fdf
MMT-3410: Fixing linting
trevorlang Dec 7, 2023
c1ea6db
MMT-3410: renamed traverse to traverseCmrResponse
Dec 7, 2023
9c52457
MMT-3410: Added test cases for:
Dec 7, 2023
25f3304
MMT-3410: Implments Cancel button, adds tests
macrouch Dec 7, 2023
245ef6b
MMT-3410: Add test for BoundingRectangleField.jsx
htranho Dec 7, 2023
299ff73
MMT-3410: Adds tests for reducers
macrouch Dec 8, 2023
4835fa1
MMT-3410: Use user-event
htranho Dec 8, 2023
b0aa8b7
MMT-3410: Notifications tests
macrouch Dec 8, 2023
9f4bfb0
MMT-3410: Added test for GridTitle
Dec 8, 2023
3b0219f
MMT-3410: Add tests for CustomTitleFieldTemplate.jsx
tle1989 Dec 8, 2023
dd6eee6
MMT-3410: Now checks props.
Dec 8, 2023
c611eef
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Dec 8, 2023
1b5628c
MMT-3410: Fixed duplicate describe statement
Dec 8, 2023
184d387
MMT-3410: Add test to CustomCountrySelectWidget
htranho Dec 8, 2023
183d522
MMT-3410: Rename directory 'CustomMultiSelect' to 'CustomMultiSelectW…
htranho Dec 8, 2023
45b3450
MMT-3410 Add file CustomMultiSelectWidget.test.js
htranho Dec 8, 2023
18ad71e
MMT-3410: Renove unused file
htranho Dec 8, 2023
c4796f6
MMT-3410: Adds DraftPreview tests, adds retries to CMR calls
macrouch Dec 11, 2023
094025a
MMT-3410: Add tests to CustomMultiSelectWidget
htranho Dec 11, 2023
231e84e
MMT-3410: Adding tests for Radio Widget
mandyparson Dec 11, 2023
31953fa
MMT-3410: Remove unused statement
htranho Dec 11, 2023
4a00be6
MMT-3410: Update imports
htranho Dec 12, 2023
bd50087
MMT-3410: Added tests for KeywordPicker
Dec 12, 2023
b1cb2e6
MMT-3410: MetadataForm tests
macrouch Dec 12, 2023
52c9db8
MMT-3410: Add test to DraftList
htranho Dec 12, 2023
42a315a
MMT-3410: Test cases for JsonPreview.jsx
tle1989 Dec 12, 2023
c3d539d
MMT-3410: Add test to StreetAddressField
htranho Dec 12, 2023
83dc2ef
MMT-3410: Adds useControlledKeywords test
macrouch Dec 13, 2023
54a2c79
MMT-3410: Added test for DateTime and
Dec 13, 2023
5e7bf3b
MMT-3410: Select widget tests
macrouch Dec 13, 2023
f321368
MMT-3410: Added tests for GridField and GridRow
Dec 13, 2023
9ee7329
MMT-3410: GridControlledField tests
macrouch Dec 13, 2023
d07afd9
MMT-3410: Added GridCol test
Dec 13, 2023
ef8d0eb
MMT-3410: Added tests for GridRow
Dec 13, 2023
6c2daaa
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Dec 13, 2023
61ba49e
MMT-3410: Added tests for GridLayout
Dec 13, 2023
d9e28a6
MMT-3410: Add tests to Button.jsx
tle1989 Dec 13, 2023
403e619
MMT-3410: Form improvements and loading state
trevorlang Dec 14, 2023
9e31cdd
MMT-3410: Add support for Download JSON.
Dec 14, 2023
493eca9
MMT-3410: Resetting state variable if error occurs.
Dec 14, 2023
46f2a93
MMT-3140: Added test for ObjectField.test.js
Dec 14, 2023
8366be0
MMT-3410: Changed from useQuery to useLazyQuery
Dec 14, 2023
0f6a2cf
Merge branch 'MMT-3410' of https://github.com/nasa/mmt into MMT-3410
Dec 14, 2023
ef5e881
MMT-3410: Cleaned up and added createDownloadDraftParas
Dec 14, 2023
251b131
MMT-3410: Added jsDoc for CustomFieldTemplate
Dec 14, 2023
4e9e88a
MMT-3410: Cleanup
macrouch Dec 14, 2023
15588e2
MMT-3410: More cleanup
macrouch Dec 15, 2023
99bc4a3
MMT-3410: Switch to lodash-es
macrouch Dec 15, 2023
f32f3b7
MMT-3410: Fixed tests for download json option.
Dec 15, 2023
a9f4b9a
MMT-3410: Removed console.log
Dec 15, 2023
5e580a6
MMT-3410: Added test for contructDownloadableFile
Dec 15, 2023
b880d33
MMT-3410: Forgot to include test.
Dec 15, 2023
23b3e9a
MMT-3410: accidently included unused import
Dec 15, 2023
a6faba9
MMT:3410: More cleanup
macrouch Dec 16, 2023
0aaecc9
MMT-3410: Fixes tests
macrouch Dec 16, 2023
b276ef0
MMT-3410: Updates readme
macrouch Dec 16, 2023
596b133
MMT-3410: Removes console log
macrouch Dec 18, 2023
4288459
MMT-3410: Use widget wrapper for country select, removes test ids
macrouch Dec 18, 2023
baa8aa1
MMT:3410: Fixes linting issue, updates comments to new ticket
macrouch Dec 18, 2023
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
12 changes: 4 additions & 8 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@
],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"import-notation": "string",
"keyframes-name-pattern": "[a-zA-Z]",
"no-invalid-position-at-import-rule": null,
"property-no-unknown": [
true,
{
"ignoreProperties": [
"composes",
"compose-with"
]
"ignoreProperties": ["composes", "compose-with"]
}
],
"scss/at-rule-no-unknown": true,
"selector-class-pattern": "[a-zA-Z]",
"selector-pseudo-class-no-unknown": [
true,
Expand All @@ -31,9 +29,7 @@
"value-keyword-case": [
"lower",
{
"ignoreKeywords": [
"/[a-zA-Z]/"
]
"ignoreKeywords": ["/[a-zA-Z]/"]
}
]
}
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ For more information, see one of these links

##### 4. Running the CMR npm scripts

To start the local CMR:
To start the local CMR and load the test data:
_Note: This command can be ran as two separate commands if needed:_

npm run cmr:start
npm run cmr:start_and_setup

To load data into the local CMR:
< or >

npm run cmr:start
npm run cmr:setup

After you see "Done!", you can load the app in your browser and use the local CMR. After you have started CMR, to just reload the data:
Expand Down Expand Up @@ -155,4 +157,4 @@ These will help create more maintainable css:

* [Bootstrap Docs](https://getbootstrap.com/docs/5.0/)
* [BEM methodology](https://getbem.com/)
* [Specificity MDN Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)
* [Specificity MDN Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)
7 changes: 4 additions & 3 deletions bin/deploy-bamboo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ set -eux
config="`cat static.config.json`"

# update keys for deployment
config="`jq '.version = $newValue' --arg newValue ${RELEASE_VERSION} <<< $config`"
config="`jq '.graphQlHost = $newValue' --arg newValue $bamboo_GRAPHQL_HOST <<< $config`"
config="`jq '.apiHost = $newValue' --arg newValue $bamboo_API_HOST <<< $config`"
config="`jq '.application.version = $newValue' --arg newValue ${RELEASE_VERSION} <<< $config`"
config="`jq '.application.graphQlHost = $newValue' --arg newValue $bamboo_GRAPHQL_HOST <<< $config`"
config="`jq '.application.apiHost = $newValue' --arg newValue $bamboo_API_HOST <<< $config`"
config="`jq '.application.cmrHost = $newValue' --arg newValue $bamboo_CMR_HOST <<< $config`"

# overwrite static.config.json with new values
echo $config > tmp.$$.json && mv tmp.$$.json static.config.json
Expand Down
14 changes: 11 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<!doctype html>
<html lang="en">
<html lang="en" class="h-100">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/static/src/assets/images/logos/nasa-meatball-new.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Metadata Management Tool</title>
<link rel="stylesheet" type="text/css" href="/static/src/css/initial/index.scss">
</head>
<body>
<body class="h-100 d-flex flex-column is-loading">
<div id="earthdata-tophat2" class="th-wrapper" style="height: 34px; background: #000;"></div>
<div id="root"></div>
<div id="root" class="d-flex flex-grow-1 align-items-stretch w-100"></div>
<div class="app-loading-screen">
<div class="app-loading-screen__content">
<div class="spinner-border text-primary" role="status">
</div>
<span class="app-loading-screen__text">Loading Metadata Management Tool...</span>
</div>
</div>
<script type="module" src="/static/src/main.jsx"></script>
<script
id="earthdata-tophat-script"
Expand Down
11 changes: 7 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ const config = {
// ],

// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
// testPathIgnorePatterns: [
// "/node_modules/"
// ],
testPathIgnorePatterns: [
'/__mocks__/',
'/node_modules/'
],

// The regexp pattern or array of patterns that Jest uses to detect test files
// testRegex: [],
Expand All @@ -197,7 +198,9 @@ const config = {
'/node_modules/(?!'
+ '@react-leaflet|'
+ 'react-leaflet|'
+ 'jest-runtime'
+ 'nanoid|'
+ 'jest-runtime|'
+ 'lodash-es'
+ ').+\\.js$'
]

Expand Down
5 changes: 5 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ global.waitForResponse = async () => {
}
}))
}

// JS Dom does not have scrollIntoView, so create it here
// https://stackoverflow.com/a/53294906
window.HTMLElement.prototype.scrollIntoView = jest.fn()
window.scroll = jest.fn()
Loading