Skip to content

Conversation

bseifert14
Copy link
Contributor

Description

With the console open in browser, the UI would trigger various errors. These errors generally related to incorrect prop-type, deprecated methods from npm packages, and incorrect id's on fields.

Fix Description

I went through and audited all the pages/forms to check and see if any of these console errors appeared. If they did, I fixed them in our code. I'll outline each one below

Technical Fix Description

File Fix Description
DescriptorRoute paths was used pre 7.0. Not sure how it hung around in there for so long but it's no longer needed
DistributionTableActions data was being passed as an array in proptypes, in reality it’s an array with a models object inside of it
AboutProviderTable tableData prototype should have been an array of objects
ConcreteConfigurationForm disableTestSubmit is a boolean, prop needed to be updated. createRequest and validateRequest are both conditionally applied, therefore they are not required in props
AboutInfoFooter componentWillReceiveProps was deprecated. Updated to componentDidUpdate
LdapForm needed to provide unique identifier for submit, test, and delete buttons
SamlForm needed to provide unique identifier for submit, test and delete buttons. Also needed to provide unique identifiers for both checkboxes.
RadioInput we needed to uniquely identify each option
GlobalTestModal showLoader needed a boolean as a prop, weirdly here we were setting a string
Index createHistory is deprecated, updating to createBrowserHistory
SearchFilter was throwing an error because the value was switching between null/undefined.  Updated this to just be the searchValue or an empty string

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses console errors in the UI by fixing PropType definitions, updating deprecated React methods, and ensuring proper unique identifiers for form elements. The changes improve code quality and eliminate browser console warnings without affecting functionality.

Key changes:

  • Fixed PropType definitions to match actual data structures
  • Replaced deprecated React lifecycle methods with modern equivalents
  • Added unique identifiers to form elements to prevent DOM warnings

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
DistributionTableActions.js Updated PropType from array to shape with models property
AboutProviderTable.js Changed PropType from object to array of objects
AboutInfoFooter.js Replaced deprecated componentWillReceiveProps with componentDidUpdate
ConcreteConfigurationForm.js Fixed PropType definitions for optional functions and boolean values
GlobalTestModal.js Changed showLoader prop from string to boolean
SearchFilter.js Improved null handling using nullish coalescing operator
RadioInput.js Added unique IDs for radio button options
DescriptorRoute.js Removed unused paths parameter
SamlForm.js Added unique identifiers for form buttons and checkboxes
LdapForm.js Added buttonIdPrefix for unique form element IDs
Index.js Updated deprecated history import to modern equivalent

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

1 participant