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

[fluent] Add TooltipBox and FlyoutAnchorScope #90

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Sanlorng
Copy link
Collaborator

  1. Add FlyoutAnchorScope.
  2. Add TooltipBox
    image
    image

@Sanlorng Sanlorng requested a review from Konyaco November 30, 2024 06:10
This change simplifies the implementation of `AutoSuggestBox` and improves its flexibility.

The `suggestFlyoutAnchor` and `suggestFlyoutSize` modifiers have been replaced with `flyoutAnchor` and `flyoutSize` modifiers, respectively, which are now provided by the `FlyoutAnchorScope`.

This refactor also removes the need for the `rememberSuggestFlyoutCalculateMaxHeight` function, as the `Flyout` component handles the calculation of the maximum height for the suggestion flyout.
This commit introduces scrolling behavior to `MenuFlyout` using `ScrollbarContainer` and `verticalScroll`.
It also refactors `FlyoutContainerScope` to inherit from `FlyoutAnchorScope`, allowing for better placement control of flyouts using `flyoutAnchor()` and `flyoutSize()` modifiers.
These changes enhance the functionality of components like `TopNav`, `NavigationView`, and `AutoSuggestBox` by providing a more user-friendly experience for menus and flyouts.
This commit introduces the `TooltipBox` component, which displays more information about a UI element in a pop-up window.

- The `TooltipBox` can be used to show what an element does or what the user should do with it.
- It is shown when the user hovers over or presses and holds the UI element.
- The position of the Tooltip can be customized using the `positionProvider` parameter.

Additionally, this commit:

- Updates the `GalleryHeader` component to use the `TooltipBox` for documentation and source code buttons.
- Updates the `WindowsWindowFrame` component to use the `TooltipBox` for caption buttons.
- Adds the `TooltipScreen` to the gallery to showcase the `TooltipBox` component.
- Updates the `CopyButton` component to use the `TooltipBox`.
- Updates the `SideNavItem` component to use the `TooltipBox` for the text label when the item is not expanded.
- Updates the `NavigationView` component to use the `TooltipBox` for the navigation buttons and menu items.
This commit adds a label to the Slider's thumb that displays the current value of the Slider. The label is visible when the thumb is being dragged and is positioned above the thumb.

This change improves the usability of the Slider by providing visual feedback to the user about the current value of the Slider.
@Sanlorng Sanlorng force-pushed the component/flyout_components branch from 8ac699d to 79f39ab Compare December 2, 2024 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant