Skip to content

Feature/add bottomnav component - Close #20 - #100

Merged
albx merged 10 commits into
albx:mainfrom
Defkon1:feature/add-bottomnav-component
Jul 31, 2026
Merged

Feature/add bottomnav component - Close #20#100
albx merged 10 commits into
albx:mainfrom
Defkon1:feature/add-bottomnav-component

Conversation

@Defkon1

@Defkon1 Defkon1 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Added BottomNav component, with docs and tests

@Defkon1

Defkon1 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Close #20

@albx albx linked an issue Jul 24, 2026 that may be closed by this pull request
@albx
albx requested review from albx and Copilot July 24, 2026 17:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new BitBottomNav component to the BitBlazor UI kit, along with supporting storybook examples, documentation, and bUnit rendering tests to help consumers adopt a mobile-style bottom navigation pattern.

Changes:

  • Added BitBottomNav and BitBottomNavItem implementation under src/BitBlazor/Components/BottomNav/.
  • Added bUnit rendering coverage and BlazingStory stories/layout for showcasing the component.
  • Added documentation page plus references in the docs index and quick reference.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tests/BitBlazor.Test/Components/BottomNav/BitBottomNavTest.Rendering.razor Adds rendering tests for default, badge, and alert variants.
stories/BitBlazor.Stories/Layouts/SimpleMobileViewPort.razor Introduces a small layout wrapper for mobile-sized story rendering.
stories/BitBlazor.Stories/Layouts/SimpleMobileViewPort.razor.css Provides basic styling/positioning for the mobile viewport layout and bottom-nav placement.
stories/BitBlazor.Stories/Components/Stories/Components/BitBottomNav.stories.razor Adds stories demonstrating default, badges, alerts, and varying item counts.
src/BitBlazor/Components/BottomNav/BitBottomNavItem.cs Defines the BottomNav item model (text/icon/link/badge/alert state).
src/BitBlazor/Components/BottomNav/BitBottomNav.razor.cs Adds component parameters and CSS class composition helper.
src/BitBlazor/Components/BottomNav/BitBottomNav.razor Implements the rendered markup for the bottom navigation list/items.
docs/README.md Adds BottomNav to the components list in documentation index.
docs/quick-reference.md Adds a quick-reference snippet for BottomNav usage.
docs/components/bottomnav.md Adds the full BottomNav documentation page (usage, parameters, accessibility notes).
BitBlazor.sln Includes the new BottomNav documentation page in the solution’s docs section.
Comments suppressed due to low confidence (2)

docs/components/bottomnav.md:36

| `Link`     | `string?`  | `null`                | Optional URL for the item (<a href="...">).         |

docs/components/bottomnav.md:83

  • These lines include raw '' and '' HTML tags in Markdown. Wrap them in backticks so they don't get parsed as HTML and potentially break formatting.
- `bottom-nav` — root container on the <nav> element.
- `active` — applied to an item's <a> when IsActive is true.

Comment thread src/BitBlazor/Components/BottomNav/BitBottomNav.razor.cs
Comment thread src/BitBlazor/Components/BottomNav/BitBottomNav.razor Outdated
Comment thread src/BitBlazor/Components/BottomNav/BitBottomNav.razor Outdated
Comment thread docs/quick-reference.md
Comment thread docs/components/bottomnav.md Outdated
Comment thread docs/components/bottomnav.md Outdated
Comment on lines +54 to +55
var items = new()
{

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Defkon1 same here

Comment thread docs/components/bottomnav.md Outdated
Comment thread docs/components/bottomnav.md Outdated

@albx albx left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Defkon1 I was wondering if this component should match the design of BitToolbar (checkout docs here).

The problem I see it's what if I don't want a component which triggers a page navigation but only a click event (like a sort of tab behavior for example). The solution I found (and up to now I'm still not sure it's the best solution) is control the single Item as a child component and specify both Href and OnClick event which works together (see https://github.com/albx/bitblazor/blob/main/src/BitBlazor/Components/Toolbar/BitToolbarItem.razor.cs and https://github.com/albx/bitblazor/blob/main/src/BitBlazor/Components/Toolbar/BitToolbarItem.razor).

If you need help or simply talk about it let me know. Thank you for your contrib!

@Defkon1

Defkon1 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@Defkon1 I was wondering if this component should match the design of BitToolbar (checkout docs here).

The problem I see it's what if I don't want a component which triggers a page navigation but only a click event (like a sort of tab behavior for example). The solution I found (and up to now I'm still not sure it's the best solution) is control the single Item as a child component and specify both Href and OnClick event which works together (see https://github.com/albx/bitblazor/blob/main/src/BitBlazor/Components/Toolbar/BitToolbarItem.razor.cs and https://github.com/albx/bitblazor/blob/main/src/BitBlazor/Components/Toolbar/BitToolbarItem.razor).

If you need help or simply talk about it let me know. Thank you for your contrib!

I refactored the BitBottomNavItem logic/UI in a separate component, and I adjusted its implementation following the BitToolbarItem in 58a9eb6.

However, I believe that for this type of components a choice must be made regarding the management of child components; we should opt for the approach of explicitly defining the children components, or we should favor the "enumerable list of items" way?

As far I can see you opted for the first with the BitToolbar, while I preferred the second one in BitBottomNav. I can see pros/cons in both ways, so I think we should just choose one standard and adhere to it...

@Defkon1
Defkon1 requested a review from albx July 31, 2026 10:02
@albx

albx commented Jul 31, 2026

Copy link
Copy Markdown
Owner

However, I believe that for this type of components a choice must be made regarding the management of child components; we should opt for the approach of explicitly defining the children components, or we should favor the "enumerable list of items" way?

@Defkon1 absolutely agree! I will figure out pros and cons of both methods and then we will find a common approach

@albx
albx merged commit f461cbc into albx:main Jul 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add BottomNav component

3 participants