Skip to content

Comments

Add Small and Large size variants to date/time picker controls#877

Merged
zdpcdt merged 3 commits intomainfrom
copilot/add-small-style-to-datepickers
Feb 10, 2026
Merged

Add Small and Large size variants to date/time picker controls#877
zdpcdt merged 3 commits intomainfrom
copilot/add-small-style-to-datepickers

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

Date/time picker controls lacked size variants, causing height misalignment when horizontally positioned with TextBox and NumericIntUpDown that support .Small and .Large classes.

Changes

Added .Small and .Large style selectors to:

  • DatePicker
  • TimePicker
  • DateTimePicker
  • DateRangePicker
  • TimeRangePicker

Each selector sets MinHeight using existing TextBoxSmallHeight and TextBoxLargeHeight resources, matching the pattern in NumericUpDown.

Usage

<Grid ColumnDefinitions="Auto,100,Auto,100" ColumnSpacing="8">
    <TextBlock Grid.Column="0" Text="Date" />
    <u:DatePicker Grid.Column="1" Classes="Small" />
    <TextBlock Grid.Column="2" Text="Time" />
    <u:TimePicker Grid.Column="3" Classes="Small" />
</Grid>

Controls now align correctly with adjacent small-sized inputs.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • av-build-tel-api-v1.avaloniaui.net
    • Triggering command: /usr/share/dotnet/dotnet dotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/11.3.1/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>DatePicker / TimePicker / DateTimePicker 应该添加 Small 样式类</issue_title>
<issue_description>当前 DatePicker / TimePicker / DateTimePicker 控件没有 Small 样式类, 当他们和 TextBox 水平排列时, 高度会不一致.

<Grid Grid.Column="1" ColumnDefinitions="Auto,100,Auto,100,Auto,100,Auto,100,Auto,100" ColumnSpacing="8" VerticalAlignment="Center">
    <TextBlock Grid.Column="0" VerticalAlignment="Center" Text="Item1" />
    <TextBox Grid.Column="1" Classes="Small" Text="Item1" />
    <TextBlock Grid.Column="2" VerticalAlignment="Center" Text="Item2" />
    <u:NumericIntUpDown Grid.Column="3" Classes="Small" Value="1" ShowButtonSpinner="False" />
    <TextBlock Grid.Column="4" VerticalAlignment="Center" Text="Item3" />
    <u:DatePicker Grid.Column="5" Classes="Small" HorizontalAlignment="Stretch" />
    <TextBlock Grid.Column="6" VerticalAlignment="Center" Text="Item4" />
    <u:TimePicker Grid.Column="7" Classes="Small" HorizontalAlignment="Stretch" />
    <TextBlock Grid.Column="8" VerticalAlignment="Center" Text="Item5" />
    <u:DateTimePicker Grid.Column="9" Classes="Small" HorizontalAlignment="Stretch" />
</Grid>

Image</issue_description>

<agent_instructions>Please add style for DatePicker, TimePicker, DateTimePicker, DateRangePicker, TimeRangePicker.
similar to

        <Style Selector="^.Large">
            <Setter Property="MinHeight" Value="{DynamicResource TextBoxLargeHeight}" />
        </Style>
        <Style Selector="^.Small">
            <Setter Property="MinHeight" Value="{DynamicResource TextBoxSmallHeight}" />
        </Style>
```</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…Picker, DateRangePicker, and TimeRangePicker controls

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Small style class to DatePicker, TimePicker, DateTimePicker Add Small and Large size variants to date/time picker controls Feb 7, 2026
Copilot AI requested a review from rabbitism February 7, 2026 15:04
@rabbitism rabbitism requested review from Copilot and zdpcdt February 7, 2026 15:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds .Small and .Large size variants for Semi theme date/time picker controls so they can align in height with other inputs (e.g., TextBox, NumericIntUpDown) when laid out horizontally.

Changes:

  • Added .Small and .Large style selectors to set MinHeight on Date/Time picker-related controls.
  • Standardized sizing to use TextBoxSmallHeight / TextBoxLargeHeight resources across these pickers.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Ursa.Themes.Semi/Controls/DatePicker.axaml Adds .Small/.Large selectors to override MinHeight for DatePicker.
src/Ursa.Themes.Semi/Controls/TimePicker.axaml Adds .Small/.Large selectors to override MinHeight for TimePicker.
src/Ursa.Themes.Semi/Controls/DateTimePicker.axaml Adds .Small/.Large selectors to override MinHeight for DateTimePicker.
src/Ursa.Themes.Semi/Controls/DateRangePicker.axaml Adds .Small/.Large selectors to override MinHeight for DateRangePicker.
src/Ursa.Themes.Semi/Controls/TimeRangePicker.axaml Adds .Small/.Large selectors to override MinHeight for TimeRangePicker.

@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Test Results

715 tests  ±0   715 ✅ ±0   18s ⏱️ +3s
  2 suites ±0     0 💤 ±0 
  2 files   ±0     0 ❌ ±0 

Results for commit 648e8ab. ± Comparison against base commit 13362d6.

♻️ This comment has been updated with latest results.

@rabbitism rabbitism marked this pull request as ready for review February 9, 2026 08:10
@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
Ursa 41% 31% 9045
Ursa.Themes.Semi 61% 68% 1021
Summary 49% (10700 / 21997) 34% (2640 / 7741) 10066

@zdpcdt zdpcdt merged commit 134cddd into main Feb 10, 2026
4 checks passed
zdpcdt added a commit that referenced this pull request Feb 12, 2026
* Initial plan

* Add Small and Large style classes to DatePicker, TimePicker, DateTimePicker, DateRangePicker, and TimeRangePicker controls

Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>

* fix: fix MinHeight in TimePicker when Classes include Small.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rabbitism <14807942+rabbitism@users.noreply.github.com>
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
(cherry picked from commit 134cddd)
@zdpcdt zdpcdt deleted the copilot/add-small-style-to-datepickers branch February 12, 2026 12:52
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.

DatePicker / TimePicker / DateTimePicker 应该添加 Small 样式类

3 participants