Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
93f6cf9
- Add enums
vnbaaij Jun 12, 2025
b255f69
- Add DataGrid component
vnbaaij Jun 12, 2025
96e40df
Add DataGridGeneratedHeaderType
vnbaaij Jun 12, 2025
f6d0fb1
Merge branch 'users/vnbaaij/dev-v5/datagrid-part1' into users/vnbaaij…
vnbaaij Jun 12, 2025
1059dbe
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part1
dvoituron Jun 12, 2025
595ff78
Fix analyzer errors
vnbaaij Jun 12, 2025
b1cf680
- Add Typical demo and flags
vnbaaij Jun 12, 2025
8393e35
Work on review comments
vnbaaij Jun 12, 2025
8cd48c6
Merge branch 'users/vnbaaij/dev-v5/datagrid-part1' of https://github.…
vnbaaij Jun 12, 2025
202c10a
Process review comments
vnbaaij Jun 12, 2025
5aa2c65
Add language resources
vnbaaij Jun 12, 2025
777e854
Add Unit Tests for Paginator
vnbaaij Jun 12, 2025
448c89e
More review comments
vnbaaij Jun 13, 2025
3146aeb
Update tests. Now 100% lc
vnbaaij Jun 13, 2025
69ffae6
- Add Typical demo and flags
vnbaaij Jun 13, 2025
35e0334
Replace tokens (WIP)
vnbaaij Jun 13, 2025
b92c83c
Remove flags. These will be added to sample data project in separate PR
vnbaaij Jun 17, 2025
430abd5
Remove DI abstractions package. Not needed
vnbaaij Jun 17, 2025
d0c1052
Merge dev-v5
vnbaaij Jun 17, 2025
33af462
Add IsFixed parameter
vnbaaij Jun 17, 2025
689fe43
merge dev-v5
vnbaaij Jun 17, 2025
44f7d0d
MAke example grid mor functional and look better
vnbaaij Jun 17, 2025
6fc0809
Add initial tests. They are not passing yet
vnbaaij Jun 18, 2025
5bcb9fa
Add surpression atribute, fix other analyzer warnings
vnbaaij Jun 18, 2025
a30dabf
Use localized strings
vnbaaij Jun 18, 2025
aadf080
Merg dev-v5
vnbaaij Jun 18, 2025
70c342b
Fix tests
vnbaaij Jun 18, 2025
b826128
Add Tests
vnbaaij Jun 19, 2025
d0979ea
Add tests for PaginatinState and TotalItemCountChangedEventArgs
vnbaaij Jun 19, 2025
a6aa6fc
Merge branch 'users/vnbaaij/dev-v5/pagination-tests' into users/vnbaa…
vnbaaij Jun 19, 2025
613cbd0
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/pagination-tests
vnbaaij Jun 19, 2025
af4f1e8
Add Row tests
vnbaaij Jun 19, 2025
89038a7
process review comments
vnbaaij Jun 19, 2025
bcdffd9
Merge branch 'users/vnbaaij/dev-v5/pagination-tests' into users/vnbaa…
vnbaaij Jun 19, 2025
ba9c0fb
More tests
vnbaaij Jun 19, 2025
924df75
More tests
vnbaaij Jun 19, 2025
726cf24
Merge branch 'users/vnbaaij/dev-v5/datagrid-part2' of https://github.…
vnbaaij Jun 20, 2025
8fe02c0
- Add typical demo
vnbaaij Jun 23, 2025
abb696c
More tests
vnbaaij Jun 29, 2025
4aae12f
- More tests
vnbaaij Jun 29, 2025
39dc140
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part2
vnbaaij Jul 1, 2025
f4b691a
Update file headers
vnbaaij Jul 1, 2025
1f50f07
Convert DataGrid JS to TS
vnbaaij Jul 1, 2025
097db2f
Implement fix for #3963
vnbaaij Jul 1, 2025
713d96b
Bring in changes made in v4 with #3949
vnbaaij Jul 1, 2025
2698837
- Update file headers
vnbaaij Jul 1, 2025
460a82f
Merge branch 'users/vnbaaij/dev-v5/datagrid-part2' into users/vnbaaij…
vnbaaij Jul 1, 2025
f9ce111
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part3
vnbaaij Jul 2, 2025
ab02f1c
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part2
vnbaaij Jul 2, 2025
088dd55
Process review comments:
vnbaaij Jul 2, 2025
ede49e6
Forgot to change the docs
vnbaaij Jul 2, 2025
87cb81a
Merge branch 'users/vnbaaij/dev-v5/datagrid-part2' into users/vnbaaij…
vnbaaij Jul 2, 2025
d47fc5e
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part2
vnbaaij Jul 2, 2025
f921191
- Use auto-generated constant
vnbaaij Jul 2, 2025
25e046e
Merge branch 'users/vnbaaij/dev-v5/datagrid-part2' of https://github.…
vnbaaij Jul 2, 2025
e6ec4a3
DataGrid docs and examples
vnbaaij Jul 2, 2025
07365bd
Merge branch 'users/vnbaaij/dev-v5/datagrid-part3' into users/vnbaaij…
vnbaaij Jul 2, 2025
5af4579
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part4
vnbaaij Jul 2, 2025
66af301
Merge branch 'users/vnbaaij/dev-v5/datagrid-part2' into users/vnbaaij…
vnbaaij Jul 3, 2025
9e89b82
Merge branch 'users/vnbaaij/dev-v5/datagrid-part3' into users/vnbaaij…
vnbaaij Jul 3, 2025
855fe34
Merge branch 'users/vnbaaij/dev-v5/datagrid-part4' of https://github.…
vnbaaij Jul 3, 2025
e3c942f
Process review comments
vnbaaij Jul 3, 2025
f6d458b
More review comments
vnbaaij Jul 3, 2025
64cf5bb
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part2
vnbaaij Jul 3, 2025
85154bf
- Undo make internal GridItemsProvider*
vnbaaij Jul 3, 2025
ed02449
Update test verified files
vnbaaij Jul 3, 2025
770c533
merge part 2
vnbaaij Jul 3, 2025
c6a2f1b
Merge branch 'users/vnbaaij/dev-v5/datagrid-part3' into users/vnbaaij…
vnbaaij Jul 3, 2025
d0246dd
Merge dev-v5
vnbaaij Jul 3, 2025
36dc27b
- Fix when to show header menu
vnbaaij Jul 3, 2025
150c1fd
- Rename getting started
vnbaaij Jul 3, 2025
567729b
WIP
vnbaaij Jul 18, 2025
61deb6a
Update samples and structure
vnbaaij Jul 21, 2025
e1932a6
Make all DataGrid samples work
vnbaaij Jul 21, 2025
62753d4
Merge branch 'dev-v5' into users/vnbaaij/dev-v5/datagrid-part4
vnbaaij Jul 21, 2025
7c4f77b
Update DataGrid verified tests files
vnbaaij Jul 21, 2025
998b8c9
Merge branch 'users/vnbaaij/dev-v5/datagrid-part4' of https://github.…
vnbaaij Jul 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Process review comments
  • Loading branch information
