Theming: Theming Documentation Refresh
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- documentation
Research direction
Start with packages/theming/README.md, packages/agentic/design/package.json, and the existing pages under docs/pages/Theming, then check the linked consolidation and dynamic-theme work before documenting APIs. Update the named READMEs and theming pages, including absolute source links and both authoring models. Run yarn lage test-links; done means the acceptance criteria are met without presenting compatibility shims as primary entry points.
Written by the indexing model from the issue text.
Description
Summary
Update three surfaces so that a developer reading any of them gets an accurate
picture of the consolidated theming contract: redirect packages/theming/README.md
away from the shim packages it still presents as entry points, create a missing
packages/agentic/design/README.md that describes the package's five entry points
and both authoring models, and revise the pages under docs/pages/Theming so that
import examples and usage descriptions match the current API rather than the legacy
Fluent Theme shape.
This task has no implementation work of its own. It is a clean-up pass that
becomes feasible once Package Consolidation fixes the submodule boundary and
Dynamic Theme Building defines the Flex-value authoring model, so examples
written here will not become stale before they are merged.
Goal
Make packages/theming/README.md, the new packages/agentic/design/README.md,
and the pages under docs/pages/Theming consistent with the post-consolidation
public contract. No surface should name a compatibility shim as a primary entry
point or describe only the legacy Fluent Theme authoring model as the way to
use theming in new code.
Stage
Stages 2 and 3. packages/theming/README.md and packages/agentic/design/README.md
can be written as soon as Stage 1 lands. The docs/pages/Theming pages that
describe appearance resolution and Flex-first authoring are complete only after
System Appearance Handling and Default Values Codegen stabilize the full API.
Why it matters
- Observed.
packages/theming/README.mdliststheme-typesand
theme-tokensas the theming entry points under a "Theme types and utilities"
heading. Both are compatibility shims.theme-typesis a re-export shim over
@fluentui-react-native/design/theming, andtheme-tokensloads whole token
JSON files at module scope and has not been migrated. Directing readers to
either package as a starting point describes a contract that is either
transitional or has already moved. - Observed.
packages/agentic/designhas noREADME.md. A contributor or
consumer arriving at the canonical theming package via GitHub or a package
registry finds no orientation material, no description of its five entry
points, and no links to developer documentation. - Observed.
docs/pages/Theming/Basics.mdpresentsuseFluentTheme()from
@fluentui-react-native/frameworkas the primary way to read theme values
inside a component. That hook reads the legacy FluentThemeshape; there is
no mention ofuseThemeState,useFlexTokens, or the
@fluentui-react-native/designhooks. - Observed.
docs/pages/Theming/CustomTheme.mddescribesThemeRecipesand
PartialThemeexclusively against the legacy Fluent token shape
(theme.colors,theme.typography,theme.spacing). Flex tokens are not
mentioned. One example uses_overridessyntax from the older foundation
framework. - Inferred. Docs that describe only the legacy contract will slow adoption of
the Flex-first path defined by Dynamic Theme Building, and may cause new
contributors to write components and tests against legacy hooks rather than
ThemeState.
Observed current state
- Observed.
packages/theming/README.mdis 14 lines. Its only links are to
default-theme,apple-theme,win32-theme,android-theme,theme-types,
andtheme-tokenssubpackage READMEs. There is no mention of
@fluentui-react-native/design,ThemeProvider, orThemeReference, and no
description of the consolidation that has already taken place. - Observed.
packages/agentic/designhas noREADME.mdfile. Its five
entry points (.,./tokens/global,./theming,./testing,./styling)
are described only in itspackage.jsonexportsmap and in the
research/theming/README.mdworkstream document. - Observed.
docs/pages/Theming/Basics.mdimportsThemeProviderfrom
@fluentui-react-native/design/theming(already updated) but then imports
useFluentThemefrom@fluentui-react-native/frameworkfor property access,
and showstheme.colors.bodyTextas the canonical pattern. The design package
hooks (useThemeState,useFlexTokens) are not referenced. - Observed.
docs/pages/Theming/CustomTheme.mddescribesThemeReference
construction andThemeRecipesagainst the legacy FluentThemeshape only.
Code examples accesstheme.colors,theme.host.palette,theme.typography,
andtheme.spacing. Flex token access and the Flex-value context type are
absent. One code block demonstrates the_overridesshape from the older
foundation framework. - Observed.
docs/pages/Theming/DefaultThemes.mdlistscreateDefaultTheme(),
createAndroidTheme(),createAppleTheme(), andcreateOfficeTheme()as the
complete creation API. There is no description of a Flex-first creation path. - Observed. Several pages under
docs/pages/Theming/already link to source
files underpackages/agentic/design/srcvia relative paths, confirming a
partial update pass was done, but the consumer-facing API descriptions and
import examples were not updated at the same time. - Observed. Three pages under
docs/pages/Theming/Tokens/cover global token
overrides and component token usage using the legacy framework composition
model.
Scope
- Update
packages/theming/README.mdto name@fluentui-react-native/designas
the theming entry point, describe each subpackage's current role (platform
theme or compatibility shim), and remove the "Theme types and utilities"
framing that elevates the two shim packages. - Create
packages/agentic/design/README.mddescribing the five entry points
and their intended use cases, the two authoring models (Flex token and legacy
Fluent), the relationship betweenThemeProviderandThemeState, and links
todocs/pages/Theming. - Update
docs/pages/Theming/Basics.mdto cover both the Flex token path
(useThemeState,useFlexTokens) and the legacy Fluent hook path, with clear
guidance that new code should prefer the design package hooks. - Update
docs/pages/Theming/CustomTheme.mdto describe Flex-first
customization alongside the existingThemeRecipescontent. Remove or
annotate the_overridesexample as a legacy-only pattern. - Update
docs/pages/Theming/DefaultThemes.mdto reflect the current entry
point and describe the Flex-first creation path alongside the existing platform
functions. - Correct any remaining import paths, package names, or API references under
docs/pages/Theming/that no longer match the consolidated contract.
Out of scope
- Changing any runtime behavior or token values.
- Writing new tutorials or end-to-end migration guides for consumers moving off
legacy framework components. - Updating reference documentation for
packages/framework/use-tokens,
use-styling, orthemed-stylesheetbeyond annotating them as legacy paths. - Documentation work that requires runtime color derivation or the Apple theme
to be accurate; those updates follow
Runtime Color Utilities and
Apple Theme. - Adding API reference pages or auto-generated documentation.
Deliverables
- An updated
packages/theming/README.mdthat describes each subpackage's
current role and redirects readers to@fluentui-react-native/design. - A new
packages/agentic/design/README.mdcovering the five entry points,
both authoring models, and links todocs/pages/Theming. - Updated
docs/pages/Theming/Basics.md,CustomTheme.md, and
DefaultThemes.mdwith correct import paths and usage examples for both
authoring models. - Corrections to any other pages under
docs/pages/Theming/where package
names, import paths, or API descriptions no longer match the consolidated
contract. - Changesets for
packages/themingandpackages/agentic/designif their
published documentation content changes.
Acceptance criteria
-
packages/theming/README.mdnames@fluentui-react-native/designas the
theming entry point and describes each subpackage's current role without
presenting any compatibility shim as a primary consumer entry point. -
packages/agentic/design/README.mdexists and lists all five entry points
with their import path, describes the Flex token and legacy Fluent
authoring models, and links to the developer documentation pages. - No page under
docs/pages/Theming/still namestheme-typesor
theme-tokensas a primary entry point. -
docs/pages/Theming/Basics.mdincludes a working example using the design
package hooks alongside the legacyuseFluentThemeexample, with the
legacy path clearly marked. - All source links in the updated documentation use absolute
https://github.com/microsoft/fluentui-react-native/blob/main/or
tree/mainURLs rather than relative source paths. -
yarn lage test-linkspasses at the repository root after all changes,
confirming no broken links were introduced. - Changesets are present for
packages/themingandpackages/agentic/design
if their published documentation content changed, and no changeset requests
a major version.
Dependencies and ordering
- Requires Package Consolidation so that
documentation can describe the final submodule boundary rather than a
transitional state. - Requires Dynamic Theme Building so that
Flex-first authoring examples are accurate and the Flex-value context type is
stable. - The sections of
docs/pages/Themingcovering appearance resolution depend on
System Appearance Handling; those updates land in
Stage 3. docs/pages/Theming/DefaultThemes.mdshould not describe generated default
construction until Default Values Codegen has
stabilized the creation API.- Does not block any other task in this workstream.
Risks and open decisions
- Open decision. Whether
packages/agentic/design/README.mdcontains full
prose or is a brief orientation page that delegates todocs/pages/Theming.
A short README with links is lower maintenance than a comprehensive README
that can drift from the docs site. - Open decision. Whether the primary getting-started example in
docs/pages/Theming/Basics.mdshould show the Flex token path or the legacy
ThemeReferencerecipe after Dynamic Theme Building lands. Inferred: new
code should prefer the Flex path, but the legacy path must remain documented
for existing component consumers. - Risk. If Package Consolidation or Dynamic Theme Building introduce
additional API changes after this documentation lands, the docs will drift
again. Tying the finaldocs/update to the stabilizing commit in each
dependency reduces this risk. - Risk.
docs/pages/Theming/CustomTheme.mdcontains_overridesexamples
from the older foundation framework. Determining whether that pattern is still
supported requires cross-checking with the current composition package before
those examples are updated or removed.
Evidence and references
packages/theming/README.md: 14-line file presentingtheme-typesandtheme-tokensas the entry points.packages/agentic/design: canonical theming package; noREADME.mdpresent.packages/agentic/design/package.json: the five declared entry points.packages/theming/theme-types/src/index.ts: compatibility shim; still advertised as an entry point bypackages/theming/README.md.packages/theming/theme-tokens/src/index.ts: unmigrated token loading; still advertised as an entry point bypackages/theming/README.md.docs/pages/Theming/Basics.md:useFluentThemefrom@fluentui-react-native/frameworkas the primary hook example.docs/pages/Theming/CustomTheme.md:ThemeRecipesandPartialThemeagainst the legacy FluentThemeshape only; contains_overridesexample.docs/pages/Theming/DefaultThemes.md: legacy creation functions only; no Flex-first path.docs/pages/Theming/ThemedStylesheet.md: legacyThemedStyleSheetAPI.docs/pages/Theming/Tokens/: token override and component token usage pages using the legacy framework model.- Package Consolidation: defines the final submodule boundary this documentation describes.
- Dynamic Theme Building: defines the Flex-value context type and authoring model to be documented.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 179
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 30
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/fluentui-react-native
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/fluentui-react-native#4174 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/fluentui-react-native#4343 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
microsoft/fluentui-react-native#4344 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
microsoft/fluentui-react-native#4345 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
microsoft/fluentui-react-native#4346 ·
Maintainers usually reply within 1 day
All issues in microsoft/fluentui-react-native
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day