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] refactor: Migrate to new FontIcon #86

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

Conversation

Sanlorng
Copy link
Collaborator

This commit refactors the code to use the new FontIcon component instead of relying on individual icons.

  • The FontIcon component is now used across components like Expander, Scrollbar, ListItem, CheckBox, CalendarDatePicker, CommandBar, ColorPicker, NavigationView, LiteFilter, RatingControl, BreadcrumbBar, TopNav, SideNav, Button, TabView, and TextBoxButton.
  • The FontIcon component is optimized for displaying font icons by using a dedicated font family.
  • The commit also introduces an enum class FontIconPrimitive that defines a set of standard icons for Fluent UI components.
  • Some components, such as FontIconSolid8, now use a custom size for better visual consistency.
  • The ContextMenu implementation for desktop is updated to leverage the FontIcon and FontIconPrimitive for icon display and keyboard shortcuts.

This commit refactors the code to use the new `FontIcon` component instead of relying on individual icons.

- The `FontIcon` component is now used across components like `Expander`, `Scrollbar`, `ListItem`, `CheckBox`, `CalendarDatePicker`, `CommandBar`, `ColorPicker`, `NavigationView`, `LiteFilter`, `RatingControl`, `BreadcrumbBar`, `TopNav`, `SideNav`, `Button`, `TabView`, and `TextBoxButton`.
- The `FontIcon` component is optimized for displaying font icons by using a dedicated font family.
- The commit also introduces an enum class `FontIconPrimitive` that defines a set of standard icons for Fluent UI components.
- Some components, such as `FontIconSolid8`, now use a custom size for better visual consistency.
- The `ContextMenu` implementation for desktop is updated to leverage the `FontIcon` and `FontIconPrimitive` for icon display and keyboard shortcuts.
This commit applies the `LocalContentColor` and `LocalContentAlpha` to the `FontIcon` component, ensuring it inherits the appropriate color and alpha values from its parent context. This change improves the consistency and accessibility of icons within Fluent UI components.
This commit changes the default width of RatingControl from 20.dp to 16.dp to better align with the Fluent UI design guidelines.
This commit introduces two new icons, `BackIcon` and `NavigationIcon`, for use within the `NavigationView` component.

- `BackIcon`: Represents a back button and provides a subtle scale animation on press.
- `NavigationIcon`: Represents a navigation menu and provides a subtle scale animation on press.

These icons are now used by default for the `BackButton` and `ExpandedButton` composables within `NavigationView`. They enhance the visual feedback and consistency of the navigation experience.
@Sanlorng Sanlorng force-pushed the component/font_icon_primitives branch from ea66a6a to 7c2a1d1 Compare December 2, 2024 02:38
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