LuccaSA / lucca-front

documentation
https://prisme.lucca.io
MIT License
38 stars 4 forks source link

feat(popover): new `luPopover2` directive for better DX, better accessibility and maintainability #2852

Closed Supamiu closed 3 months ago

Supamiu commented 3 months ago

Description

luPopover2 handles focus management and restore to have popovers that can be interacted with using screen readers and keyboard-only navigation, we had to do this in a separate component for maintainability (N layers of abstraction for just popover would make no sense) and in order to be able to make API changes without them being breaking everywhere.

Eventually, the current luPopover will end up being deprecated but that's not for today.


Position has been handled in a simple 2 axis style with 4 possible positions for simplicity and ease of use for UI devs but for fine-tuned position logic, customPositions can accept a ConnectedPositionPair[] that will override the current logic (which includes fallback) so that we can hand things like left-aligned menus, contained menus and so on. But since the average popover's position is either, above, below, before or after, they are the default ones that you can pick from if you don't want to write 4 position pairs, including fallbacks, by yourself.


LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces

CCNET-iLucca commented 3 months ago

Tests d'interfaces

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces

LuccaIntegration commented 3 months ago

:woman_cook: https://lucca-front.lucca.tech/PR-2852/storybook

CCNET-iLucca commented 3 months ago

Tests d'interfaces