vnbaaij committed Jun 12, 2025
commit 202c10a186df8542a6205c184e124c5a821e70e3
54 changes: 14 additions & 40 deletions spelling.dic
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@

# ***************************
# List of misspelled words
# Please, sort the list alphabetically
# ***************************

ansi
appsettings
blazor
brotli
columnheader
combobox
cref
csproj
currentcolor
currentcolor
datagrid
datalist
demopanel
dialogtoggle
elementreference
evenodd
eventargs
gzip
henkan
heure
heures
inputfile
javascript
jours
keycapture
keydown
keyup
maintenant
menuchecked
menuclicked
menuitem
menuitem
menuitemcheckbox
menuitemcheckboxobsolete
menuitemradio
Expand All @@ -39,56 +45,24 @@ muhenkan
myid
noattribute
nonfile
onaccordionchange
onchange
ondialogbeforetoggle
ondialogtoggle
ondropdownchange
onmenuitemchange
ontabchange
ondropdownchange
ondialogtoggle
ondialogbeforetoggle
myid
menuclicked
menuchecked
onaccordionchange
demopanel
dialogtoggle
rendertree
rightclick
rowheader
rrggbb
secondes
sortabillity
sourcecode
Subscribable
summarydata
tabindex
tablist
tabpanel
textarea
sourcecode
summarydata
currentcolor
menuitem
menuitems
rightclick
menuitemcheckbox
menuitem
menuitemradio
menuitemcheckboxobsolete
menuitemradioobsolete
onmenuitemchange
ontabchange
ondropdownchange
ondialogtoggle
ondialogbeforetoggle
myid
menuclicked
menuchecked
rendertree
testid
columnheader
rowheader
datagrid
keycapture
textarea
wdelta
sortabillity
Subscribable
eventargs
34 changes: 21 additions & 13 deletions src/Core/Components/Pagination/FluentPaginator.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@namespace Microsoft.FluentUI.AspNetCore.Components
@inherits FluentComponentBase
<div class="paginator" style="@Style">
<div class="fluent-paginator" style="@Style">
@if (State.TotalItemCount.HasValue)
{
<div class="summary">
Expand All @@ -14,12 +14,16 @@
}
</div>
<nav role="navigation" class="paginator-nav">
<FluentButton @onclick="GoFirstAsync" Disabled="@(!CanGoBack || Disabled)" title="Go to first page" aria-label="Go to first page">
<FluentIcon Value="@(new CoreIcons.Regular.Size20.ChevronDoubleLeft())" Width="20px" />
</FluentButton>
<FluentButton @onclick="GoPreviousAsync" Disabled="@(!CanGoBack || Disabled)" title="Go to previous page" aria-label="Go to previous page">
<FluentIcon Value="@(new CoreIcons.Regular.Size24.ChevronLeft())" Width="20px" />
</FluentButton>
<FluentButton OnClick="GoFirstAsync"
Disabled="@(!CanGoBack || Disabled)"
Title="Go to first page"
aria-label="Go to first page"
IconStart="@(new CoreIcons.Regular.Size20.ChevronDoubleLeft())" />
<FluentButton OnClick="GoPreviousAsync"
Disabled="@(!CanGoBack || Disabled)"
Title="Go to previous page"
aria-label="Go to previous page"
IconStart="@(new CoreIcons.Regular.Size24.ChevronLeft())" />
<div class="pagination-text">
@if (PaginationTextTemplate is not null)
{
Expand All @@ -31,12 +35,16 @@
}

