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

Fix misc errors and warnings. #191

wants to merge 1 commit into
base: master


None yet
3 participants
Copy link

commented Jul 6, 2019

I got some nice warnings and errors while browsing the catalog. This fixes most of them.

Specifically, styled-components, i.e.:

breadcrumbs.ts:155 Functions as object-form attrs({}) keys are now deprecated and will be removed in a future version of styled-components. Switch to the new attrs(props => ({})) syntax instead for easier and more powerful composition. The attrs key in question is "aria-level" on component "styled-header__Heading". 
    at http://localhost:4000/static/catalog.js:10556:331
    at StyledComponent.once [as warnAttrsFnObjectKeyDeprecated] (http://localhost:4000/static/catalog.js:10270:10)
    at http://localhost:4000/static/catalog.js:10669:22
    at Array.forEach (<anonymous>)
    at StyledComponent.buildExecutionContext (http://localhost:4000/static/catalog.js:10649:11)
    at StyledComponent.generateAndInjectStyles (http://localhost:4000/static/catalog.js:10702:65)
    at StyledComponent.renderInner (http://localhost:4000/static/catalog.js:10607:33)
    at updateContextConsumer (http://localhost:4000/static/catalog.js:148023:19)
    at beginWork (http://localhost:4000/static/catalog.js:148211:14)
    at performUnitOfWork (http://localhost:4000/static/catalog.js:151851:12)
    at workLoop (http://localhost:4000/static/catalog.js:151891:24)
    at renderRoot (http://localhost:4000/static/catalog.js:151974:7)
    at performWorkOnRoot (http://localhost:4000/static/catalog.js:152881:7)
    at performWork (http://localhost:4000/static/catalog.js:152793:7)
    at performSyncWork (http://localhost:4000/static/catalog.js:152767:3)
    at requestWork (http://localhost:4000/static/catalog.js:152636:5)
    at scheduleWork (http://localhost:4000/static/catalog.js:152450:5)
    at Object.enqueueSetState (http://localhost:4000/static/catalog.js:143884:5)
    at PageLoader.Component.setState (http://localhost:4000/static/catalog.js:131165:16)
    at http://localhost:4000/static/catalog.js:68991:14

And the listbox page:

Warning: Each child in a list should have a unique "key" prop.

Check the render method of `ReactSpecimen`. See for more information.
    in ListItem (created by ReactSpecimen)
    in ReactSpecimen (created by SpecimenContainer)
    in div (created by Span)
    in Span (created by SpecimenContainer)
    in SpecimenContainer (created by MarkdownSpecimen)
    in MarkdownSpecimen (created by Page)
    in div (created by Page)
    in Page (created by PageRenderer)
    in div (created by PageRenderer)
    in PageRenderer (created by WrappedPageRenderer)
    in WrappedPageRenderer (created by PageLoader)
    in PageLoader
    in Unknown (created by RouterContext)
    in div (created by AppLayout)
    in div (created by AppLayout)
    in div (created by AppLayout)
    in AppLayout (created by App)
    in App (created by ConfiguredCatalogContext)
    in CatalogContext (created by ConfiguredCatalogContext)
    in ConfiguredCatalogContext (created by RouterContext)
    in RouterContext (created by Router)
    in ScrollBehaviorContext (created by Router)
    in Router (created by Catalog)
    in Catalog

The rest have to do with styled-components using its own version of Bootstrap, ag-grid not importing credentials properly or something, and the deprecated Typeahead component.

Timothy Baumgartner

@timothy-b timothy-b force-pushed the timothy-b:fix-misc-errors-and-warnings branch from bba8858 to 4f8f426 Jul 6, 2019

@@ -66,7 +66,7 @@ export const Tab = styled.button.attrs({

export const TabContent = styled.span.attrs({ tabIndex: -1 })`
export const TabContent = styled.span.attrs(_ => ({ tabIndex: -1 }))`

This comment has been minimized.

Copy link

smaxa20 Jul 10, 2019


Why do you use _ => here and elsewhere instead of () => when there are no parameters?

Copy link

left a comment

I'd prefer to use empty parens (rather than the _ for arrow function with no arguments, or a meaningful name if you'd prefer to keep the unused argument. Would you mind making that change? Otherwise, this looks great. Thanks for the cleanup work!


This comment has been minimized.

Copy link

commented Jul 18, 2019

@timothy-b Do you have bandwidth to update this PR and resolve the minor feedback items?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.