-
Notifications
You must be signed in to change notification settings - Fork 501
Migrate feature removal to RTK #7091
Copy link
Copy link
Open
Labels
front-endIssue related to the React Front End DashboardIssue related to the React Front End Dashboardtech-debtTechnical debt issuesTechnical debt issues
Description
Replace removeFlag with RTK Query mutation
Description
Replace the legacy removeFlag flow (AppActions → Dispatcher → feature-list-store controller) with the existing RTK Query
removeProjectFlag mutation from common/services/useProjectFlag.ts.
Current state
Feature flag deletion uses two parallel paths:
- RTK (new):
FeaturesPage.tsxalready usesuseRemoveFeatureWithToast, which wrapsuseRemoveProjectFlagMutation. The
removeProjectFlagmutation endpoint already exists inuseProjectFlag.ts. - Flux (old):
CompareFeatures.js,CompareEnvironments.js, andWidgetPage.tsxstill go throughFeatureListProvider.removeFlag→
AppActions.removeFlag→ Dispatcher →feature-list-store.removeFlagcontroller, which manually calls the API, filters the store model,
and triggers a'removed'event.
Objectives
- Add
removeProjectFlagstore dispatch helper tocommon/services/useProjectFlag.ts(follows existing
createProjectFlag/updateProjectFlagpattern) for use in class components - Remove
removeFlagcontroller method andREMOVE_FLAGcase fromcommon/stores/feature-list-store.ts - Remove
removeFlagaction fromcommon/dispatcher/app-actions.js - Remove
REMOVE_FLAGconstant fromcommon/dispatcher/action-constants.js - Remove
removeFlagmethod, render prop exposure, and'removed'event listener fromcommon/providers/FeatureListProvider.js - Remove
removeFlagfromFeatureListProviderActionstype incommon/types/responses.ts - Update
web/components/CompareFeatures.jsto useremoveProjectFlaghelper - Update
web/components/CompareEnvironments.jsto useremoveProjectFlaghelper - Update
web/components/pages/WidgetPage.tsxto remove unusedremoveFlagdestructuring and prop passing
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
front-endIssue related to the React Front End DashboardIssue related to the React Front End Dashboardtech-debtTechnical debt issuesTechnical debt issues