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

New NavMenu, NavGroup and NavLink components #819

Merged
merged 20 commits into from Oct 7, 2023
Merged

New NavMenu, NavGroup and NavLink components #819

merged 20 commits into from Oct 7, 2023

Conversation

vnbaaij
Copy link
Collaborator

@vnbaaij vnbaaij commented Oct 4, 2023

The existing NavMenu components utilized the TreeView components for displaying the hierarchical structure and was not using the native NavLink capabilities to render links. This meant we need to do link/url/route checking ourselves which did not work quite right.

This PR introduces new FluentNavMenu, FluentNavGroup and FluentNavLinks components which are based on the native NavLink component.

The original FluentNavMenu component had been renamed to FluentNavMenuTree. The FluentNavMenuGroup and FluentNavMenuLink have remained unchanged. To keep using the original implementation, the only change that needs to be done is to do this rename action in your code. These 3 components are now marked obsolete and will be removed in a future version.

To upgrade to the new behavior, instructions have been added to the Upgrade guide

Documentation and examples have been updated.

@vnbaaij vnbaaij requested a review from dvoituron October 4, 2023 09:55
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

Copy link
Collaborator

@dvoituron dvoituron left a comment

Choose a reason for hiding this comment

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

First verification phase (syntax only).
I'd like to test the code live on my machine.
Can you provide some unit tests?

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

Fix compiler warning
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@dvoituron
Copy link
Collaborator

Some questions.

  1. Why the Item 5 seems accessible, but the property Disabled=true?
    peek

  2. By default, I don't think that the Gap between a NavLink and a NavGroup must be different.
    image

@dvoituron
Copy link
Collaborator

Probably interesting to add an maximum width and ellipsis when the text is too long.

image

@vnbaaij
Copy link
Collaborator Author

vnbaaij commented Oct 6, 2023

Some questions.

  1. Why the Item 5 seems accessible, but the property Disabled=true?

Small CSS issue. Was only checking for a.disabled instead of just .disabled

  1. By default, I don't think that the Gap between a NavLink and a NavGroup must be different.
    Agreed. Setting it to empty string as default

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://black-pebble-0dc79cb03-819.westeurope.3.azurestaticapps.net

