microsoft / microsoft/fluentui

[Feature]: Custom boundary for autoSize in Popper

Open
#25,264 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Fluent UI react-northstar (v0) Resolution: Soft Close Type: Feature
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Library

React Northstar / v0 (@fluentui/react-northstar)

Describe the feature that you would like added

autoSize prop in Popper settings currently uses overflowBoundary. Add configuration option for the autoSize to use a separate boundary.

That feature is required for a Dropdown component scenario.
Codesandbox with repro: https://codesandbox.io/s/v0-dropdown-overflow-vj5xzf?file=/example.js

The Dropdown list in the example has the following options applied:
positionFixed: true to allow the dropdown list to overflow the message it is rendered in
autoSize: "width-always" to fix the width of the list to match the dropdown input (required when fluid and positionFixed are used at the same time)
overflowBoundary and flipBoundary set to the scroll container to correctly flip the dropdown list
unstable_disableTether: "all" to allow the dropdown list to cover the input if there is not enough space

With this config the autoSize uses the overflowBoundary to set the dropdown list width which is incorrect:
image

Have you discussed this feature with our team

No response

Additional context

No response

Validations
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox and the React Northstar Popper settings described in the issue, focusing on autoSize, overflowBoundary, flipBoundary, and the Dropdown scenario. Trace how Popper calculates autoSize from overflowBoundary; done means autoSize can use a separate configurable boundary while the existing Dropdown configuration still flips against its scroll container.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.