Skip to content

Allow accent color lookup to use supplied bundle - #504

Open
haaaaaaarshs wants to merge 1 commit into
skiptools:mainfrom
haaaaaaarshs:fix-issue-431
Open

Allow accent color lookup to use supplied bundle#504
haaaaaaarshs wants to merge 1 commit into
skiptools:mainfrom
haaaaaaarshs:fix-issue-431

Conversation

@haaaaaaarshs

@haaaaaaarshs haaaaaaarshs commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a bundle-passing path for the Android AccentColor asset lookup so that callers are no longer limited to searching Bundle.main.

Issue #431 describes an AccentColor resource that may belong to an application's module bundle. However, Color.assetAccentColor currently searches only Bundle.main, preventing resources stored in another bundle from being found.

Changes

  • Updated Color.assetAccentColor to accept a supplied Bundle.
  • Used the supplied bundle in both the AssetKey cache key and the assetColorInfo lookup.
  • Updated ColorScheme.asMaterialTheme to accept and forward an accentColorBundle.
  • Updated PresentationRoot to accept and forward the accent-color bundle.
  • Preserved Bundle.main as the default for backward compatibility.

Architectural note

This PR establishes the SkipUI-side path needed to supply the application's resource bundle to the accent-color lookup.

A generated application template or another application entry point may still need to pass its module bundle, such as .module, into PresentationRoot. I previously asked on Issue #431 whether that final integration should live in the generated template, ComposeContext, or another shared rendering mechanism.

I am submitting the implementation for review so the maintainers can determine the preferred integration point and whether a companion change is needed elsewhere.

Testing

  • git diff --check
  • swift test

Test results:

  • 92 tests
  • 87 passed
  • 5 skipped
  • 0 failed

Related to #431

Skip Pull Request Checklist

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the [Skip Fuse UI]

@cla-bot cla-bot Bot added the cla-signed label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant