Migrate ActionForm from SelectLegacy to Select (blocked by missing render support)

Open
#38,390 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start with apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx and review how SelectLegacy uses renderItem, renderSelected, and disabled options. Then inspect the current Select capabilities and determine whether the preferred support change or an alternative path is agreed; done means ActionForm can leave SelectLegacy without losing Premium-option behavior.

Written by the indexing model from the issue text.

Description

Description

There is an existing TODO comment in
apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx
requesting migration from the deprecated SelectLegacy component to the modern
Select component.

At the moment, this migration cannot be completed due to missing features in
Select.

Current code

The following TODO is present in the codebase:

// TODO: Remove SelectLegacy once we have a new Select component
<SelectLegacy ... />

Problem

SelectLegacy is deprecated, but ActionForm relies on functionality that is
not yet supported by the new Select component. As a result, a direct migration
would break existing behavior.

Blocker

The ActionForm component requires the following features:

  • renderItem
    Custom rendering of dropdown options (used for Premium tags).
  • renderSelected
    Custom rendering of the selected value.
  • Disabled option handling
    Preventing selection of Premium-only options.
Current support status
Component renderItem renderSelected
SelectLegacy Yes Yes
Select No No
SelectFiltered Yes Yes

Because Select does not support renderItem or renderSelected, migration is
currently blocked.

Proposed resolution paths

This issue can be unblocked once one of the following is addressed:

  1. Add renderItem and renderSelected support to Select

    • Preferred solution
    • Aligns with long-term component standardization.
  2. Switch to SelectFiltered

    • Works functionally
    • Introduces unnecessary filtering behavior for this use case.
  3. Refactor Premium tag rendering logic

    • Move rendering logic outside of the Select component
    • Higher refactor cost and complexity.

Files affected

  • apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx

Notes

This issue documents a known technical-debt item and should remain blocked
until the required Select component capabilities are available or an
alternative approach is agreed upon.

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

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.

More from RocketChat/Rocket.Chat

All issues in RocketChat/Rocket.Chat

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.