Skip to content

Conversation

@vnbaaij
Copy link
Collaborator

@vnbaaij vnbaaij commented Aug 26, 2024

Fix #2507 by adding a new ColumnResizeLabels record which contains the following properties:

  • DiscreteLabel
  • ExactLabel
  • GrowAriaLabel
  • ShrinkAriaLabel
  • ResetAriaLabel
  • SubmitAriaLabel

All properties are assigned default values. A parameter of this type with name ColumnResizeLabels is added to DataGid. This can be used to supply custom strings for the mentioned properties which will then show up in the resize options UI

NOTE the DataGrid parameter ResizeLabel has been superseded by this new parameter. If you were using a custom text for this, then change this to use the DiscreteLabel and/or ExactLabel (depending on the ResizeType you are using)

image

@vnbaaij vnbaaij added this to the v4.9.4 milestone Aug 26, 2024
@vnbaaij vnbaaij requested a review from dvoituron as a code owner August 26, 2024 09:57
@vnbaaij vnbaaij enabled auto-merge (squash) August 26, 2024 09:58
@github-actions
Copy link

github-actions bot commented Aug 26, 2024

✅ All tests passed successfully

Details on your Workflow / Core Tests page.

@github-actions
Copy link

github-actions bot commented Aug 26, 2024

Summary - Unit Tests Code Coverage

Summary
Generated on: 8/27/2024 - 8:49:32 AM
Coverage date: 8/27/2024 - 8:49:24 AM
Parser: Cobertura
Assemblies: 1
Classes: 242
Files: 340
Line coverage: 61.2% (5294 of 8643)
Covered lines: 5294
Uncovered lines: 3349
Coverable lines: 8643
Total lines: 29423
Branch coverage: 52.7% (2581 of 4889)
Covered branches: 2581
Total branches: 4889
Method coverage: Feature is only available for sponsors
Tag: 1313_10574802162

Coverage

