cbioportal-frontend icon indicating copy to clipboard operation
cbioportal-frontend copied to clipboard

Fix various warnings from the browser console

Open pappde opened this issue 1 year ago • 3 comments

Summary

Fixes some warnings that appear in the browser console when loading GroupComparisonPage.

Warnings fixed

Primarily warnings originating from prop_types package validation.

  • <Popover> Warning: Failed prop type: The prop id is required to make Popover accessible for users of assistive technologies such as screen readers
    • fixed several instances
  • GroupSelectorButton: Warning: Failed prop type: The prop onHide is marked as required in Overlay, but its value is undefined
  • appBootstrapper.loadCustomJs: fixed resolve() missing parameter warning by explicitly declaring Promise instead of Promise

Note

These commits are dependent on PR #4927 and PR #4932 - the first one is a dependency for my environment.

pappde avatar Jul 03 '24 22:07 pappde

Deploy Preview for cbioportalfrontend ready!

Name Link
Latest commit ffa4bc16b7c9348e0a07eeb3b4a4b1f50aab7ec0
Latest deploy log https://app.netlify.com/sites/cbioportalfrontend/deploys/6686ca368644f200083bd4bc
Deploy Preview https://deploy-preview-4937--cbioportalfrontend.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jul 03 '24 22:07 netlify[bot]

@pappde thanks for doing this. see my question about the ids.

alisman avatar Jul 08 '24 20:07 alisman

@alisman Noted which warning those particular changes fix. Let me know if you prefer reverting any of them.

Aside: These commits only make a little dent in all the prop_types warnings. I wonder if it would be helpful to update the Getting Started (readme) with some tips on how to filter them out.

pappde avatar Jul 08 '24 22:07 pappde

@pappde yeah, i think it would better to update README to filter these warnings out. i checked and adding the id does indeed result in a DOM id, which i would rather avoid. one can see that onHide should not be a required prop (contrary to my initial comment above) which is in line with my general sense that these prop types are of limited value

alisman avatar Jul 10 '24 19:07 alisman

@alisman Agreed, I'll close this out and update dependent PRs.

pappde avatar Jul 10 '24 20:07 pappde