Skip to content

[Remove legacy waffle flags] Remove Legacy UI Waffle Flag Definitions — Phase 2 (api.ts + apiHooks.ts) #525

Description

@farhan

Part of #521 — Remove Legacy Studio UI Waffle Flags
Frontend ticket: openedx/frontend-app-authoring#3063

Depends on: #522, #523, #524 (all Phase 1 consumer removals must be merged first)

/cc @openedx/axim-aximprovements

Scope

With no consumers remaining after Phase 1, delete the 12 routing flag declarations from the data layer.

Tasks

13. `src/data/api.ts`

  • Remove the 12 routing flag entries from `waffleFlagDefaults`
  • Remove `getApiWaffleFlagsUrl()` function and its call in `getWaffleFlags()` if no routing flags remain (keep if feature flags still need the endpoint)
  • Update `WaffleFlagName` type accordingly

14. `src/data/apiHooks.ts`

  • In `useWaffleFlags()`: remove routing-flag fields from the returned object and from the React Query fetch if the endpoint is being dropped
  • If the hook still serves feature flags, keep the hook but strip the removed flag names from its return type

Acceptance Criteria

  • No references to the 12 removed flag names remain in `src/data/`
  • `useWaffleFlags()` no longer fetches or returns the removed flag names
  • `make validate.ci` passes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions