Skip to content

Releases: B1Digital/fluent_ui_2_flutter

v0.0.7

Choose a tag to compare

@ascobani ascobani released this 25 Sep 09:49

0.0.7

Added

  • Declarative routes to the two charts no schema could reach (extension, not upstream). A Plotly trace whose meta carries {"fluentChart": "sparkline"} renders FluentSparkline, and {"fluentChart": "horizontalBarChart"} renders the axis-free part-to-whole FluentHorizontalBarChart — one row per y, one segment per trace. Without the marker every trace routes exactly as upstream does. FluentPlotlyChartKind gains sparkline and horizontalBarChart.

Fixed

  • FluentGaugeChart under an unbounded height (a scroll view, or FluentDeclarativeChart's own column for an indicator trace) threw a flex error errorBuilder never saw; the arc box now sizes from the computed height.
  • Plotly labels drew their HTML entities (R&D, TK'nin, a<b rendered as R&amp;D, TK&#39;nin, a&lt;b). The figure is now decoded once after routing; annotations no longer decode twice, so a typed &amp; stays &amp;.
  • FluentHorizontalBarChart with a series repeated across rows threw a duplicate-key error; one legend per title now.

v0.0.6

Choose a tag to compare

@ascobani ascobani released this 24 Sep 18:59

fluent_2 0.0.6

Added

  • FluentBoxDecoration paints boxShadow the way CSS does — outside the box
    only.
    A BoxDecoration shadow is a blurred copy of the box drawn under
    it, which a transparent box shows as a grey wash (shadow16 darkens the
    inside to about 76%). Upstream shadows unfilled elements routinely, so this is
    the decoration for them; the blur also uses CSS's σ = blur / 2. Everything
    else paints as BoxDecoration. The CarouselNav and Carousel demos use it,
    which is what stopped the CarouselNav card rendering solid grey.

  • Charts:

    • calloutPropsPerDataPoint on FluentHorizontalBarChart and
      FluentDonutChart, spread over the built-in reading as ChartPopover does,
      and legends / enabledWrapLines on FluentHorizontalBarChart
      (upstream's legendProps), whose wrapped rows render each legend's
      annotationBuilder.
    • FluentChartTooltipBox, the box a cut-short axis label shows its whole
      text in on hover or a touch tap.
    • FluentChartPopover.anchorRect, FluentChartPopoverData.isCartesian and
      contentMaxWidth, FluentChartHitRegion.popoverAnchor,
      FluentCartesianChartProps.popoverFollowsPointer and
      FluentYValueHover.shouldDrawBorderBottom.
    • FluentChartHitRegion.hitTest (a mark hovers and clicks as its painted
      shape, a circle as a circle), focusable and followsPointer, and
      FluentCartesianSeriesDelegate.hoveredRegionAt, which names the hovered
      region on the same pointer event the chart hears.
    • FluentCartesianSeriesDelegate.activationAt, consulted on a press that
      hits no region (a line chart uses it to click its stroke), and
      FluentCartesianChart.onFocusedRegionChange, fired as the arrow keys move
      the roving focus index and with null on blur.
    • FluentChartPopoverData.culture (upstream's ChartPopoverProps.culture),
      in which a multi-value popover formats its rows.
    • FluentDonutChart.popoverBuilder, which replaces the popover body for
      the hovered or focused datum (upstream's onRenderCalloutPerDataPoint);
      a null return keeps the default body.
    • FluentLineChart.eventAnnotationStrokeColor, eventAnnotationLabelColor
      and eventAnnotationLabelWidth (upstream's
      eventAnnotationProps.labelWidth, default 105), forwarded to the event
      annotation layer.
    • FluentCartesianChartProps.copyWith(useUTC:).
    • FluentChartImageExporter takes clipHeight, continuationKey and
      continuationX, which the declarative chart's export uses to draw every
      legend and a table's whole grid.
  • Components:

    • FluentSplitButton.menuExpanded and an optional child (an icon-only
      primary half); FluentMenuTriggerScope, through which FluentMenu
      scopes its open state to its trigger so the split button's chevron half
      takes its Selected tokens and announces expanded.
    • FluentFocusRing's inset mode, and FluentButtonStyle.focusRingInsets,
      focusRingInnerColor and shadow (upstream's ring sits inside the
      button; primary adds a white inner ring and shadow2).
    • FluentSpinnerPainter.textDirection (the arc mirrors in RTL),
      FluentSpinnerMotion.reducedRotation, FluentSpinnerPose.reduced and
      tailFades.
    • FluentInputStyle.focusUnderlineWidth, the focus bar's thickness.
    • FluentDatePickerValidationResult.message, the errorStrings (or
      ambient locale) text for the error, for a FluentField to show.
    • FluentCalendarPanel.slideProgress and slideForwards.
    • FluentButton.activeIcon (upstream's bundleIcon filled glyph, shown
      while a subtle or transparent button is hovered or pressed; also on
      FluentCompoundButton) and FluentButton.menuIcon (MenuButton's chevron
      slot: 12, or 16 at large, 4 after the label, in the label colour).
    • FluentButtonStyle.iconColor, menuIconSize and animationDuration.
    • FluentLinkUnderline, which paints a link's underline as a crisp 1px
      line under every line of the label.
    • FluentCarouselNavAppearance, FluentCarousel.navAppearance and
      FluentCarouselStep.appearance (upstream's brand CarouselNav).
    • FluentTreeItem.aside, the always-visible trailing slot.
    • FluentInteractive.disabledMouseCursor and pressedRequiresHover
      (upstream's :hover:active).
    • FluentInteractionTag.activeIcon, the filled glyph an outline tag shows
      while hovered or pressed, and FluentTagStyle.iconColor.

Changed

  • Requires fluent_2_core 0.0.4, which keeps FluentApp's tree when it
    rebuilds after the fonts load and corrects eight palette tokens to Fluent UI
    React v9 (lavender avatars no longer render navy).
  • Chart prop spellings fixed; the old names are deprecated, not removed.
    showXAxisLablesTooltip, wrapXAxisLables, rotateXAxisLables,
    showYAxisLables and showYAxisLablesTooltip on
    FluentCartesianChartProps (and resolveShellXAxisTickPadding's
    parameter) are now *Labels, and xAxistickSize on
    FluentCartesianChartProps and FluentXAxisParams is xAxisTickSize.
    Each old name stays as a @Deprecated constructor argument, getter and
    copyWith argument that forwards to the new one, so 0.0.5 code compiles.
  • Deprecated: FluentChartLegendRow.listLength (now optional; Flutter
    has no aria-setsize semantics to carry it) and
    FluentCartesianChartProps.enableFirstRenderOptimization (the port always
    lays out with real constraints, so there is no first frame to skip). Both
    were already ignored.
  • tickPadding is honoured. A caller's FluentCartesianChartProps .tickPadding used to be read only as a truth test (25 painted a 5 gap, 0
    gave 10), copying a JavaScript precedence slip; it is now
    tickPadding ?? (tooltip ? 5 : 10).
  • Button geometry follows upstream in Chrome (every FluentButton): a
    1px border that takes layout space on every appearance, labelled buttons
    floored at 64/96/96 wide, icon-only buttons a 24/32/40 square with 1/5/7
    padding, the focus ring inside the button, and a menu button's label and
    chevron centred as one group. The legend's "+N more" button grows to the
    floor as well.
  • FluentSplitButton matches upstream: icon-only chevron half (large is
    31 wide, the chevron 1px low as upstream's svg sits), the divider's tokens
    per appearance and state, the open-menu Selected state, a whole-pixel
    seam, and the edges drawn with CSS border geometry — a circular split
    button is now a stadium, not two ellipses, and the outline no longer
    notches at the seam.
  • FluentSpinner moves like react-spinner 9.4+ (two conic wedges behind
    a mask) instead of the old stroke-dasharray keyframes: the arc grows from
    30° to 255° and back with no snap at the cycle boundary, has flat ends,
    and mirrors in RTL. Under reduced motion the ring keeps turning over 1.8s
    with a fixed, fading comet tail, as upstream does, instead of freezing.
    The ring repaints on its own RepaintBoundary.
  • FluentGanttChart's date axis honours useUtc (it built a local time
    scale while the popover read UTC); props.useUTC ?? useUtc now feeds both,
    and only true or 'utc' enable UTC.
  • FluentDataGrid headers and rows follow upstream: a sortable header is
    one interactive surface with the subtle hover and press fill, a bare 12px
    arrow shown only while it holds the sort (an unsorted column draws none,
    keeping an empty slot), and regular-weight labels; a pressed row fills
    subtleBackgroundPressed; a cell's focus ring shows for keyboard focus
    only.
  • Nav rows follow the storybook: labels stay neutralForeground2 in
    every state, a held plain row keeps the hover fill, and split-row
    secondary actions fade in over the row end on hover, press or focus, so
    the label keeps its width.
  • Horizontal bar rows fit their gaps. A row of n bars used to run
    (n − 1) × 3px past its edge (past the start in RTL); bars now shrink into
    the room the gaps leave, and a zero-width bar takes no gap
    (FluentHorizontalBarRowLayout.compute, new absoluteLabelIndex).
  • BREAKING (custom styles): FluentInputStyle.borderWidth,
    bottomBorderColor and bottomBorderWidth now describe a real CSS-style
    border.
    The border takes space and the content row sits inside it, on top
    of padding — the bottom side used to be a rule overlaid on the box's bottom
    edge that cost no layout. A null borderColor means no border and no inset
    whatever borderWidth says; a null bottomBorderColor means the bottom
    follows borderColor. A custom style that set a wide bottom rule, or relied
    on the border not moving the text, will lay out differently. The same holds
    for the bottom-side fields of FluentSearchBoxStyle, FluentTextareaStyle,
    FluentSpinButtonStyle, FluentDropdownStyle, FluentTagPickerStyle,
    FluentDatePickerStyle and FluentTimePickerStyle.
  • BREAKING (sibling APIs), each to match upstream:
    • FluentSpinButtonBaseState.inert is gone — read-only no longer styles the
      surface, only the steppers go inert;
    • FluentSpinButtonChevronPainter no longer takes glyphSize or
      strokeWidth: it fills upstream's 14px svg path;
    • FluentTextarea.maxLines: null holds the field at minLines rows and
      scrolls, as upstream's rows does; pass maxLines to let it grow;
    • FluentTimePickerStyle.trailingGap is now the space between the text
      field and the trailing glyph, and trailingPadding the inset around the
      text field;
    • FluentDropdown and FluentTimePicker take upstream's 250px minimum
      width;
    • FluentTagPicker draws upstream's expand chevron by default (expandIcon,
      fluentTagPickerChevron), is 34/42/46 tall, and has 32px option rows and
      upstream-sized tags;
    • FluentTagDismissPainter.inkRatio is gone: the dismiss glyph fills
      upstream's DismissRegular path instead of a scaled cross;
    • FluentSpinButtonStepper is now a StatefulWidget (it repeats while
      held).
  • **...
Read more

v0.0.5

Choose a tag to compare

@ascobani ascobani released this 23 Sep 08:01

Fixed

Selected text stayed highlighted after clicking away from a field. Flutter hides a selection in exactly one way — by handing EditableText a null selectionColor. Blur does none of the work itself: _handleFocusChanged leaves controller.selection alone and RenderEditable's highlight painter draws from (range, colour) with no focus term, so a control that keeps passing a colour keeps painting the selection after the pointer has gone elsewhere. Focus was dropping correctly all along; only the paint outlived it. FluentInput (and so FluentDatePicker, FluentTimePicker and FluentTagPicker, which share buildFluentInput), FluentTextarea and FluentSearchBox now gate the colour on real focus, the way TextField and CupertinoTextField both do and FluentSpinButton already did. FluentSearchBox had a guard on enabled && !readOnly, which is true for an ordinary field's whole lifetime — it read as a gate in a diff and did nothing at runtime; both terms are now applied.
Pressing a field's own chrome dropped its focus. The padding, the border and the contentBefore/contentAfter slots are built around the EditableText, so they fall outside the TextFieldTapRegion it installs for itself and a pointer-down there ran _EditableTextTapOutsideAction. The selection gesture detector handed focus back on pointer-up, so it read as a flicker rather than a fault — but a focus-reactive slot unmounts under the cursor between press and release, and a spin button's steppers are outside the field too, so every increment blurred it. buildFluentInput, FluentTextarea, FluentSearchBox and FluentSpinButton now each wrap their faceplate, as TextField wraps its decoration. All use the default group id, so the pickers wrapping the result again for their popups stays a no-op.
Changed

Blurring a Fluent text control now collapses its selection, rather than only hiding the highlight. Material and Cupertino keep the range and restore it on refocus; these controls deliberately do not, so returning to a field lands a caret where the selection ended. The value is never touched — only controller.selection — but an application that reads a selection back from its own controller after the field has lost focus will now find it collapsed.
collapseFluentSelectionOnBlur is new. An internal helper in lib/src/internal/text_selection_dismiss.dart, called from the focus listener each control already owned. It writes as little as it can: nothing while focused, nothing for an invalid or already-collapsed range, and it clamps the caret to the current text — TextEditingController.selection's setter throws rather than asserts past text.length, so that guard holds in release too. FluentDatePicker and FluentTimePicker key it to focus leaving the whole control, not just the field, so an open calendar or listbox keeps its range.

v0.0.4

Choose a tag to compare

@ascobani ascobani released this 08 Sep 16:57

fluent_2 0.0.4

fluent_2

  • Fix: a popup opened from inside a FluentPopover collapsed the popover on the first click
  • Affected controls now adopt the enclosing tap group: dropdown, tag picker, date/time pickers, info button, breadcrumb overflow, menu
  • New internal helper adoptFluentTapGroup (tap_group.dart)

Full changelog: https://github.com/B1Digital/fluent_ui_2_flutter/blob/main/packages/fluent_2/CHANGELOG.md

v0.0.3

Choose a tag to compare

@ascobani ascobani released this 01 Sep 07:16

fluent_2 0.0.3 / fluent_2_core 0.0.3

Published to pub.dev:

fluent_2_core

  • Fix status token parity with Fluent UI React v9 (dark statusSuccessForegroundInverted, statusWarningForeground1/3, statusWarningBorder1)
  • Add react-token parity test (228 alias tokens across 4 theme variants)
  • FluentScrollBehavior now supplies a scrollbar

fluent_2

  • Switch track width fix inside FluentField
  • Input layout/a11y fixes (date/dropdown/info/tag/time pickers, swatch picker)
  • Breadcrumb and menu fixes
  • Regenerated golden images

v0.0.2

Choose a tag to compare

@ascobani ascobani released this 25 Aug 18:02

Highlights

  • Adds FluentColorPicker, FluentColorArea, FluentColorSlider, and FluentAlphaSlider.
  • Fixes FluentSlider touch dragging inside scrolling ancestors.
  • Removes the obsolete FluentSpinButtonUnderlinePainter API.
  • Uses the Fluent 2 Flutter logo as the pub.dev thumbnail for all eight packages.
  • Aligns all package versions and internal constraints at 0.0.2.

Validation

  • Full workspace CI passed: analysis, formatting, architecture invariants, license checks, and all Flutter tests.
  • All eight pub.dev release archives validate cleanly.

v0.0.1

Choose a tag to compare

@ascobani ascobani released this 25 Aug 12:47

fluent_2 0.0.1