</div>
<FluentButton @onclick="GoNextAsync" Disabled="@(!CanGoForwards || Disabled)" title="Go to next page" aria-label="Go to next page">
<FluentIcon Value="@(new CoreIcons.Regular.Size24.ChevronRight())" Width="20px" />
</FluentButton>
<FluentButton @onclick="GoLastAsync" Disabled="@(!CanGoForwards || Disabled)" title="Go to last page" aria-label="Go to last page">
<FluentIcon Value="@(new CoreIcons.Regular.Size20.ChevronDoubleRight())" Width="20px" />
</FluentButton>
<FluentButton OnClick="GoNextAsync"
Disabled="@(!CanGoForwards || Disabled)"
Title="Go to next page"
aria-label="Go to next page"
IconStart="@(new CoreIcons.Regular.Size24.ChevronRight())" />
<FluentButton Onclick="GoLastAsync"
Disabled="@(!CanGoForwards || Disabled)"
Title="Go to last page"
aria-label="Go to last page"
IconStart="@(new CoreIcons.Regular.Size20.ChevronDoubleRight())" />
</nav>
}
</div>
6 changes: 3 additions & 3 deletions src/Core/Components/Pagination/FluentPaginator.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public partial class FluentPaginator : FluentComponentBase, IDisposable
/// <summary>
/// Constructs an instance of <see cref="FluentPaginator" />.
/// </summary>
public FluentPaginator()
public FluentPaginator(LibraryConfiguration configuration) : base(configuration)
{
// The "total item count" handler doesn't need to do anything except cause this component to re-render
_totalItemCountChanged = new(new EventCallback<PaginationState>(this, null));
_currentPageItemsChanged = new(new EventCallback<PaginationState>(this, null));
_totalItemCountChanged = new(new EventCallback<PaginationState>(this, @delegate: null));
_currentPageItemsChanged = new(new EventCallback<PaginationState>(this, @delegate: null));
}

/// <summary>
Expand Down
39 changes: 21 additions & 18 deletions src/Core/Components/Pagination/FluentPaginator.razor.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
.fluent-paginator {
display: flex;
/*border-top: 1px solid var(--neutral-stroke-divider-rest);*/
margin-top: 0.5rem;
padding: 0.25rem 0;
align-items: center;
}

.fluent-paginator .pagination-text {
margin: 0 0.5rem;
}

.fluent-paginator .paginator-nav {
padding: 0;
display: flex;
margin-inline-start: auto;
margin-inline-end: 0;
gap: 0.5rem;
/*border-top: 1px solid var(--neutral-stroke-divider-rest);*/
margin-top: 0.5rem;
padding: 0.25rem 0;
align-items: center;
}


.fluent-paginator .summary {
}

.fluent-paginator .pagination-text {
margin: 0 0.5rem;
}

.fluent-paginator .paginator-nav {
padding: 0;
display: flex;
margin-inline-start: auto;
margin-inline-end: 0;
gap: 0.5rem;
align-items: center;
}


[dir="rtl"] .fluent-paginator fluent-button > svg {
transform: rotate(180deg);
transform: rotate(180deg);
}
14 changes: 9 additions & 5 deletions src/Core/Components/Pagination/PaginationState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// Holds state to represent pagination in a <see cref="FluentDataGrid{TGridItem}"/>.
/// </summary>
Expand Down Expand Up @@ -70,8 +72,9 @@ public async Task SetItemsPerPageAsync(int itemsPerPage)
await CurrentPageItemsChanged.InvokeCallbacksAsync(this);
if (TotalItemCount.HasValue)
{
await SetTotalItemCountAsync(TotalItemCount.Value, true);
await SetTotalItemCountAsync(TotalItemCount.Value, force: true);
}

