feat(facade): add optional view config resolver#73
Open
wolfy-j wants to merge 2 commits into
Open
Conversation
Add an optional wippy.facade:resolver contract.definition that lets an
application override facade requirement values (css_variables, custom_css,
app_title, ...) at request time. When no implementation is bound the config
and CSS-vars handlers fall back to the static ns.requirement defaults, so
behavior is unchanged for existing deployments.
theming_helpers gains resolve_overrides() (structural :implementations()
gate, ambient-actor open, pcall-hardened to {} on any failure) and
requirement() (override string wins over the static default). Both handlers
resolve overrides once per request and route every requirement read through
the override-aware getter.
The endpoints degrade to static on any resolver failure, so unbound and errored are indistinguishable and need no distinguishing; open() fails cleanly when nothing is bound. Removes the implementations() round-trip and the unused logger.
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.
Adds the optional wippy.facade:resolver contract used by applications that want runtime facade config/theming overrides. Backward compatibility: unbound resolver paths degrade to the existing static ns.requirement defaults, so existing apps do not need to bind anything.\n\nPublished package source: wippy/facade@0.6.20.\n\nVerification:\n- make test in src/facade/test: 2/2 passed