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: Fix forwardRef warning in split panel #2884

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

just-boris
Copy link
Member

@just-boris just-boris commented Oct 16, 2024

Description

Replace forwardRef with a plain component to fix this React warning:

Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()

Related links, issue #, if available: n/a

How has this been tested?

Locally, because it is only a warning

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -21,20 +21,3 @@ export function createWidgetizedComponent<Component extends FunctionComponent<an
}) as Component;
};
}

export function createWidgetizedForwardRef<
Copy link
Member Author

Choose a reason for hiding this comment

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

That was the last use of this function. Remove it, because we do not support forward-ref-as-widgets

@just-boris just-boris force-pushed the fix-split-panel-remove-forward-ref branch from 475165d to 6e82535 Compare October 16, 2024 12:11
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.20%. Comparing base (ce7dff3) to head (53cf6c5).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/split-panel/implementation.tsx 98.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2884      +/-   ##
==========================================
- Coverage   96.20%   96.20%   -0.01%     
==========================================
  Files         761      761              
  Lines       21445    21434      -11     
  Branches     7340     7326      -14     
==========================================
- Hits        20631    20620      -11     
  Misses        761      761              
  Partials       53       53              

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

@just-boris just-boris force-pushed the fix-split-panel-remove-forward-ref branch from 6e82535 to 1b2f22b Compare October 16, 2024 12:32
@just-boris just-boris force-pushed the fix-split-panel-remove-forward-ref branch from 1b2f22b to 53cf6c5 Compare October 16, 2024 12:47
@just-boris just-boris marked this pull request as ready for review October 16, 2024 13:03
@just-boris just-boris requested a review from a team as a code owner October 16, 2024 13:03
@just-boris just-boris requested review from Al-Dani and removed request for a team October 16, 2024 13:03
@just-boris just-boris added this pull request to the merge queue Oct 16, 2024
Merged via the queue into main with commit de98920 Oct 16, 2024
38 checks passed
@just-boris just-boris deleted the fix-split-panel-remove-forward-ref branch October 16, 2024 14:21
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.

2 participants