Skip to content

fix: rename unforwarded MaskCanvas to InnerMaskCanvas to avoid duplicate declarations.#713

Merged
dkotter merged 1 commit into
WordPress:developfrom
justlevine:fix/MaskCanvas-no-shadow
Jun 12, 2026
Merged

fix: rename unforwarded MaskCanvas to InnerMaskCanvas to avoid duplicate declarations.#713
dkotter merged 1 commit into
WordPress:developfrom
justlevine:fix/MaskCanvas-no-shadow

Conversation

@justlevine

@justlevine justlevine commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What?

Closes

This PR renames the internal MaskCanvas component function to InnerMaskCanvas and sets an explicit displayName for the forwarded const MaskCanvas that wraps it.

Why?

After updating our dependencies in #712 , Eslint warns about

 42:11  error  'MaskCanvas' is already declared in the upper scope on line 41 column 14  @typescript-eslint/no-shadow

The explicit displayName helps debuggers and React Dev Tools not get cofused by the forwardedRef noise now that the components aren't identically named.

How?

See diff.

Use of AI Tools

I asked GitHub Copilot Chat to check the repo is there was a previous naming convention used for this sorts of forwardRef wrappers. When the results came back negative, I asked it to check more broadly whether Unforwarded<ComponentName> or Inner<ComponentName> was the more common ecosystem pattern.

Naming things is 🤷

Testing Instructions

Screenshots or screencast

Before After

Changelog Entry

Fixed - Rename unforwarded MaskCanvas component function to InnerMaskCanvas to avoid duplicate declarations.

Open WordPress Playground Preview

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: justlevine <justlevine@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@dkotter dkotter added this to the 1.1.0 milestone Jun 12, 2026
@dkotter dkotter merged commit b2f2e8b into WordPress:develop Jun 12, 2026
21 of 22 checks passed
@justlevine justlevine deleted the fix/MaskCanvas-no-shadow branch June 12, 2026 15:10
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