Draft
Conversation
…older name so diffs will be better when we update.
Contributor
PR ChecksCommit: Code quality improvements. (6c9b317)
|
Contributor
BuildsCommit: Code quality improvements. (6c9b317) |
suhaibabsi-inst
previously approved these changes
Apr 21, 2026
Contributor
suhaibabsi-inst
left a comment
There was a problem hiding this comment.
Looks good to me.
And perhaps, we can think of something to limit downloading (and code generation) to only those components that are relevant to Mobile. Apparently, a lot of those are tailored to Web.
petkybenedek
previously approved these changes
Apr 22, 2026
Base automatically changed from
feature/MBL-19905-InstUI-semantic-colors
to
master
April 22, 2026 11:53
The base branch was changed.
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.
Add component-level design tokens (InstUI component layer)
Adds a third token layer to InstUI, sitting above Semantic and Primitive: Component. Each UI component from
instructure-ui(Badge, TextInput, Checkbox, etc.) now has a typed Swift struct collecting all its design decisions — colors, sizes, spacing, typography — resolved against the active semantic theme.What changed
New layer:
InstUI.ComponentResources/Tokens/Component/)Sources/Component/Generated/) with a typed struct and dot-syntax accessorsInstUI.Theme.Componentsaggregates all components; accessible viaInstUI.Theme.default.componentsInstUI.Component.Resolverresolves component token references through the semantic layerAccessor API
.iui.<component>.<token>(e.g..iui.badge.borderRadius,.iui.checkbox.borderColor).iuiSemantic,.iuiSemanticSize,.iuiSemanticSpacing, etc..iuiPrimitive,.iuiPrimitiveSize,.iuiPrimitiveOpacity, etc.Resolver improvements
SizeResolvernow handlesemandpxunits in addition toremFontWeightResolvernow accepts direct CSS numeric weights ("400","700", etc.)Code generation
build-instui.jsfetches component JSONs from the GitHub API at the pinnedINSTUI_VERSIONsd.config.component.jsgenerates all component Swift files; theGenerated/directory is wiped and rebuilt on each run to stay in sync with upstreamIntended use
PR Info
refs: MBL-19905
builds: Student, Teacher, Parent
affects: Student, Teacher, Parent
release note: none
Test Plan