return;
}

Expand All @@ -81,11 +84,11 @@ public async Task SetItemsPerPageAsync(int itemsPerPage)
/// <param name="totalItemCount">The total number of items</param>
/// <param name="force">If true, the total item count will be updated even if it is the same as the current value.</param>
/// <returns></returns>
public Task SetTotalItemCountAsync(int totalItemCount, bool force = false)
public async Task SetTotalItemCountAsync(int totalItemCount, bool force = false)
{
if (totalItemCount == TotalItemCount && !force)
{
return Task.CompletedTask;
return;
}

TotalItemCount = totalItemCount;
Expand All @@ -94,11 +97,12 @@ public Task SetTotalItemCountAsync(int totalItemCount, bool force = false)
{
// If the number of items has reduced such that the current page index is no longer valid, move
// automatically to the final valid page index and trigger a further data load.
_ = SetCurrentPageIndexAsync(LastPageIndex.Value);
await SetCurrentPageIndexAsync(LastPageIndex.Value);
}

// Under normal circumstances, we just want any associated pagination UI to update
TotalItemCountChanged?.Invoke(this, new TotalItemCountChangedEventArgs(TotalItemCount));
return TotalItemCountChangedSubscribable.InvokeCallbacksAsync(this);
await TotalItemCountChangedSubscribable.InvokeCallbacksAsync(this);
}
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
5 changes: 5 additions & 0 deletions src/Core/Enums/DataGridCellType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved

/// <summary>
/// The type of <see cref="FluentDataGridCell{TGridItem}"/> in a <see cref="FluentDataGrid{TGridItem}"/>.
/// </summary>
Expand All @@ -28,3 +31,5 @@ public enum DataGridCellType
[Description("rowheader")]
RowHeader,
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved

5 changes: 4 additions & 1 deletion src/Core/Enums/DataGridDisplayMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// The type of rendering to use for the <see cref="FluentDataGrid{TGridItem}"/>
/// </summary>
Expand All @@ -20,5 +22,6 @@ public enum DataGridDisplayMode
/// With this mode fr units cannot be used to set the column widths.
/// </summary>
Table,

}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved

5 changes: 4 additions & 1 deletion src/Core/Enums/DataGridGeneratedHeaderType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// The option for generating a header for the <see cref="FluentDataGrid{TGridItem}" />.
/// </summary>
Expand All @@ -22,5 +24,6 @@ public enum DataGridGeneratedHeaderType
/// <summary>
/// Generate a sticky header row.
/// </summary>
Sticky
Sticky,
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
3 changes: 3 additions & 0 deletions src/Core/Enums/DataGridResizeType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// The type of <see cref="FluentDataGridRow{TGridItem}"/> in a <see cref="FluentDataGrid{TGridItem}"/>.
/// </summary>
Expand All @@ -19,3 +21,4 @@ public enum DataGridResizeType
/// </summary>
Exact,
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
3 changes: 3 additions & 0 deletions src/Core/Enums/DataGridRowSize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// The height of each <see cref="FluentDataGridRow{TGridItem}"/> in a <see cref="FluentDataGrid{TGridItem}"/>.
/// Values are in pixels.
Expand All @@ -30,3 +32,4 @@ public enum DataGridRowSize
/// </summary>
Large = 58,
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
3 changes: 3 additions & 0 deletions src/Core/Enums/DataGridRowType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// The type of <see cref="FluentDataGridRow{TGridItem}"/> in a <see cref="FluentDataGrid{TGridItem}"/>.
/// </summary>
Expand All @@ -27,3 +29,4 @@ public enum DataGridRowType
[Description("sticky-header")]
StickyHeader,
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
3 changes: 3 additions & 0 deletions src/Core/Enums/DataGridSelectMode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// How rows can be selected in a <see cref="FluentDataGrid{TGridItem}"/> when using a <see cref="SelectColumn{TGridItem}"/>.
/// </summary>
Expand All @@ -24,3 +26,4 @@ public enum DataGridSelectMode
/// </summary>
Multiple,
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
3 changes: 3 additions & 0 deletions src/Core/Enums/DataGridSortDirection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Microsoft.FluentUI.AspNetCore.Components;

// ToDo: remove pragma after next PR
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
/// <summary>
/// Describes the direction in which a <see cref="FluentDataGrid{TGridItem}"/> column is sorted.
/// </summary>
Expand All @@ -26,3 +28,4 @@ public enum DataGridSortDirection
/// </summary>
Descending,
}
#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
Loading
Loading