Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Popover.pane - Adding max and min height to popover pane (#11535)
closes: #11534 <!-- ☝️How to write a good PR title: - Prefix it with [ComponentName] (if applicable), for example: [Button] - Start with a verb, for example: Add, Delete, Improve, Fix… - Give as much context as necessary and as little as possible - Open it as a draft if it’s a work in progress --> ### WHY are these changes introduced? The combobox does not have a prop to accept maxHeight to set the height from default. The height prop on combobox when set, gives empty space when filtering the suggestions. <img width="1080" alt="31-31-aqwrw-uillp" src="https://github.com/Shopify/polaris/assets/56687545/e1d8751b-852d-4dcb-8982-f65f3dd8ada1"> [This PR](#5685) introduces the height component to the Popover.pane. The fix was for TagAutocomplete in web. I have not been able to figure out what the issue was and how to test this change against them. ### WHAT is this pull request doing? This PR adds the minHeight and maxHeight as props for combobox and popover.pane component. <details> <summary>video of after changes</summary> https://github.com/Shopify/polaris/assets/56687545/21558e77-0af4-4c50-8c4e-cf1c724cc611 </details> <!-- Summary of the changes committed. Before / after screenshots are appreciated for UI changes. Make sure to include alt text that describes the screenshot. Include a video if your changes include interactive content. If you include an animated gif showing your change, wrapping it in a details tag is recommended. Gifs usually autoplay, which can cause accessibility issues for people reviewing your PR: <details> <summary>Summary of your gif(s)</summary> <img src="..." alt="Description of what the gif shows"> </details> --> ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) Using main branch: - For [MultiselectVerticalContent](https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Combobox/Combobox.stories.tsx#L460) update the list to add more options, say 30-40 items more. - Set [height in the combobox](https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Combobox/Combobox.stories.tsx#L564-L580) to say `300px` to limit the height of the suggestions dropdown - Filter suggestions and observe the extra space at the bottom of the filtered list. Using this branch: - For [MultiselectVerticalContent](https://github.com/Shopify/polaris/blob/main/polaris-react/src/components/Combobox/Combobox.stories.tsx#L460) update the list to add more options, say 30-40 items more. - Set maxHeight in the combobox to `300px` - Filter suggestions and observe that there are no extra space at the bottom of the filtered list. ### 🎩 checklist - [ ] Tested a [snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases) - [ ] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [ ] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [ ] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [ ] Updated the component's `README.md` with documentation changes - [ ] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide
- Loading branch information