Repository navigation
Wire IconDriverInterface in, make cache(false) work, read components.test_icons - #174
Merged
Merged
Conversation
The interface described a directory API no driver in use implemented, and SvgDriver, the driver core runs, implemented nothing. The interface now states SvgDriver's render() and load(), SvgDriver implements it, the provider binds it to the SvgDriver singleton, and IconRegistry, IconSvgReader and DirectoryIconDriver depend on it. A bound fake renders through the registry; it could not be declared before (C-17).
cache() set a flag nothing read, so a set always cached. get() and all() now rediscover on every call when it is off, and caching stays on by default. Two properties nothing wrote or read, $discoveredIcons and $initialized, are removed.
ComponentPrefixes::testIconsEnabled() answers components.test_icons, off whenever components.enabled is, so icon-browser can read core's key. The config and the Blade page say who reads it. isIchavaQueueCommand() lost its only caller in C-01 and is removed (forward-only).
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
The snippet was always <x-ichava::icon>, so with components.short_prefix off a host copied a tag that does not render. It now uses the short prefix while one is configured and ichava-core when it is off, through ComponentPrefixes::snippetPrefix(). Red for the renamed and the off cases.
icon-sets.json gains visibility, public or private, synced by bin/sync-icon-sets.php from the repos API and kept when a response does not state it, so consumers read one source for which packs are public (F-02). Documented under The pack catalogue.
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.
Summary
The core items left after #172 and #173.
IconDriverInterfacewired in (C-17). The interface described a directory API no driver in use implemented. It now statesSvgDriver's realrender(IconData …)andload(string $path …);SvgDriverimplements it, the provider binds it, andIconRegistry,IconSvgReaderandDirectoryIconDriverdepend on it. Red: a fake driver implementing the interface could not even be declared before.IconSetBuilder::cache(false)works. It set a flag nothing read. Red: a set with the cache off still served an icon whose file had been deleted.$discoveredIconsand$initialized, written and read by nothing, are removed.components.test_iconsis read throughComponentPrefixes::testIconsEnabled(), off whenevercomponents.enabledis, and documented, so icon-browser can read core's key.IchavaServiceProvider::isIchavaQueueCommand()removed: unused since Implement the core re-audit: one pack path, bulk registration, short tag, host safety #172 moved the runtime limits.Verification
vendor/bin/pest: 1076 passed, 10 skipped.PHPStan
--debug: no errors.composer pint: passed.The generic Blade snippet follows the registered prefixes.
IconBrowserService::generateBladeComponent()wrote<x-ichava::icon>always, so a host withcomponents.short_prefix=nullcopied a tag that does not render. It now usesComponentPrefixes::snippetPrefix(): the short prefix while one is set,ichava-corewhen it is off. Red for the renamed and the off cases.icon-sets.jsonrecordsvisibility(public/private) per catalogued pack, synced bybin/sync-icon-sets.phpfrom the repos API and kept when a response does not state it (F-02). Documented indocs/tools/artisan-commands.md. The catalogue lists public packs only, so private packs are not named in this public repository.Pest after these: 1086 passed, 10 skipped; PHPStan and pint clean.