@vnbaaij vnbaaij merged commit fda8c2b into dev Oct 7, 2023
4 checks passed
@vnbaaij vnbaaij deleted the vnbaaij/navmenu2 branch October 7, 2023 10:58
vnbaaij added a commit that referenced this pull request Oct 9, 2023
* Add UnitTests markdown page (#658)

* ProgressToast related cahnges (#657)

* FluentProgress: Add ValueChanged
FluentProgressRing: Add ValueChanged
Fix #655 and update example

* Do not use @Bind for FluentProgress Value
Update example

* Add colocated files to demos

* Undo add ValueChanged EventCallBack

* Add Width and Height property and associated styles (#663)

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Point to unit test documentation

* re-add fixed to DemoSection tabs

* #624 Change NavMneu to use Icon Value
Update version in banner

* Update version in props

* Fix Icons and Emojis trimmed during the WASM publishing process (#666)

* FluentMessageBox: enable not supplying an icon to the body

* Add doc about Icons / Emojis (#673)

* Fix click not working on FluentTreeItem text (#667)

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Fix the Tooltip used by the FluentOverflow (#678)

* Revert change in including web-components script. fix #668
Update Icon example

* Fix TextField AutoComplete property to a string property (#682)

* Fix #674 (#676)

* Fix DemoSection label sometimes wrong

* Fix #621 - Add aria-hidden to clear-button (#683)

Fix some search sample a11y issues

* Make FLuentToastContainer work better on mobile devices (was #684)

* Replace the Icons.AllIcons property with a GetAllIcons method using reflection (#685)

* Users/vnbaaij/update templates (#688)

* Update templates t0 use v3 package

* More template updates
Temp add global.json to pin 8.0.0-preview.7

* Set icon for EF Adapter package

* Fix EF Adapter Icon path

* Apply the oninput attribute to "text" components (#696)

* Add missing usings Project template (#702)

Fixes #701

* Fix templates missing using (beacause of Code CLeanup runningon save...)

* Remove PackageVersion from csproj to let it be set y pipeline

* Add item reference to FluentDataGridRow and FluentDataGridCell (#695) (#700)

Co-authored-by: Alessio Dell’Aquila <aquila@hks-systeme.de>

* [fix] multiline-text word-break (#711)

* [fix] multiline-text word-break

* test

* Add FluentDialogHeader, FluentDialogFooter and related updates (#717)

* Update build-core-lib.yml

* Add MessageBar component (#718)

* Add MessageBar 
* Demo site optimizations
* Add generic ActionLink and ActionButton classes
* Tune display of ApiDocumentation on smaller screens

* Users/dvoituron/autocomplete (#720)

* Draft version of Autocomplete component

* Autocomplete with basic features

* Update some UI details

* Add ArrowUp/ArrowDown to select items

* Add TemplateOption

* Add Demo styles

* Add Header and Footer content

* Add FluentOptionPeople component

* Finalize unsing People Component

* Add some aria attributes (not completed)

* Add face picture samples

* Revert ToC panel

* Add first tests

* Fix Unit Test

* Fix Unit Test

* Add Unit Tests

* Fix the complexity

* Add Unit Tests for FluentOptionPeople component

* FluentDataGridRow: sticky header z-index. Fix #721

* Use latest .NET SDKs
Fix null dereference warning
Remove global.json

* Fix issue with combined normal/timed MessageBars

* Put notification/settings icons in a button

* Update the DatePicker popup position (#724)

* [FluentAutocomplete] Update some usabilities (#725)

* Add MaximumSelectedOptionsMessage, a Search icon and a Dismiss icon

* Update Unit Tests

* Fix FluentDatePicker and FluentTimePicker to keep existing date/time values (#726)

* FluentMenuButton: Add ButtonStyle and MenuStyle parameters

* Couple of enhancements (#727)

* Fix issue with combined normal/timed MessageBars

* Put notification/settings icons in a button

* FluentMenuButton: Add ButtonStyle and MenuStyle parameters

* Add ChildContent (#728)

* Fix MessageOption Timeout xml documentation

* Update CodeSetup.md (#730)

Fix a typo

* [FluentMenu/FluentPopover/FluentOverlay] Close menu/popover automatically when user clicks outside of it (by using overlay) (#729)

* Fix FluentMenu / FluentOverlay to dismiss menu when clicked outside

* Fix FluentPopover/FluentOverlay

* Apply naming conventions

* Add `EmptyContent` parameter to the DataGrid (#731)

* Fix MessageOption Timeout xml documentation

* Add a EmptyContent parameter to FluentDataGrid

* [FluentPresenceBadge  & FluentOptionPeople] - Update the Status badge to be compliant FluentUI 2 (#732)

* Fix people ChildContent

* Update the FluentPresenceBadge

* Update the FluentOptionPeople

* Fix Unit Tests

* Fix Unit Tests

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Add more colors to OfficeColor enum

* Add a comment on FluentTabPage on styling indicator

* [CssBuilder and StyleBuilder] Fixing the built format and position of the custom styles (#745)

* Refactor StyleBuilder and add Unit Tests

* Update CssBuilder and StyleBuilder

* Update the CSS and Style Builder to include custom user styles at the end

* Update all existing classes

* Fix Unit Tests

* Add comment to ComboboxPage
Update some xml doc comments

* Update FluentDataGridRow and example (#747)

* Add a column with buttons to virtualized grid example with sticky header
Update FluentDataGridRow to align center when row height is set
Update FluentDataGrid to remove code that was already done in row rendering

* Process review remark

* fix typos (#751)

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Update the Button.Loading when using with a Icon (#752)

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Dialog enhancements (add dialog type, fix panel width setable), add MaxHeight to DemoSection (#740)

* Add Dialog custom header/footer example
Address #739
Change ShowDialog to allow horizontal alignment setting

* Add DialogType enum and set this in dialog parameters
Use  width parameter in panel example

* Fix review comments
Add MaxHeight to DemoSection

* REmove files no longer needed

* Cleanup for new alternative

* Make DialogType internal

* Revert "Make DialogType internal"

This reverts commit e80e451.

* Remove more HeaderTemplate/FooterTemplate references

* Fix NavMenu route/subroute not selecting correct item (#755)

* Fix NavMenu route/subroute not selecting correct item

* Fix compilation error

* Add extra "/" (if needed) to do a clean comparisson on segments

* [FluentDialog] Include components to customize the Dialog-box (#764)

* Update Fluent UI System  Icons to 1.1.217 (#765)

Move AllIcons property
Comment out Icons.cs creation in generator

* Add PreventScroll to Dialog and Overlay (#758)

* Add PreventScroll to Dialog and Overlay

* Move scroll restauration to DisposeAsync

* Change it to use a CSS only approach

* Fix manual dialog with PreventScroll

* Rename FluentOptionPeople to FluentPersona (#766)

* Rename FluentOptionPeople to FluentPersona

* Update tests

* Update version
Test for #771
Fix #772

* Fix #772 (for real this time...)

* Typo 'the the' (#773)

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Add InlineStyleBuilder and fix the FluentSelect.Height property (#774)

* [FluentIcon] Use of Value attribute (not Icon) (#784)

* [WIP] Inert modal overlay (#783)

* Fix #772

* add InertModalOverlay to DialogParameters

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Rename InertModalOverlay to PreventDismissOnOverlayClick
Fix code comment
Clean up demo description
Extend sample with custom dialog to usee new parameter

* Fix NavMenu redirecting tosmae page when route parameters present (#755)
Fix obsolete warning for Notification Center

* Fix obsolete warnings
Update Whatsew, add What's New Archive

* Re-work padding/height for dialog variants (#786)

* Re-work padding/heigt for dialog variants

* Resolve review comments

* Fix more Obsolete warnings
Fix one more issue related to #755

* Add a Tooltip parameter to DataGrid columns  (#791)

* Add Tooltip parameter to DataGrid columns
Clean-up WhatsNew

* More tooltip work
Add Style parameter to ColumnBase
ApiDocumentation: InstanceType renamed to InstanceTypes and is array now

* Fix #789

* Button and Icon colors (#793)

* Add Icon.WithColor and update the Demo page

* Update Button Icon Color depending of Button Appearance

* Update the way to apply the Icon.Color in a Button

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* fix: enhanced DialogService doc with asp.net core 8 with ssr (#795)

* Update Fluent UI System Icons to 1.1.218
Add What's New file to Icons

* Remove generated Icons.cs file

* Update version for preview site footer

* Fix the Icon Color doc page (#796)

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Fix MessageBar issues (#797)

* Implement MessageService OnMessageItemsUpdatedAsync handler
Rename OnAlertUpdateHandler to OnMessageItemsUpdatedHandler

* Make Title and Link nullable and don't render them when they are null
Adapt sample to show this situation

* Process review remarks

* Fix #805: InlineStyleBuilder on .NET6 (#806)

* corrects minor typo (#804)

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Several changes and fixes (#802)

* Fix #800 by doing more checks.
Tooltip example uses DemoLogger now
Tooltip: add delegate check
TemplateColumn: Add TooltipText parameter

* Add TooltipText to PropertyColumn + refactor
Extend DataGrid example to show tooltip usage
Fix comment issue
Fix MessageBar test

* Fix Server site  Flash of Unstyled Content
Add soem code to IssueTester to test navigation menu issues

* Change ColumBase button aria-label

* Add route parameters test to lab page

* NavMenu: Add ReNvigate parameter

* Change when ReNavigate gets passed

* Better ReNavigate implementation
Also added remark on commented code

* Fixes SimpleCustomizedDialog.razor (#807)

* corrects minor typo

* fixes typo in comments

* fix by restoring SimpleCustomizedDialog.razor

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Fix FluentDataGrid error if page is quickly exited (#810)

* [FluentInputFile] Fix the manual upload on iOS (#815)

* Update the manual upload on iOS

* Keep ShowFilesDialogAsync

* fixes minor typo (#824)

* Fix README.md minor typo (#827)

* Update README.md - typo (#829)

Fix a typo

* FluentSelect: Fix ValueChanged fired twice  (#828)

* FluentSelect: Fix ValueChanged fired twice
* Override Person.ToString() to not return image data
* Process review remarks

* 1)  Fix error in RenderDefaultHeaderContent related to recent tooltip work
2) Udo country code rename

* Fix #801 by removing  direct call to Items.Count() (#831)

* FluentCard: Add AreaRestricted parameter (#830)

* FluentCard: Add AreaRestricted parameter, update docs, tests and examples

* Update build-demo.yml

* Update build-demo.yml

* Update build-demo.yml

* Update build-demo.yml

* Error message updated when FluentDialogProvider is missing (#832)

* New NavMenu, NavGroup and NavLink components (#819)

* new FluentNavMenu, FluentNavGroup and FluentNavLink component

* Rename earlier FluentNavMenu to FluentNavMenuTree

* Update documentation, copy examples and add upgrade guide

* Fix #816

* Fix #811

* Add NavMenu components tests

* CounterBadge tests

* [Input Label] FluentInputLabel Add a Label and update aria-label (#822)

* Add a new FluentInputLabel component to display a label and to update the aria-label of the associated Input component

* Update for List components

* Update all Input samples

* Add a property LabelTemplate

* Rename Title property to AriaLabel

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* fix: chinese abbreviated day name in FluentCalendar (#834)

* [fix] chinese day abbreviated name

* [fix] add ToAbbreviatedDisplay summary

* [fix] revert to string

* [fix] use ShortestDayNames instead of AbbreviatedDayNames

* [fix] rename variable

* [fix] rename, add Abbreviated to tuple

* [fix] remove empty line

* [fix] remove empty line

---------

Co-authored-by: Vincent Baaij <vnbaaij@outlook.com>

* Minor documentation corrections (#837)

* corrects comment

* Reworded to improve clarity

* Corrects comments - removes /

* Fix #836

* Prepare for release - update whatsnew docs

* More whatsnew updates

---------

Co-authored-by: Denis Voituron <dvoituron@outlook.com>
Co-authored-by: Emanuele Curati <ema@outlook.com>
Co-authored-by: Antoine Griffard <agriffard@hotmail.com>
Co-authored-by: hksalessio <143792830+hksalessio@users.noreply.github.com>
Co-authored-by: Alessio Dell’Aquila <aquila@hks-systeme.de>
Co-authored-by: ssccinng <whs11998@163.com>
Co-authored-by: Yue Cui <37979368+LuohuaRain@users.noreply.github.com>
Co-authored-by: Gary Chan <gary.chan@c0g1t8.com>
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Alexis Narvaez <anarvaez@fullstacklabs.co>
Co-authored-by: Harry Pfleger <harry@ardimedia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants