canonical / react-components

A set of components based on Vanilla Framework
https://canonical.github.io/react-components
93 stars 51 forks source link

feat: adjust contextual dropdown vertical position #1009

Closed petermakowski closed 7 months ago

petermakowski commented 7 months ago

Done

This adjusts contextual dropdown vertical position based on the available space in the parent container. It's assuming that the container that should be used for the measurement is the first first scrollable parent of the dropdown.

This is fairly computationally expensive, but because it happens on open it shouldn't cause issues in real-world scenarios.

QA

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

Fixes

Fixes: https://warthogs.atlassian.net/browse/MAASENG-2428

webteam-app commented 7 months ago

Demo starting at https://react-components-1009.demos.haus

github-actions[bot] commented 7 months ago

:tada: This PR is included in version 0.48.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: