Conversation
…early and avoid white flashes
📝 WalkthroughWalkthroughDetects per-theme presence of an early-color-scheme.js file, exposes that info on BuildContext, injects the script into generated FTL head when present, removes an early SPA-only early-exit so extension static resources are processed for SPA themes, and annotates extension files referencing the early-color-scheme script. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as Keycloakify CLI
participant BC as BuildContext
participant FS as FileSystem
participant FTL as FTL Generator
participant Resources as Resource Processor
CLI->>BC: getBuildContext()
BC->>FS: check theme public paths for early-color-scheme.js
FS-->>BC: existence boolean per theme
CLI->>FTL: generate FTL using BuildContext
FTL->>BC: read implementedThemeTypes for theme
FTL-->>FTL: inject early-color-scheme.js <script> if flagged
CLI->>Resources: generateResources using BuildContext
Resources->>FS: transform/copy extension public resources (no SPA early-exit)
FS-->>Resources: copied resources (including early-color-scheme.js)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hello @Oussemasahbeni, This PR makes it so that if there is a file like If you update https://github.com/Oussemasahbeni/keycloakify-shadcn-starter so the NPM package includes include Bottom line: The users won't have to edit the index.html. |
|
Hello @garronej |
|
@Oussemasahbeni if you're reffering to this doc: https://docs.keycloakify.dev/starter-themes/shadcn-ui-tailwind No, nothing need to be added, that's the point. However a new version of @oussemasahbeni/keycloakify-login-shadcn should be released that includes keycloak-theme/public/login/early-color-scheme.js |
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.