RocketChat / RocketChat/Rocket.Chat

refactor: standardize TwoFactorRequiredModal using GenericModal

Open
#39,146 1 comment 0 reactions 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

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.