Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Docs: NavBar preview is too short for its dropdown and mobile menu

未关闭 适合新手
#46 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
next.js, react, tailwindcss, typescript
领域
design, frontend

调研方向

从 src/components/docs/preview-shell.tsx 和使用 PreviewComponents、registryName="navbar" 及 fullBleed 的 NavBar 文档页面开始;检查舞台尺寸与卡片溢出之间的相互影响。在约 390px 宽度下比较桌面端下拉菜单和移动端菜单,然后检查其他 fullBleed 预览是否出现回归问题。完成标准是两个菜单都能容纳在卡片内,且在 390px 宽度下没有水平溢出;请分别在浅色和深色模式下截取桌面端和移动端的屏幕截图。

由索引模型根据 Issue 内容生成。

描述

bug website

Problem

The NavBar docs preview (<PreviewComponents registryName="navbar" fullBleed>) is only as tall as the bar itself. fullBleed renders the demo with no padding or minimum height (src/components/docs/preview-shell.tsx), so the language dropdown and the mobile menu have no room inside the card:

  • On main, the card clips with overflow-hidden, so the open dropdown is cut off at the card edge.
  • With the clipping removed (as #44 does), the dropdown spills out of the card over the Installation section below.

Either way, the preview doesn't show the component's main interaction.

Expected

The NavBar preview stage reserves enough space for its popups: the open language menu with all demo locales, and the mobile menu at narrow widths. Both should fit inside the card.

Suggested fix

  • Give the fullBleed stage a minimum height, or let PreviewComponents accept a minHeight / className for the stage, and set it on the NavBar page (roughly min-h-[22rem]).
  • Leave the bar at the top of the stage; the empty area below is where the menus open.
  • Check the other fullBleed previews aren't affected.

Acceptance

  • Open language dropdown fits fully inside the preview card on desktop.
  • Mobile menu (~390px) fits inside the card.
  • No horizontal page overflow at 390px.
  • Screenshots: desktop and ~390px, light and dark.
主要语言
TypeScript
星标
39
派生
16
平均合并
2 天 12 小时
30 天内合并 PR
10

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

babelize/babelize-elements 的其他 Issue

查看 babelize/babelize-elements 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。