---
title: Consume shared label map in league-settings components
type: task
status: planned
description: >-
  UI-side DRY: refactor the six league-settings-* components to import field labels from the shared
  libs-shared/constants/league-settings-labels.mjs created by the context-docs task.
base_uri: user:task/league/consume-shared-label-map-in-league-settings-components.md
created_at: '2026-07-17T20:09:39.521Z'
entity_id: 4e7f1148-0fa4-4e69-bd7e-1b3af99fc849
observations:
  - ████████████████████████████████████████████████
owner_identity_uri: █████████████████████████
priority: Low
public_read: true
tags:
  - user:tag/league-xo-football.md
updated_at: '2026-07-17T23:03:42.854Z'
visibility_analyzed_at: '2026-11-05T23:48:37.125Z'
---

# Implementation Plan: Consume Shared Label Map in League-Settings Components

## Overview

- Refactor the six `app/views/components/league-settings-*` components to import their field labels from `libs-shared/constants/league-settings-labels.mjs` (the shared map created by `add-league-team-markdown-context-docs.md`), removing the inline label literals currently duplicated in JSX.
- Split out of the context-docs task per surgical scope: that task creates the shared label map as an additive, server-consumed constant; this task is the pure UI-side DRY consolidation, which touches shipped, working components and has no urgency tied to the docs feature.
- Impact: field→label mapping has a single home consumed by both the settings UI and the rules context doc; a future label change is made in one place.

## Background

- Scoring / starting-lineup / roster-limit field labels currently live only as inline strings in `league-settings-passing`, `-rushing`, `-receiving`, `-misc-scoring`, `-starting-lineup`, `-roster-limits`.
- The parent task creates `libs-shared/constants/league-settings-labels.mjs` exporting `scoring_field_labels`, `starting_lineup_labels`, `roster_limit_labels` and consumes it server-side in the rules doc generator. This task makes the UI consume the same source.

### Assumptions

- `libs-shared/constants/league-settings-labels.mjs` exists and exports the label maps the six components need (dependency: parent task ships it).

## Design

- Replace inline label literals in each of the six components with imports from the shared constant. No behavior change — the rendered labels must be identical to today's (verify visually).
- Where the shared map introduced new labels (misc-scoring fields not previously surfaced in the UI), decide per-field whether to surface them in the settings UI or leave them doc-only; default to no new UI fields in this task unless explicitly wanted.

## Plan

### Core Implementation

- [ ] **Refactor the six settings components onto the shared map**
  - File: modify `app/views/components/league-settings-passing/league-settings-passing.js`, `-rushing`, `-receiving`, `-misc-scoring`, `-starting-lineup`, `-roster-limits`.
  - Purpose: single source for field labels.
  - Changes: import the relevant map(s) from `libs-shared/constants/league-settings-labels.mjs`; replace inline label literals with lookups.
  - Verify: `grep` confirms no inline label literals remain in the six components; `yarn lint` clean; `yarn dev:live` and visually confirm each settings section renders identical labels to before.

### Testing & Validation

- [ ] **Build + regression**
  - Verify: `yarn build` succeeds; `yarn test:local` passes.
