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] feat: Implement GridViewItem ,FlipView and PipsPager component #98

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

Conversation

Sanlorng
Copy link
Collaborator

@Sanlorng Sanlorng commented Dec 20, 2024

[fluent] Add GridViewItem component

This commit introduces the GridViewItem component, a selectable item template for grids.

  • The GridViewItem supports single and multi-select modes, customizable colors, and overlay content.
  • It provides visual feedback for different states such as default, hovered, pressed, and disabled.Additionally, the commit includes a MultiSelectGridViewItem variant, that adds a checkbox as an overlay for multi-selection scenarios.
    image

[fluent] Add FlipView component

This commit introduces the FlipView component, a control that allows users to flip through a collection of items.

It provides two variations: HorizontalFlipView and VerticalFlipView, which enable horizontal and vertical flipping respectively.

The component utilizes HorizontalPager and VerticalPager from the Compose Pager library, and includes visual feedback such as navigation buttons for flipping between pages.

The component is configurable with properties like enabled, pageButtonColors, contentPadding, pageSize, pageSpacing, etc.
image

[fluent] feat: Add PipsPager component

This commit introduces the PipsPager component, a navigation control that allows users to navigate through a paginated collection using visual indicators (pips).

The PipsPager supports both horizontal and vertical orientations, and can be integrated with a FlipView component.
The number of visible pips can be configured and supports page button visibility options.
The color scheme of the pips can be customized and it also provides visual feedback for different states such as hovered or pressed.

This commit also includes the implementation of navigation page buttons to navigate to the previous or next page, and a default color scheme for the pips.

image

This commit introduces the `GridViewItem` component, a selectable item template for grids.The `GridViewItem` supports single and multi-select modes, customizable colors, and overlay content. It provides visual feedback for different states such as default, hovered, pressed, and disabled.Additionally, the commit includes a `MultiSelectGridViewItem` variant, that adds a checkbox as an overlay for multi-selection scenarios.
This commit introduces the `FlipView` component, a control that allows users to flip through a collection of items.

It provides two variations: `HorizontalFlipView` and `VerticalFlipView`, which enable horizontal and vertical flipping respectively.

The component utilizes `HorizontalPager` and `VerticalPager` from the Compose Pager library, and includes visual feedback such as navigation buttons for flipping between pages.

The component is configurable with properties like `enabled`, `pageButtonColors`, `contentPadding`, `pageSize`, `pageSpacing`, etc.
@Sanlorng Sanlorng changed the title [fluent] feat: Implement GridViewItem component [fluent] feat: Implement GridViewItem and FlipView component Dec 22, 2024
This commit introduces the `PipsPager` component, a navigation control that allows users to navigate through a paginated collection using visual indicators (pips).

The `PipsPager` supports both horizontal and vertical orientations, and can be integrated with a `FlipView` component.
The number of visible pips can be configured and supports page button visibility options.
The color scheme of the pips can be customized and it also provides visual feedback for different states such as hovered or pressed.

This commit also includes the implementation of navigation page buttons to navigate to the previous or next page, and a default color scheme for the pips.
@Sanlorng Sanlorng changed the title [fluent] feat: Implement GridViewItem and FlipView component [fluent] feat: Implement GridViewItem ,FlipView and PipsPager component Dec 22, 2024
This commit fixes the scroll calculation in `PipsPager` to correctly handle vertical layouts, ensuring the selected item is centered in the viewport during scrolling.
The order of modifiers in `PipsPagerItem` was incorrect, leading to unexpected behavior with background and selectable. This commit corrects the order, placing the selectable modifier before the wrapContentSize, size, and background modifiers.
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