RocketChat / RocketChat/Rocket.Chat
refactor: standardize TwoFactorRequiredModal using GenericModal
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
TwoFactorRequiredModal currently uses raw fuselage primitives (Modal, ModalHeader, ModalTitle, ModalContent, ModalFooter, ModalFooterControllers, Button) to manually compose the modal layout.
The codebase provides a standardized GenericModal component (@rocket.chat/ui-client) that handles all of this via a simple prop-based API, and most modals have already been migrated to use it.
File: apps/meteor/client/views/root/MainLayout/TwoFactorRequiredModal.tsx
This modal should be refactored to use GenericModal for consistency with the rest of the 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 by reading apps/meteor/client/views/root/MainLayout/TwoFactorRequiredModal.tsx and the GenericModal API in packages/ui-client/src/components/Modal/GenericModal/GenericModal.tsx. Refactor the modal to use GenericModal instead of the listed raw primitives, preserving its existing behavior and layout; done means the file follows the standardized modal pattern.
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
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100