feat: finish the Mcu → Mtb rename in the context value - #173
Merged
Conversation
The `Mcu` → `Mtb` rename (#166, #169) covered the component, the hook and the config type, but left the shape of the value `useMtb()` returns untouched: it still handed back `mcuConfig`, `setMcuConfig` and `getMcuColor`. They are now `mtbConfig`, `setMtbConfig` and `getMtbColor`. The `mcu*` keys stay on the context value as `@deprecated` aliases holding the very same references, so existing destructuring keeps working until the next major. The `id` of the injected `<style>` tag stays `mcu-styles` — it is observable from user CSS and scripts, so renaming it would break selectors silently. Only the local binding follows the rename. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dap13K3ck1Xjt5m5i7VNAu
abernier
force-pushed
the
feat/mtb-context-keys
branch
from
August 5, 2026 18:13
4147635 to
3f254b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Mcu→Mtbrename (#166, #169) covered the component, the hook and the config type, but left the shape of the valueuseMtb()returns untouched: it still handed backmcuConfig,setMcuConfigandgetMcuColor— so the documenteduseMtbexample in the README readconst { setMcuConfig, getMcuColor } = useMtb().Changes
src/Mtb.context.tsx—mcuConfig/setMcuConfig/getMcuColorare nowmtbConfig/setMtbConfig/getMtbColor. Themcu*keys stay on the context value as@deprecatedaliases holding the very same references, so existing destructuring keeps working until the next major. TheUnknown MCU tokenerror message drops the acronym.src/Flowfield.stories.helpers.tsx— the ~30 call sites follow.README.md— theuseMtbexample uses the new names.src/Mtb.tsx— the localmcuStyleIdbinding becomesstyleId.What deliberately keeps the old name
Mcu/useMcu/McuConfigaliases, as introduced in feat: rename theMcucomponent toMtb, deprecateMcu#166 and feat: finish theMcu→Mtbrename (useMtb,MtbConfig,Mtb.context) #169.idof the injected<style>tag staysmcu-styles. It is observable from user CSS and scripts, so renaming it would break selectors silently — a comment inMtb.tsxrecords why.Tests
New test asserting each
mcu*context key is the same reference as itsmtb*counterpart. Fullpnpm run lgtmgreen (111 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01Dap13K3ck1Xjt5m5i7VNAu