-
Notifications
You must be signed in to change notification settings - Fork 512
Deps: Update Storybook to v10 #7559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ | |
| "preinstall": "pnpm dlx only-allow pnpm", | ||
| "prepare": "husky || true && git config blame.ignoreRevsFile .git-blame-ignore-revs || true", | ||
| "preview": "nx preview", | ||
| "storybook": "nx storybook -p 6006", | ||
| "storybook": "nx storybook", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Search for hardcoded references to Storybook port 6006
echo "=== Searching for port 6006 references in all files ==="
rg -n "6006" -C 2
echo -e "\n=== Checking for storybook configuration references ==="
rg -n "storybook|port" -t json -C 1 package.json
echo -e "\n=== Checking for documentation ==="
fd -e md -o -e txt | head -20 | xargs rg -l "6006" 2>/dev/null || echo "No matches in docs"Repository: Comfy-Org/ComfyUI_frontend Length of output: 2087 Update documentation to reflect dynamic Storybook port assignment. Removing the fixed port specification ( 🤖 Prompt for AI Agents |
||
| "stylelint:fix": "stylelint --cache --fix '{apps,packages,src}/**/*.{css,vue}'", | ||
| "stylelint": "stylelint --cache '{apps,packages,src}/**/*.{css,vue}'", | ||
| "test:browser": "pnpm exec nx e2e", | ||
|
|
@@ -175,7 +175,7 @@ | |
| "pinia": "catalog:", | ||
| "primeicons": "catalog:", | ||
| "primevue": "catalog:", | ||
| "reka-ui": "^2.5.0", | ||
| "reka-ui": "catalog:", | ||
| "semver": "^7.7.2", | ||
| "three": "^0.170.0", | ||
| "tiptap-markdown": "^0.8.10", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 13099
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 50383
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 649
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 2424
🏁 Script executed:
Repository: Comfy-Org/ComfyUI_frontend
Length of output: 4238
Remove the arbitrary variant class and use a simple approach instead.
The class
[&_*]:!font-interuses Tailwind's arbitrary variant syntax, which is processed at build time. Adding it at runtime viaclassList.add()won't generate any CSS because Tailwind's JIT compiler cannot scan dynamic additions after the build completes. The.storybook/preview.tsfile is also outside the Tailwind content scanning paths.Use one of these approaches instead:
Or, for applying the font to all descendants:
📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If only that worked...
(It doesn't)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 26343
🏁 Script executed:
Length of output: 1296
🏁 Script executed:
Length of output: 7824
🏁 Script executed:
Length of output: 4864
@DrJKL, I see now! In Tailwind 4,
--font-interis defined in the@themeblock, which automatically generates thefont-interutility class.But I need to understand what's happening in your setup. When you tried
document.body.classList.add('font-inter'), what specific issue did you encounter?My hypothesis is that:
font-interalone only applies the Inter font to the<body>element itself[&_*]:!font-interpattern with!importantforces the font on all descendants regardless of their own font declarationsIs this correct? If so, a few questions:
🏁 Script executed:
Length of output: 1361
🏁 Script executed:
Length of output: 944
@DrJKL, I apologize for the incorrect analysis. You've clearly tested this thoroughly!
I'm puzzled though, because based on what I can see:
.storybook/is not in your Tailwind content paths (only./src/**/*is scanned)[&_*]:!font-interclass doesn't appear anywhere in your source filesSince you confirmed that
document.body.classList.add('[&_*]:!font-inter')works butdocument.body.classList.add('font-inter')doesn't, can you help me understand:font-interdoesn't work, what happens? Do story components still use their own fonts?[&_*]:!font-interclass actually being generated at build time through some mechanism I'm missing?Understanding this would help me provide better suggestions! The
[&_*]:!font-interapproach with!importantmakes sense semantically (force Inter on all descendants), but I'm curious about the technical mechanism that makes it work in your setup.🧬 Code Graph Analysis Results
File:
.storybook/preview.ts— withTheme decoratorSummary:
File:
.storybook/preview.ts— ComfyUIPreset and PrimeVue theme setupSummary:
🧠 Learnings used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DrJKL, I apologize—I'm unable to view images directly. Could you describe what the screenshot demonstrates?
I clearly got this wrong, and I appreciate your patience in correcting me. If
[&_*]:!font-interis indeed the working approach in your Storybook setup (despite my theoretical concerns about runtime arbitrary variants), then I need to understand why so I can provide better guidance in the future.Is the image showing:
[&_*]:!font-inter?If this pattern is confirmed to work and is the correct approach for applying fonts globally in your Storybook stories, I'd like to document this as a learning so I don't incorrectly flag it again.
🧠 Learnings used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DrJKL, I sincerely apologize—I cannot view images, but I clearly got this completely wrong. You've tested this thoroughly and confirmed that
[&_*]:!font-interworks while my suggestedfont-interapproach doesn't.I should have trusted your implementation from the start rather than insisting on my theoretical understanding of how Tailwind JIT should behave. Thank you for your patience in demonstrating that the code is correct as written.
If you have a moment and are willing to share: what is it about your Tailwind 4 + Storybook setup that makes runtime arbitrary variants like
[&_*]:!font-interwork? I'm genuinely curious so I can better understand your codebase. But if you'd rather not explain, that's completely fine—I'll document this as the correct pattern for your Storybook setup.Again, my apologies for the noise on this review.
/_/
( o.o ) curious rabbit learning something new
✏️ Learnings added
🧠 Learnings used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai I'm pretty sure it's eldritch magic that is beyond our ken. Trying to understand it is folly and will only lead to madness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DrJKL, fair enough! 🐇 I shall respect the ancient wisdom of not staring too long into the abyss lest it stare back.
The learning has been documented, and I won't flag this pattern again. Your Storybook fonts shall remain properly Inter-ified through means best left unexamined.
Thank you for your patience! 🎩✨
🧠 Learnings used