RocketChat / RocketChat/Rocket.Chat

refactor(ui): replace obsolete TextCopy with CodeSnippet in TwoFactorTOTP

Open Beginner friendly
#39,956 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

type: feature
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Current Behavior

The TwoFactorTOTP view component currently relies on the deprecated <TextCopy> component to display the TOTP backup secret string.
This happens to be the absolute final usage of the TextCopy component in the .tsx codebase.

Expected Behavior

The obsolete <TextCopy> component should be replaced with the globally standardized @rocket.chat/fuselage <CodeSnippet> component.
Because this is the final consumer, the TextCopy component itself should be fully unlinked and completely deleted from apps/meteor/client/components/TextCopy to permanently clean up the obsolete architecture and trim the bundle.

Tasks

  • Replace <TextCopy> with <CodeSnippet> in apps/meteor/client/views/account/security/TwoFactorTOTP.tsx
  • Delete legacy TextCopy component directory entirely from the client codebase.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with apps/meteor/client/views/account/security/TwoFactorTOTP.tsx and inspect the remaining usage of TextCopy, then review apps/meteor/client/components/TextCopy. Verify that the view uses the standardized CodeSnippet component and that the legacy TextCopy directory can be removed without remaining .tsx consumers; confirm the relevant client checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.