RocketChat / RocketChat/Rocket.Chat
refactor(ui): replace obsolete TextCopy with CodeSnippet in TwoFactorTOTP
Nobody has claimed this yet.
- 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
TextCopycomponent directory entirely from the client codebase.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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