Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add setting to always display the first item in FluentOverflow #2391

Closed
JamesNK opened this issue Jul 17, 2024 · 1 comment · Fixed by #2393 or #2401
Closed

feat: add setting to always display the first item in FluentOverflow #2391

JamesNK opened this issue Jul 17, 2024 · 1 comment · Fixed by #2393 or #2401
Labels
status:in-progress Work is in progress

Comments

@JamesNK
Copy link
Member

JamesNK commented Jul 17, 2024

🙋 Feature Request

FluentOverflow hides items if there aren't enough room to display them. However, sometimes you might want to display the first item, even if it is cutoff.

For example, given a list of names, seeing the first name, but having it cut off with an ellipsis (someone can add CSS to add ellipsis) so the user can interact with it is preferrable to just showing the overflow button and no content.

🤔 Expected Behavior

The first item is displayed is the space available, then the overflow button.

This is what it could look like:

fluentoverflow-firstitem

😯 Current Behavior

FluentOverflow only shows the first item if there is room for it. If there isn't then just the overflow button is displayed.

This is what it looks like today:

fluentoverflow-firstitem-current

💁 Possible Solution

Add a setting to FluentOverflow that controls whether the first item is always rendered inline.

🔦 Context

💻 Examples

@microsoft-github-policy-service microsoft-github-policy-service bot added the triage New issue. Needs to be looked at label Jul 17, 2024
@dvoituron dvoituron added status:needs-investigation Needs additional investigation and removed triage New issue. Needs to be looked at labels Jul 17, 2024
@vnbaaij vnbaaij added status:in-progress Work is in progress and removed status:needs-investigation Needs additional investigation labels Jul 17, 2024
@vnbaaij
Copy link
Collaborator

vnbaaij commented Jul 17, 2024

The script used to determine which items overflow actually already accounts for this...

By supplying a fixed attribute to an item, it will be excluded from the calculations (we already use that internally with the AppBar). We just did not expose this in any way in the FluentOverflowItem. I'm creating a PR to add this as a parameter.

vnbaaij added a commit that referenced this issue Jul 17, 2024
- Fix #2391 by adding `Fixed` parameter t0 `FluentOverflowItem`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:in-progress Work is in progress
Projects
None yet
3 participants