Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(components): add navigation bar component #39

Merged
merged 26 commits into from
Jul 14, 2024
Merged

Conversation

desmondinho
Copy link
Contributor

@desmondinho desmondinho commented Jul 14, 2024

Description

Add the navbar component, along with the brand, toggle, menu, menu item, content and item components, to the component library.

Closes #38

What's been done?

Added the components mentioned above with the following abilities:

Navbar: A component representing a navigation bar

  • Set the child content
  • Set the height
  • Set the maximum width of the wrapper (e.g., sm, md, lg)
  • Set the sticky state (sticky to the top of the viewport)
  • Set the blurred state (backdrop blur)
  • Set the bordered state (bottom border)
  • Set CSS class names for each item slot

Navbar brand: A component representing the brand section of the navigation bar

  • Set the child content

Navbar content: A component representing the content section of the navigation bar

  • Set the child content
  • Set the alignment (e.g., left, right)

Navbar item: A component representing a navigation item within the content section

  • Set the child content

Navbar menu: A component representing a collapsible menu for the navigation bar

  • Set the child content
  • Get expanded by the NavbarMenuToggle

Navbar menu item: A component representing a navigation item within the menu

  • Set the child content

Navbar menu toggle: A component representing a button that toggles the menu

  • Toggle the menu

Navbar context: A class representing the navigation bar context

  • Hold the Navbar component
  • Hold the NavbarMenu component
  • Hold the menu component's expansion state
  • Register the menu
  • Toggle the menu

Navbar slots: A class representing the various slot configurations for the Navbar

  1. Root: the slot for the Navbar, it is the main container.
  2. Wrapper: the slot for the Navbar component, it contains components such as NavbarBrand, NavbarContent, NavbarToggle and others.
  3. Brand: the slot for the NavbarBrand component.
  4. Content: the slot for the NavbarContent component.
  5. Item: the slot for the NavbarItem component.
  6. Menu: the slot for the NavbarMenu component.
  7. MenuItem: the slot for the NavbarMenuItem component.
  8. Toggle: the slot for the NavbarMenuToggle component.
  9. ToggleIcon: the slot for the NavbarMenuToggle icon.

Checklist

  • My code follows the project's coding style and guidelines.
  • I have included inline docs for my changes, where applicable.
  • I have added, updated or removed tests according to my changes.
  • All tests are passing.
  • There's an open issue for the PR that I am making.

@desmondinho desmondinho added ✨ Type: Enhancement New feature or request 📦 Scope: Components Improvements or additions to components labels Jul 14, 2024
@desmondinho desmondinho added this to the 1.0.0 milestone Jul 14, 2024
@desmondinho desmondinho self-assigned this Jul 14, 2024
@desmondinho desmondinho linked an issue Jul 14, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented Jul 14, 2024

Codecov Report

Attention: Patch coverage is 98.09524% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.22%. Comparing base (b539213) to head (b3ee682).
Report is 1 commits behind head on main.

Files Patch % Lines
src/LumexUI/Components/Navbar/LumexNavbar.razor.cs 93.75% 0 Missing and 1 partial ⚠️
...LumexUI/Components/Navbar/LumexNavbarMenu.razor.cs 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   98.24%   98.22%   -0.02%     
==========================================
  Files          43       52       +9     
  Lines         968     1067      +99     
  Branches      101      104       +3     
==========================================
+ Hits          951     1048      +97     
  Misses         12       12              
- Partials        5        7       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@desmondinho desmondinho merged commit 0d3ffb9 into main Jul 14, 2024
3 checks passed
@desmondinho desmondinho deleted the feat/navbar branch July 14, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Scope: Components Improvements or additions to components ✨ Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add navigation bar component
1 participant