microsoft / Microsoft-Fabric-workload-development-sample

Demonstrates how to implement a Microsoft Fabric workload in .net and typescript
Other
30 stars 16 forks source link

Fabric UX docs are inaccurate #55

Closed q-nicolechoi closed 2 months ago

q-nicolechoi commented 3 months ago

There are some discrepancies between the docs and the actual code, and I cannot use property binding in some cases. Here are some examples.

1. Button

To disable an icon button, the example code in docs shows

<fluent-button
  appearance="primary"
  disabledFocusable
  iconOnly
  shape="round"
  size="medium"
>
  Button
</fluent-button>

But after many trial and errors, it should be disabled and icon-Only instead of disabledFocusable and iconOnly. image

<fluent-button appearance="primary" shape="round" size="medium" iconOnly>
    iconOnly
</fluent-button>
<fluent-button appearance="primary" shape="round" size="medium" icon-Only>
    icon-Only
</fluent-button>
<fluent-button appearance="primary" shape="round" size="medium" disabledFocusable>
    disabledFocusable
</fluent-button>
<fluent-button appearance="primary" shape="round" size="medium" disabled>
    Disabled
</fluent-button>

It will also be useful if we can use property binding, or is there an alternative way to dynamically to enable/disable a button? image

2. MenuItem

The docs suggests it is possible to dynamically disable a menu item. But I cannot disable it at all: image

<fluent-menu-list>
    <fluent-menu-item role="menuitem" [disabled]="true">
        Item 1
    </fluent-menu-item>
    <fluent-menu-item role="menuitem">
        Item 2
    </fluent-menu-item>
    <fluent-menu-item role="menuitem">
        Item 3
    </fluent-menu-item>
</fluent-menu-list>

These also don't work: image

anitamayorov commented 3 months ago

Hi @q-nicolechoi, Those inconsistencies were discussed with Fabric UX team, and they will fix it, no ETA yet.