Repository navigation
fix(chat-call): stop the hero code block collapsing on the Chat & Messaging page - #599
Conversation
…saging page The custom CSS added in #348 set max-width: fit-content on every div in the hero code block. Mintlify's inner wrapper uses w-0 min-w-full, so the block shrank to about 2px wide, the command was clipped to "np", and the toolbar was pushed left of the content column. Remove the style block and its wrapper div so the page uses the default Mintlify code block. This also drops the forced black background, which made the light-theme code colours hard to read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbguTwdQxd6Vh7nDdURGwM
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
ketanyekale
left a comment
There was a problem hiding this comment.
Review: verified, approving
I reproduced the bug on the live page and re-measured the preview deployment in both themes at 1280px and 390px. Every claim in the description holds up.
Baseline reproduced — live /docs/chat-call at 390px: block width 2px, toolbar buttons at x = -85 / -53 / -21 (off-screen left). Matches the reported numbers exactly.
Diagnosis confirmed — the inner Mintlify wrapper really is w-0 min-w-full max-w-full, so max-width: fit-content on every descendant div collapses .code-block to ~2px and drags the right-4 toolbar off the left edge. Correct root cause, not a symptom fix.
Fix verified on the preview:
| Viewport | Theme | Block width | Toolbar x | Horizontal overflow |
|---|---|---|---|---|
| 1280px | dark | 516px | 509 / 541 / 573 | 0 |
| 390px | light | 350px | 263 / 295 / 327 | 0 |
Toolbar sits inside the block on the right in both cases, the full command renders, and .hero-skills-code is gone from the DOM with no leftover <style> tag. Code search finds no other use of that class, so removing it is self-contained. Mintlify Deployment and link-rot checks are green.
Non-blocking observations:
- At 390px the command is wider than the block (
scrollWidth391 vsclientWidth348), soaddsits under the toolbar's fade. The container isoverflow-x: scroll, so the text is reachable and the copy button returns the full command — this is stock Mintlify behaviour for a long line on mobile, not something this PR introduces. Worth knowing the hero command is not fully visible on a phone at a glance. - This drops the full-width black background #348 was going for. Agree with the call given the light-theme token colours, but whoever owns the hero design may want to revisit it deliberately rather than inherit the default by way of a hotfix.
Net: removes a visibly broken element with a correctly diagnosed, minimal, well-scoped change. Approving.
Description
On /docs/chat-call, the
npx @cometchat/skills addblock in the hero is broken. The block is about 2px wide, the command is clipped to "np", and the feedback, copy and ask-AI buttons sit to the left of the content column, partly off-screen.Cause: #348 added this CSS, which applies to every
divinside the block:Mintlify's inner code wrapper is
w-0 min-w-full, so its content width is effectively 0.fit-contentthen shrinks the outer.code-blockto almost nothing. The toolbar is positionedright-4from that block, so it ends up on the left.Fix: remove the
<style>block and thehero-skills-codewrapper, so the page uses the default Mintlify code block. That class isn't used anywhere else.The fix doesn't keep a black background at full width. Mintlify renders the light-theme code colours here, such as
rgb(10, 48, 105), and those are hard to read on#000.Type of Change
Checklist
Additional Information
Measured by removing the CSS from the live page in Chrome:
Light and dark themes gave the same widths and positions. Neither viewport scrolls horizontally.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XbguTwdQxd6Vh7nDdURGwM