AgnosticUI / agnosticui

AgnosticUI is a set of UI primitives that start their lives in clean HTML and CSS. These standards compliant components are then copied to our framework implementations in: React, Vue 3, Angular, and Svelte.
https://agnosticui.com
Apache License 2.0
723 stars 47 forks source link

Angular Menu Followups #181

Open roblevintennis opened 2 years ago

roblevintennis commented 2 years ago

These are some follow ups for us to do from first iteration of the angular Menu component implementation:

The default menu trigger button (same we've been using basically) is now being called the 'simple' variant and is the default. The new variants are called 'kebab', 'hamburger' and so on. Passing type: 'kebab' into the main Menu component will need to result in a Kebab menu trigger button variant. Not sure how this will best be implemented in Angular but in Vue, we teased out a MenuTrigger component which can produce one of the variants 'simple' | 'kebab' | 'hamburger' | 'meatball'.

Here's a screenshot from the CSS package to visually show the new variants:

image

image

Update: The decision was made to make the whole [isSelected] optional for cases like action menues where it's a sort of “select and go” on a local branch I've added the following (so this can be considered DONE):

5e2f41c4

    <p>Note that <code>[isSelected]</code> is only required if you want a visual affordance
      of selection; sometimes perhaps you don't e.g. for an action menu. Here, the first
      example does not show such affordance while the second and third does.</p>
roblevintennis commented 2 years ago

@vitale232 lmk if you want to take any of this on 🙏

Btw, you may have noticed that the focus outline ring is hidden on the bottom (it's even in some screenshots I put here). Note that this is fixed in another topic branch for the kebab/hamburger/meatball menues so that will be fixed soon'ish.

roblevintennis commented 2 years ago

I just merged latest into my topic branch menu-kebab-hamburger-meatball and I'm seeing this error in the console (it may be on master I didn't notice before though so not 100% sure. The keyboard navigation appears to still work it's just throwing the error:

image

UPDATE: This was an easy fix. In fact, this commit should provide a glimpse into the new menu trigger direction I'm going which might be helpful for the general menu trigger refactoring we'll need to do for Angular Menu component.