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

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

merged 168 commits into from
Dec 19, 2023

Conversation

macrouch
Copy link
Collaborator

No description provided.

macrouch and others added 30 commits November 7, 2023 12:46
Added:
CustomSelect
CustomTextarea
CustomDateTime
CustomArrayField
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2023

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (ca5e73f) 89.13% compared to head (b276ef0) 98.33%.

Files Patch % Lines
...onents/GridControlledField/GridControlledField.jsx 89.77% 9 Missing ⚠️
...ic/src/js/components/DraftPreview/DraftPreview.jsx 91.25% 7 Missing ⚠️
static/src/js/App.jsx 0.00% 6 Missing ⚠️
...components/GridCheckboxPanel/GridCheckboxPanel.jsx 50.00% 1 Missing ⚠️
.../GridGroupedSinglePanel/GridGroupedSinglePanel.jsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           MMT-3390    #1091      +/-   ##
============================================
+ Coverage     89.13%   98.33%   +9.20%     
============================================
  Files            16      119     +103     
  Lines            46     1679    +1633     
  Branches          5      347     +342     
============================================
+ Hits             41     1651    +1610     
- Misses            5       28      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

uiSchema,
value
}) => {
console.log('🚀 ~ file: CustomRadioWidget.jsx:40 ~ id:', id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print statement, remove?

title = uiSchema['ui:title']
}

return (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the CustomWidgetWrapper.jsx

children
}) => (
<div
data-testid="custom-field-template"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this data-testid


/**
* CustomMultiSelectWidget
* @typedef {Object} CustomArrayFieldTemplate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@typedef {Object} CustomArrayFieldTemplate -> @typedef {Object} CustomMultiSelectWidget

}

// If the value already has data, this will store it as an object for react-select
const existingValues = value.filter(Boolean).map((currentValue) => ({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of .filter(Boolean)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.filter(Boolean) removes any empty values from an array, so if value is [undefined] that filter will return []


/**
* CustomSelectWidget
* @typedef {Object} CustomArrayFieldTemplate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@typedef {Object} CustomArrayFieldTemplate --> @typedef {Object} CustomSelectWidget

const { maxLength, description } = schema

const fieldType = uiSchema['ui:type']
const headerClassName = uiSchema['ui:header-classname']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove headerClassName. This was being used in the prototype where in the uiSchema we were passing in custom className for the header. I don't this this is needed any more with the new styling done by Trevor

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a note of this for your work on services, I don't want to mess with this before our demo


const { maxLength, description } = schema

const fieldType = uiSchema['ui:type']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cgokey Future note: I think we can pull out the type (string or number) from the schema and use that, instead of defining it in the uiSchema.

(section, index) => {
const { displayName } = section

// TODO MMT-####
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we had in the prototype?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was waiting on a ticket Trevor was going to write lol, need to get a real ticket number in each place that shows up

@@ -0,0 +1,32 @@
.navigation-item-error {
&__item {
// width: 330px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can be removed

@macrouch macrouch merged commit aaf04e7 into MMT-3390 Dec 19, 2023
5 checks passed
@macrouch macrouch deleted the MMT-3410 branch December 19, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants