fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Deprecate inactive prop in command bar, it is no longer being used

Open caradong opened this issue 8 years ago • 4 comments

Bug Report

  • Package version(s): 6.26.0
  • Browser and OS versions: Chrome

Priorities and help requested:

Are you willing to submit a PR to fix? No

Requested priority: (Blocking, High, Normal, Low)

Products/sites affected: (if applicable)

Describe the issue:

Create an IContextualMenuItem in the Commandbar with inactive: true does not change the button to readonly.

Create an IContextualMenuItem: private commandBarItems(): IContextualMenuItem[] { let items: IContextualMenuItem[] = []; items.push({ key: 'totalItemsString', name: totalItemsString, inactive: true }); }

Create an command bar with this item: public render() { return ( <CommandBar items={this.commandBarItems()} /> ); }

As shown in this screenshot:

image

Actual behavior:

With inactive: true or without, the button is rendered same, i.e., not a readonly button

Expected behavior:

With inactive: true, the button should be readonly with proiperties such as no hover effect, no pointer cursor, button should be disabled etcs.

caradong avatar Jul 18 '18 21:07 caradong

It turns out that there is no logic behind the inactive prop, which is actually great, because it shouldn't have been added IMO as the default behavior should be that disabled menu items are focusable but not interactive.

Recommend we mark as deprecated.

dzearing avatar Jul 19 '18 17:07 dzearing

to followup, you can use 'allowDisabledFocus' from the button.types.ts to make the command bar buttons be disabled yet focusable (will need to add disabled as well).

micahgodbolt avatar Jul 19 '18 18:07 micahgodbolt

https://codepen.io/micahgodbolt/pen/ZjBeQP

micahgodbolt avatar Jul 19 '18 19:07 micahgodbolt

@micahgodbolt @dzearing thank you for the quick response.

caradong avatar Jul 20 '18 18:07 caradong