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: better prop management to not trigger runtime warnings #545

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GersonDias
Copy link

BoardContainer and Lane was not handling props correctly, resulting invalid DOM properties to be present in the final DOM, resulting in runtime warnings

BoardContainer and Lane was not handling props correctly, resulting
invalid DOM properties to be present in the final DOM, resulting in
runtime warnings
@dapi
Copy link
Collaborator

dapi commented Jan 15, 2025

@GersonDias Hi! Thank you for PR!

Could you present runtime warnings examples?

@Gabriel637
Copy link

Gabriel637 commented Jan 24, 2025

Hi @dapi, I'm having warnings like these even when I'm not using AddCardLink for example, hope that PR fixes it.
image

@GersonDias
Copy link
Author

GersonDias commented Jan 24, 2025

also things like

hook.js:608  styled-components: it looks like an unknown prop "editLaneTitle" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.) Error Component Stack
    at O2 (StyledComponent.ts:193:44)
    at LaneHeaderComponent (LaneHeader.js:21:3)
    at section (<anonymous>)
    at O2 (StyledComponent.ts:193:44)
    at Lane (Lane.js:45:5)
    at Connect2 (connectAdvanced.js:110:28)
    at div (<anonymous>)
    at Container (Container.js:27:5)
    at div (<anonymous>)
    at PopoverWrapper (PopoverWrapper.js:20:1)
    at div (<anonymous>)
    at O2 (StyledComponent.ts:193:44)
    at BoardContainer (BoardContainer.js:46:5)
    at Connect2 (connectAdvanced.js:110:28)
    at Provider2 (Provider.js:43:26)
    at Board (Board.js:38:5)
    at _default (index.js:89:25)
hook.js:608  Warning: React does not recognize the `editLaneTitle` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `editlanetitle` instead. If you accidentally passed it from a parent component, remove it from the DOM element. Error Component Stack
    at header (<anonymous>)
    at O2 (StyledComponent.ts:193:44)
    at LaneHeaderComponent (LaneHeader.js:21:3)
    at section (<anonymous>)
    at O2 (StyledComponent.ts:193:44)
    at Lane (Lane.js:45:5)
    at Connect2 (connectAdvanced.js:110:28)
    at div (<anonymous>)
    at Container (Container.js:27:5)
    at div (<anonymous>)
    at PopoverWrapper (PopoverWrapper.js:20:1)
    at div (<anonymous>)
    at O2 (StyledComponent.ts:193:44)
    at BoardContainer (BoardContainer.js:46:5)
    at Connect2 (connectAdvanced.js:110:28)
    at Provider2 (Provider.js:43:26)
    at Board (Board.js:38:5)
    at _default (index.js:89:25)
hook.js:608  Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of `Lane`. Error Component Stack
    at ScrollableLane (ScrollableLane.tsx:11:41)
    at section (<anonymous>)
    at O2 (StyledComponent.ts:193:44)
    at Lane (Lane.js:45:5)
    at Connect2 (connectAdvanced.js:110:28)
    at div (<anonymous>)
    at Container (Container.js:27:5)
    at div (<anonymous>)
    at PopoverWrapper (PopoverWrapper.js:20:1)
    at div (<anonymous>)
    at O2 (StyledComponent.ts:193:44)
    at BoardContainer (BoardContainer.js:46:5)
    at Connect2 (connectAdvanced.js:110:28)
    at Provider2 (Provider.js:43:26)
    at Board (Board.js:38:5)
    at _default (index.js:89:25)
    at div (<anonymous>)

I'm seeing a warning childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead but this are not covered in this PR

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.

3 participants