Microsoft.FluentUI.AspNetCore.Components - 61.2%
Name Line Branch
Microsoft.FluentUI.AspNetCore.Components 61.2% 52.7%
Microsoft.FluentUI.AspNetCore.Components.AccordionChangeEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.ActionButton`1 50%
Microsoft.FluentUI.AspNetCore.Components.ActionLink`1 0%
Microsoft.FluentUI.AspNetCore.Components.CalendarExtended 95% 86.6%
Microsoft.FluentUI.AspNetCore.Components.CalendarTitles 87% 76.6%
Microsoft.FluentUI.AspNetCore.Components.CheckboxChangeEventArgs 50%
Microsoft.FluentUI.AspNetCore.Components.ColumnBase`1 53.5% 22.5%
Microsoft.FluentUI.AspNetCore.Components.ColumnResizeLabels 33.3%
Microsoft.FluentUI.AspNetCore.Components.ColumnResizeOptions`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.CommunicationToast 0% 0%
Microsoft.FluentUI.AspNetCore.Components.CommunicationToastContent 0%
Microsoft.FluentUI.AspNetCore.Components.ComponentParameters 16.6% 0%
Microsoft.FluentUI.AspNetCore.Components.Components.DateTime.RangeOfDates 100% 50%
Microsoft.FluentUI.AspNetCore.Components.Components.Tooltip.TooltipGlobalOp
tions
40%
Microsoft.FluentUI.AspNetCore.Components.Components.Tooltip.TooltipOptions 100%
Microsoft.FluentUI.AspNetCore.Components.Components.Tooltip.TooltipService 72.5% 50%
Microsoft.FluentUI.AspNetCore.Components.CountdownTimer 0% 0%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.AsyncQuery
ExecutorSupplier
72.7% 71.4%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.ColumnsCol
lectedNotifier`1
87.5% 50%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.Defer 100%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.DisplayAtt
ributeExtensions
66.6% 50%
Microsoft.FluentUI.AspNetCore.Components.DataGrid.Infrastructure.InternalGr
idContext`1
90.9% 100%
Microsoft.FluentUI.AspNetCore.Components.DataGridCellFocusEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.DataGridRowFocusEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.DialogEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.DialogInstance 92.3% 75%
Microsoft.FluentUI.AspNetCore.Components.DialogParameters 92.5%
Microsoft.FluentUI.AspNetCore.Components.DialogParameters`1 100%
Microsoft.FluentUI.AspNetCore.Components.DialogReference 36.3% 37.5%
Microsoft.FluentUI.AspNetCore.Components.DialogResult 0% 0%
Microsoft.FluentUI.AspNetCore.Components.DialogService 4.1% 3.3%
Microsoft.FluentUI.AspNetCore.Components.Emoji 0% 0%
Microsoft.FluentUI.AspNetCore.Components.EmojiCompress 0% 0%
Microsoft.FluentUI.AspNetCore.Components.EmojiInfo 0%
Microsoft.FluentUI.AspNetCore.Components.Extensions.AdditionalAttributesExt
ensions
100% 100%
Microsoft.FluentUI.AspNetCore.Components.Extensions.BooleanExtensions 100% 100%
Microsoft.FluentUI.AspNetCore.Components.Extensions.DateTimeExtensions 82.5% 85%
Microsoft.FluentUI.AspNetCore.Components.Extensions.EnumExtensions 70.5% 59%
Microsoft.FluentUI.AspNetCore.Components.Extensions.FluentInputExtensions 0% 0%
Microsoft.FluentUI.AspNetCore.Components.Extensions.UrlFormatterExtensions 100% 75%
Microsoft.FluentUI.AspNetCore.Components.FluentAccessibilityStatus 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentAccordion 60% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentAccordionItem 76% 35.7%
Microsoft.FluentUI.AspNetCore.Components.FluentAnchor 89.7% 67.8%
Microsoft.FluentUI.AspNetCore.Components.FluentAnchoredRegion 87.5% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentAppBar 53.7% 35.2%
Microsoft.FluentUI.AspNetCore.Components.FluentAppBarItem 82.1% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentAutocomplete`1 87.9% 76.4%
Microsoft.FluentUI.AspNetCore.Components.FluentBadge 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentBodyContent 100%
Microsoft.FluentUI.AspNetCore.Components.FluentBreadcrumb 100%
Microsoft.FluentUI.AspNetCore.Components.FluentBreadcrumbItem 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentButton 84.6% 64%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendar 89% 82.6%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarBase 93.3% 81.2%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarDay 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarMonth 100% 66.6%
Microsoft.FluentUI.AspNetCore.Components.FluentCalendarYear 90.9% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentCard 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentCheckbox 90.7% 87%
Microsoft.FluentUI.AspNetCore.Components.FluentCollapsibleRegion 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentCombobox`1 81.8% 70%
Microsoft.FluentUI.AspNetCore.Components.FluentComponentBase 90.9% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentCounterBadge 93.1% 86.5%
Microsoft.FluentUI.AspNetCore.Components.FluentDataGrid`1 61.3% 45.7%
Microsoft.FluentUI.AspNetCore.Components.FluentDataGridCell`1 72% 37.5%
Microsoft.FluentUI.AspNetCore.Components.FluentDataGridRow`1 55.7% 28.5%
Microsoft.FluentUI.AspNetCore.Components.FluentDatePicker 86.2% 56.5%
Microsoft.FluentUI.AspNetCore.Components.FluentDesignSystemProvider 100%
Microsoft.FluentUI.AspNetCore.Components.FluentDesignTheme 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentDialog 60.7% 67.5%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogBody 100%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogFooter 62.5% 43.3%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogHeader 80.9% 81.8%
Microsoft.FluentUI.AspNetCore.Components.FluentDialogProvider 59.7% 52.1%
Microsoft.FluentUI.AspNetCore.Components.FluentDivider 86.3% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentDragContainer`1 69.2%
Microsoft.FluentUI.AspNetCore.Components.FluentDragEventArgs`1 0%
Microsoft.FluentUI.AspNetCore.Components.FluentDropZone`1 20% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentEditForm 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentEmoji`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentFlipper 100%
Microsoft.FluentUI.AspNetCore.Components.FluentFooter 100%
Microsoft.FluentUI.AspNetCore.Components.FluentGrid 71.4% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentGridItem 87.2% 82.5%
Microsoft.FluentUI.AspNetCore.Components.FluentHeader 100%
Microsoft.FluentUI.AspNetCore.Components.FluentHighlighter 92.3% 20%
Microsoft.FluentUI.AspNetCore.Components.FluentHorizontalScroll 59.3% 20%
Microsoft.FluentUI.AspNetCore.Components.FluentIcon`1 87.8% 80.4%
Microsoft.FluentUI.AspNetCore.Components.FluentInputBase`1 70% 61%
Microsoft.FluentUI.AspNetCore.Components.FluentInputFile 88.4% 76.6%
Microsoft.FluentUI.AspNetCore.Components.FluentInputFileBuffer 100%
Microsoft.FluentUI.AspNetCore.Components.FluentInputFileEventArgs 91.6%
Microsoft.FluentUI.AspNetCore.Components.FluentInputLabel 100% 95%
Microsoft.FluentUI.AspNetCore.Components.FluentKeyCode 90.1% 90%
Microsoft.FluentUI.AspNetCore.Components.FluentKeyCodeEventArgs 100% 75%
Microsoft.FluentUI.AspNetCore.Components.FluentKeyCodeProvider 40% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentLabel 72.7% 21.4%
Microsoft.FluentUI.AspNetCore.Components.FluentLayout 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentListbox`1 93.3% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentMain 100%
Microsoft.FluentUI.AspNetCore.Components.FluentMainLayout 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentMenu 35.7% 40.7%
Microsoft.FluentUI.AspNetCore.Components.FluentMenuButton 70.2% 8.3%
Microsoft.FluentUI.AspNetCore.Components.FluentMenuItem 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentMenuProvider 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentMessageBar 54.1% 25%
Microsoft.FluentUI.AspNetCore.Components.FluentMessageBarProvider 82.3% 66.6%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitter 81.7% 66.6%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitterEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitterPane 97.1% 91%
Microsoft.FluentUI.AspNetCore.Components.FluentMultiSplitterResizeEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.FluentNavBase 55.1% 16.6%
Microsoft.FluentUI.AspNetCore.Components.FluentNavGroup 62.1% 36.6%
Microsoft.FluentUI.AspNetCore.Components.FluentNavLink 86.3% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenu 59.6% 33.3%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuGroup 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuItemBase 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuLink 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNavMenuTree 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentNumberField`1 64.4% 47.9%
Microsoft.FluentUI.AspNetCore.Components.FluentOption`1 78.9% 58.3%
Microsoft.FluentUI.AspNetCore.Components.FluentOverflow 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentOverflowItem 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentOverlay 70% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentPageScript 100%
Microsoft.FluentUI.AspNetCore.Components.FluentPaginator 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentPersona 100% 78.1%
Microsoft.FluentUI.AspNetCore.Components.FluentPopover 77% 65.9%
Microsoft.FluentUI.AspNetCore.Components.FluentPresenceBadge 60.3% 29.1%
Microsoft.FluentUI.AspNetCore.Components.FluentProfileMenu 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentProgress 85.7% 68.1%
Microsoft.FluentUI.AspNetCore.Components.FluentProgressRing 97.4% 92.8%
Microsoft.FluentUI.AspNetCore.Components.FluentPullToRefresh 93.9% 89.2%
Microsoft.FluentUI.AspNetCore.Components.FluentRadio`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentRadioContext 70% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentRadioGroup`1 83.3% 28.5%
Microsoft.FluentUI.AspNetCore.Components.FluentRating 82.6% 84.2%
Microsoft.FluentUI.AspNetCore.Components.FluentSearch 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentSelect`1 100% 100%
Microsoft.FluentUI.AspNetCore.Components.FluentSkeleton 42.8% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentSlider`1 60% 27.7%
Microsoft.FluentUI.AspNetCore.Components.FluentSliderLabel`1 63.1% 30%
Microsoft.FluentUI.AspNetCore.Components.FluentSortableList`1 80% 59%
Microsoft.FluentUI.AspNetCore.Components.FluentSortableListEventArgs 83.3%
Microsoft.FluentUI.AspNetCore.Components.FluentSpacer 100% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentSplashScreen 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentSplitter 68.4% 40%
Microsoft.FluentUI.AspNetCore.Components.FluentStack 90.2% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentSwitch 88.8% 50%
Microsoft.FluentUI.AspNetCore.Components.FluentTab 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentTabs 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentTextArea 84.2%
Microsoft.FluentUI.AspNetCore.Components.FluentTextField 88.5% 60%
Microsoft.FluentUI.AspNetCore.Components.FluentTimePicker 100% 90%
Microsoft.FluentUI.AspNetCore.Components.FluentToast 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentToastProvider 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentToolbar 100%
Microsoft.FluentUI.AspNetCore.Components.FluentTooltip 88.8% 64.2%
Microsoft.FluentUI.AspNetCore.Components.FluentTooltipProvider 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentTreeItem 85.3% 75%
Microsoft.FluentUI.AspNetCore.Components.FluentTreeView 91.3% 84.3%
Microsoft.FluentUI.AspNetCore.Components.FluentValidationMessage`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.FluentValidationSummary 100% 87.5%
Microsoft.FluentUI.AspNetCore.Components.FluentWizard 93.1% 83.3%
Microsoft.FluentUI.AspNetCore.Components.FluentWizardStep 97% 88.3%
Microsoft.FluentUI.AspNetCore.Components.FluentWizardStepArgs 100%
Microsoft.FluentUI.AspNetCore.Components.FluentWizardStepChangeEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.GlobalState 33.3% 50%
Microsoft.FluentUI.AspNetCore.Components.GridItemsProviderRequest`1 92.3% 41.6%
Microsoft.FluentUI.AspNetCore.Components.GridItemsProviderResult 100%
Microsoft.FluentUI.AspNetCore.Components.GridItemsProviderResult`1 100%
Microsoft.FluentUI.AspNetCore.Components.GridSort`1 35.1% 25.9%
Microsoft.FluentUI.AspNetCore.Components.HorizontalScrollEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.Icon 81.3% 85.2%
Microsoft.FluentUI.AspNetCore.Components.IconFromImage 100%
Microsoft.FluentUI.AspNetCore.Components.IconInfo 100%
Microsoft.FluentUI.AspNetCore.Components.Identifier 66.6% 62.5%
Microsoft.FluentUI.AspNetCore.Components.IdentifierContext 66.6% 41.6%
Microsoft.FluentUI.AspNetCore.Components.INavMenuItemsOwner 0%
Microsoft.FluentUI.AspNetCore.Components.Infrastructure.EventCallbackSubscr
ibable`1
83.3% 100%
Microsoft.FluentUI.AspNetCore.Components.Infrastructure.EventCallbackSubscr
iber`1
90% 75%
Microsoft.FluentUI.AspNetCore.Components.InputHelpers`1 36.9% 31.2%
Microsoft.FluentUI.AspNetCore.Components.InternalAppBarContext 100% 100%
Microsoft.FluentUI.AspNetCore.Components.InternalDialogContext 80%
Microsoft.FluentUI.AspNetCore.Components.InternalListContext`1 80% 66.6%
Microsoft.FluentUI.AspNetCore.Components.InternalToastContext 0%
Microsoft.FluentUI.AspNetCore.Components.KeyCodeService 60.3% 28.5%
Microsoft.FluentUI.AspNetCore.Components.LibraryConfiguration 88.2% 50%
Microsoft.FluentUI.AspNetCore.Components.ListComponentBase`1 62.7% 59.5%
Microsoft.FluentUI.AspNetCore.Components.LoadedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.LuminanceChangedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.MenuChangeEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.MenuService 0% 0%
Microsoft.FluentUI.AspNetCore.Components.Message 50% 0%
Microsoft.FluentUI.AspNetCore.Components.MessageBox 66.6% 0%
Microsoft.FluentUI.AspNetCore.Components.MessageBoxContent 0%
Microsoft.FluentUI.AspNetCore.Components.MessageOptions 76.9%
Microsoft.FluentUI.AspNetCore.Components.MessageService 33% 26.9%
Microsoft.FluentUI.AspNetCore.Components.NavMenuActionArgs 0% 0%
Microsoft.FluentUI.AspNetCore.Components.OfficeColorUtilities 0%
Microsoft.FluentUI.AspNetCore.Components.Option`1 0%
Microsoft.FluentUI.AspNetCore.Components.OptionsSearchEventArgs`1 100%
Microsoft.FluentUI.AspNetCore.Components.OverflowItem 100%
Microsoft.FluentUI.AspNetCore.Components.PaginationState 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ProgressFileDetails 100%
Microsoft.FluentUI.AspNetCore.Components.ProgressToast 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ProgressToastContent 0%
Microsoft.FluentUI.AspNetCore.Components.PropertyColumn`2 80% 52.6%
Microsoft.FluentUI.AspNetCore.Components.RenderFragmentDialog 100%
Microsoft.FluentUI.AspNetCore.Components.Resources.TimeAgoResource 76.1% 100%
Microsoft.FluentUI.AspNetCore.Components.SelectAllTemplateArgs 100%
Microsoft.FluentUI.AspNetCore.Components.SelectColumn`1 85.9% 79.4%
Microsoft.FluentUI.AspNetCore.Components.SelectDatesHoverEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.ServiceCollectionExtensions 80% 100%
Microsoft.FluentUI.AspNetCore.Components.SortedProperty 0%
Microsoft.FluentUI.AspNetCore.Components.SplashScreenContent 0% 0%
Microsoft.FluentUI.AspNetCore.Components.SplitterCollapsedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.SplitterResizedEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.StandardLuminanceExtensions 0% 0%
Microsoft.FluentUI.AspNetCore.Components.StaticAssetServiceConfiguration 0% 0%
Microsoft.FluentUI.AspNetCore.Components.TabChangeEventArgs 0%
Microsoft.FluentUI.AspNetCore.Components.TemplateColumn`1 0% 0%
Microsoft.FluentUI.AspNetCore.Components.TimeAgoOptions 92.3%
Microsoft.FluentUI.AspNetCore.Components.ToastInstance 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ToastParameters 0%
Microsoft.FluentUI.AspNetCore.Components.ToastParameters`1 0%
Microsoft.FluentUI.AspNetCore.Components.ToastResult 0% 0%
Microsoft.FluentUI.AspNetCore.Components.ToastService 0% 0%
Microsoft.FluentUI.AspNetCore.Components.TreeChangeEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.TreeViewItem 100%
Microsoft.FluentUI.AspNetCore.Components.TreeViewItemExpandedEventArgs 100%
Microsoft.FluentUI.AspNetCore.Components.UploadedFileDetails 0%
Microsoft.FluentUI.AspNetCore.Components.Utilities.CssBuilder 100% 100%
Microsoft.FluentUI.AspNetCore.Components.Utilities.Debouncer 94.8% 37.5%
Microsoft.FluentUI.AspNetCore.Components.Utilities.InlineStyleBuilder 96.4% 87.5%
Microsoft.FluentUI.AspNetCore.Components.Utilities.JSModule 0% 0%
Microsoft.FluentUI.AspNetCore.Components.Utilities.RangeOf`1 96.7% 94.4%
Microsoft.FluentUI.AspNetCore.Components.Utilities.Splitter 82.8% 81.8%
Microsoft.FluentUI.AspNetCore.Components.Utilities.StyleBuilder 100% 91.6%
Microsoft.FluentUI.AspNetCore.Components.ZIndex 100%
System.Text.RegularExpressions.Generated 76.6% 51.4%

[Parameter]
public string ResizeLabel { get; set; } = "Column width (in pixels)";

/// <summary>
Copy link
Collaborator

Choose a reason for hiding this comment

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

To avoid these multiple parameters, and group all this information in a single object, how about using something like this :

public record ResizeAria
{
    public string? GrowLabel { get; set; }
    public string? ShrinkLabel { get; set; }
    public string? ResetLabel { get; set; }
    public string? SubmitLabel { get; set; }

    public static ResizeAria Default => new ResizeAria();
}

The usage will be:

<FluentDataGrid ResizeAria="@(ResizeAria.Default with { GrowLabel = "...", ShrinkLabel = "..." } )">

Do you find it too complex ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking about something like that as well (but then with a dictionary of some sorts)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A record has been added. See updates in PR message above

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. I find the syntax for defining the record clearer using property declarations (as above). And using your syntax, we don't have XML comments / property documentation.

  2. Why did you put this class in the Infrastructure folder and not in the DataGrid/Columns folder?

  3. I think we need a static property Default to create an instance of this object. Thus, the developer can initialize the parameter using ResizeAria.Default with { GrowLabel = “ ...”, ShrinkLabel = “ ...” }

  4. ⚠️ You can't force RPs to merge: without explicit approval, we can continue discussing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  1. By doing it this way, the developer does not have to do anything to use the default values. I think we can put the comments about the fields of the record in the parameter declaration in the Grid
  2. Yes, that is a mistake. Will move them
  3. I could not get your variant to work with implemented defaults. I don't want to force the developer to have to supply values in the default case I figured it out. Will change it in the other PR
  4. I know but I wanted this in because (and was too impatient). I need it in the other grid thing I'm working on (PR inbound) (mea culpa). We can still discuss and change because we are the end bosses.

@vnbaaij vnbaaij dismissed dvoituron’s stale review August 27, 2024 08:45

Record has been implemented

@vnbaaij vnbaaij disabled auto-merge August 27, 2024 08:45
@vnbaaij vnbaaij changed the title [DataGrid] Add aria label parameters for resize buttons [DataGrid] Add parameter to provide labels to resize UI Aug 27, 2024
@vnbaaij vnbaaij merged commit 139c1c1 into dev Aug 27, 2024
@vnbaaij vnbaaij deleted the users/vnbaaij/fix-issue-#2507 branch August 27, 2024 08:46
dannyldj pushed a commit to dannyldj/fluentui-blazor that referenced this pull request Sep 26, 2024
* Add resize buttons aria labels

* Use a record to group resize aria labels. ResizeLabel has been removedand can now be set throught the record as well

* Adjust example to new 2024 dataset
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.

fix: buttons in ColumnResizeOptions are inaccessible

3 participants