Commit e2a9414
authored
feat(template): add ICON_BUILDER constant to TemplateConstants.Fragment (#327)
* feat(template): add ICON_BUILDER constant to TemplateConstants.Fragment
Resolves #258.
Adds `const val ICON_BUILDER = "icon_builder"` to the `Fragment`
object in `TemplateConstants.kt` and updates the two test sites that
were using the hardcoded literal as a fragments-map key to reference
the new constant:
- TemplateEmitterTest.kt (fragments = mapOf(...))
- PlaceholderResolverTest.kt (fragments = mapOf(...))
Docs/TOML occurrences of "icon_builder" are left untouched: those are
user-facing TOML keys or placeholder strings inside templates (e.g.
${template:icon_builder}), not Kotlin fragment-lookup references.
* feat(template): also use Fragment.ICON_BUILDER in TemplateEditorSchema
Per @rafaeltonholo review on #327 - replaces the remaining "icon_builder"
string literals in the website's TemplateEditorSchema.kt with
TemplateConstants.Fragment.ICON_BUILDER, keeping the website in lockstep
with the core Fragment constant rename. Only the two fragment-map usages
were changed; the definitions.imports key stays as a TOML schema string
since it's a user-facing TOML key, not a Fragment reference.
Relying on CI for detekt/build verification - local JVM toolchain not
wired up on this machine.
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>1 parent e0d963d commit e2a9414
4 files changed
Lines changed: 7 additions & 5 deletions
File tree
- svg-to-compose/src
- commonMain/kotlin/dev/tonholo/s2c/emitter/template
- commonTest/kotlin/dev/tonholo/s2c/emitter/template
- resolver
- website/site/src/jsMain/kotlin/dev/tonholo/s2c/website/components/organisms/playground/template
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
0 commit comments