[New Component] Popover
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- csharp, javascript
调研方向
Start with the existing Tooltip component and its JavaScript interop in wwwroot/blazor.bootstrap.js, since the issue says Popover should follow the same pattern. Create the new component under blazorbootstrap/Components/Popover/ and add its interop beside Tooltip's. Done means the must-have checklist works in the Server and WebAssembly demo hosts, with XML docs, a demo page and a docs page.
由索引模型根据 Issue 内容生成。
描述
Summary
Add a Popover component wrapping the Bootstrap 5 popover, with support for rich RenderFragment content and programmatic control.
Motivation
Users regularly ask for richer content than Tooltip supports — tables, formatted text, buttons, and small forms (#725, #1048). Popover is part of Bootstrap 5 and already available in the bundled script, so it follows the existing Tooltip interop pattern.
Proposed API (draft)
<Popover Title="Order details" Placement="PopoverPlacement.Right" Trigger="PopoverTrigger.Click">
<ContentTemplate>
<table class="table table-sm mb-0">...</table>
</ContentTemplate>
<ChildContent>
<Button Color="ButtonColor.Primary">Show details</Button>
</ChildContent>
</Popover>
@code {
private Popover popover = default!;
private Task ShowAsync() => popover.ShowAsync();
}
Must-have features (v1)
-
Title/Content(string) andTitleTemplate/ContentTemplate(RenderFragment). -
Placement(PopoverPlacement: Auto, Top, Right, Bottom, Left). -
Trigger(PopoverTrigger: Click, Hover, Focus, Manual; combinable). -
Offset,Container,Color,Disabled. - Methods:
ShowAsync,HideAsync,ToggleAsync,UpdateAsync(reposition). - Events:
OnShowing,OnShown,OnHiding,OnHidden. - Dismiss on outside click and Escape (configurable
AutoClose). - Content re-renders in place without destroying and re-creating the popover.
- Interop instance disposed on component dispose and safe on circuit disconnect.
Accessibility
- Trigger element gets
aria-describedby/aria-expanded. - Focus moves into interactive popover content when opened by keyboard and returns to the trigger on close.
Out of scope (later)
- Using Popover inside Grid filter menus and Dropdowns.
- Auto width-to-content sizing options.
Acceptance criteria
- Component in
blazorbootstrap/Components/Popover/with interop inwwwroot/blazor.bootstrap.js. - XML docs on all public parameters, methods, and events.
- Demo page covering: placements, triggers, HTML/table content, programmatic control, events, dismiss behavior, colors, disabled.
- Verified in Server and WebAssembly demo hosts, including navigation away while a popover is open.
- Docs page
docs/docs/05-components/popover.mdx. - Builds for .NET 8, 9, 10.
Related
#725, #1048
- 主要语言
- HTML
- 星标
- 1.2k
- 派生
- 111
- 平均合并
- 4 分钟
- 30 天内合并 PR
- 55
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vikramlearning/blazorbootstrap 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
vikramlearning/blazorbootstrap#1388 ·
维护者通常 1 天内回复
-
NET 11 Support未关闭
难度 3/5 1-2 天 新手友好度 28/100
vikramlearning/blazorbootstrap#1362 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
vikramlearning/blazorbootstrap#1346 ·
维护者通常 1 天内回复
-
Showcase: rich sample websites built with Blazor Bootstrap可能已有人在做 @gvreddy04 于 8 天前认领。 未关闭
vikramlearning/blazorbootstrap#1343 · 已指派 1 人 ·
维护者通常 1 天内回复
-
area-tree-view new component
难度 5/5 一周以上 新手友好度 8/100
vikramlearning/blazorbootstrap#1339 ·
维护者通常 1 天内回复
查看 vikramlearning/blazorbootstrap 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
browser: chrome package: @carbon/react type: bug 🐛
难度 2/5 1-3 小时 新手友好度 70/100
carbon-design-system/carbon#24074 ·
维护者通常 1 天内回复
-
bug trading ui
难度 2/5 1-3 小时 新手友好度 78/100
userFRM/egui-charts#3280 ·
维护者通常 1 天内回复
-
Bug Website Accessibility
难度 2/5 1-3 小时 新手友好度 76/100
ProjectSidewalk/SidewalkWebpage#5999 ·
维护者通常 1 天内回复
-
a11y team Accessibility Bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复