问题
用 Streamlit 做多页数据应用的开发者,随着应用变大,侧边栏导航只能把多个 streamlit_options_menu 纵向堆叠来'假装子菜单',界面乱且难维护;做日期筛选时也无法一次选整月,只能选单日。GitHub issue 原话:"as the app grows - there is a need for hierarchical menu to be placed in sidebar"。BI 看板作者也面临类似痛点:多个独立筛选控件堆满工具栏,读者要点很多步才能下钻(QuickSight 为此发布 hierarchy filter)。
目标用户
用 Streamlit(或类似 Python 数据应用框架)搭建内部工具、CRUD 应用和数据看板的开发者和数据团队。需求来自开源社区 issue,属于长尾但持续的痛点,单体付费意愿不明。
解决方案
- 树形侧边栏导航组件:支持至少一层子菜单,可点击(非 radio)切换页面,可放置在侧栏或主区域
- 月份选择模式:date input 增加整月选择的独立组件
- 拖拽或配置式层级定义:用简单 Python 数据结构声明菜单树
- 与 st.Page / 多页路由对接,减少手工维护
AI 角色有限:这主要是前端组件工程,AI 可用于开发提效,不是产品核心能力
MVP 范围
首版只做一件事:一个开箱即用的 Streamlit 层级导航侧边栏组件(树形、可点击、支持至少一层子菜单、可放侧栏或主区域)。
不做:月份选择器(可列为 roadmap)、通用 BI 看板的层级筛选器、非 Streamlit 框架支持、可视化配置后台。
风险
平台依赖:需求本质是 Streamlit 官方 feature request,官方随时可能内置实现(两个 issue 分别已有 58 和 64 赞)。
付费证据缺失:全部信号 willingness_to_pay 为 none,做成付费产品缺乏支撑。
生态竞争:streamlit_options_menu 等社区组件可被组合出粗糙替代品。
需求弱且分散:两个 feature request 痛感均只有 2/5,且分属导航和日期两个不同组件。
已有产品
| 产品 | 定位 | 价格 |
|---|---|---|
| streamlit | Feature request 的宿主平台,用户在等官方实现层级导航和月份选择器 | — |
| streamlit_options_menu | 被用作'叠两个组件模拟子菜单'的临时方案 | — |
信号证据
这张卡片依据的原始讨论。摘录保持原文,点“原文”查看上下文。
AWS Machine Learning Blog10月1日新品发布
“Today, we’re announcing the hierarchy filter in Quick Sight. With it, authors can offer rich, multi-level filtering in a single compact control, reducing clutter and guiding readers to the data they need in fewer steps.”
Dashboard authors must balance offering enough filter options for readers to explore data freely against cluttering the interface with too many separate filter controls.原文
GitHub Issues · streamlit/streamlit12月25日功能请求▲ 5814 条评论
“as the app grows - there is a need for hierarchical menu to be placed in sidebar. Something like streamlit_options_menu would be perfect to have in Streamlit, but with support of submenus (1 extra level should be enough).”
Streamlit users building growing multipage apps lack a sidebar navigation menu component with hierarchical (tree) structure and submenus.原文
GitHub Issues · streamlit/streamlit12月14日功能请求▲ 6420 条评论
“It would be great if you could choose an entire month from the date picker”
Streamlit users want the date picker to support selecting an entire month instead of a single date.原文