Skip to content

[docs] Remove unused PlatformTag component and redundant tooltip on platform tags#5066

Merged
Simek merged 1 commit into
react:mainfrom
apicgg:anurag/unused-platform-tag
May 3, 2026
Merged

[docs] Remove unused PlatformTag component and redundant tooltip on platform tags#5066
Simek merged 1 commit into
react:mainfrom
apicgg:anurag/unused-platform-tag

Conversation

@apicgg

@apicgg apicgg commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Cleanup of leftover artifacts from two older PRs (#4097, #4178):

  • Remove website/core/PlatformTag.tsx — the component is not imported or referenced anywhere in the app. Confirmed via repo-wide search; only its own definition and export default exist. Safe to delete as dead code.
  • Drop the title attribute on inline platform tags in docs/platform-specific-code.md — the "Android" / "iOS" badge labels are self-explanatory, so the hover tooltip ("This section is related to X platform") adds no information.

Why

These were introduced two years ago but never wired up across the docs. The component has sat unused, and the tooltip duplicates what the badge text already says. Removing both reduces surface area and avoids confusion for future contributors who might wonder which path is canonical.

Changes

  • Delete website/core/PlatformTag.tsx
  • Update docs/platform-specific-code.md to remove title="..." from the two inline <div className="label ..."> tags

Test plan

  • Run the docs site locally and confirm the Android/iOS badges still render correctly on the Platform-Specific Code page
  • Confirm no build/type errors from the deleted component

c/c @Simek @cortinico

@vercel

vercel Bot commented May 2, 2026

Copy link
Copy Markdown

@apicgg is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla Bot added the CLA Signed label May 2, 2026
@netlify

netlify Bot commented May 2, 2026

Copy link
Copy Markdown

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit 5b4e616
🔍 Latest deploy log https://app.netlify.com/projects/react-native/deploys/69f6530912e8150008199920
😎 Deploy Preview https://deploy-preview-5066--react-native.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 project configuration.

@apicgg apicgg changed the title chore: remove unused PlatformTag component and redundant tooltip on platform tags [docs] Remove unused PlatformTag component and redundant tooltip on platform tags May 2, 2026

@Simek Simek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @apicgg, thanks for the updates! 👍

Drop the title attribute on inline platform tags in docs/platform-specific-code.md — the "Android" / "iOS" badge labels are self-explanatory, so the hover tooltip ("This section is related to X platform") adds no information.

Ideally, we should have those more verbose descriptions for a11y purpose, but we can use aria-label instead. I guess that was the idea with the PlatformTag.tsx‎ component, but it's fine to remove it for now, since the component does not support all of the platforms anyway.

@Simek Simek merged commit fcb433e into react:main May 3, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants