Skip to content

Add option to show sortable columns hint icon - #427

Merged
w-ahmad merged 5 commits into
mainfrom
feat/sortable-column-hint
Aug 27, 2026
Merged

Add option to show sortable columns hint icon#427
w-ahmad merged 5 commits into
mainfrom
feat/sortable-column-hint

Conversation

@w-ahmad

@w-ahmad w-ahmad commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Description

Adds an opt-in TableView.ShowSortableColumnIcon property that shows a subtle hint icon on sortable columns that have no active sort direction, so users can tell at a glance which columns support sorting without having to click them first. The property defaults to false, so no existing app changes visually unless it opts in.

  • New TableView.ShowSortableColumnIcon (bool, default false).
  • New Sortable visual state on TableViewColumnHeader's SortStates group — shows the header's sort icon at 50% opacity with a new glyph when a column is sortable but currently unsorted.
  • Respects both TableView.CanSortColumns and the column's own CanSort — never shows on a non-sortable column.
  • Added change-callbacks for CanSort and CanSortColumns (previously missing, unlike the equivalent CanFilter/CanFilterColumns callbacks), so the header now also reacts live if those change at runtime.
  • Sample: new "Show Sortable Column Icon" toggle on the Sorting page.
  • Docs: new "Showing a hint icon for sortable columns" section in sorting.md, plus an entry in the options table.

Related Issue

Closes #114

Type of Change

  • ✨ New feature
  • 📝 Documentation update
  • 🧪 Test

Checklist

  • This PR is not from my main branch
  • Tested with WinUI target
  • Tested with Uno Platform target
  • Unit / integration tests added or updated
  • Documentation updated to reflect changes
  • Code follows the project's coding conventions

Screenshots / Recordings

20260826-2203-08 3154428

Additional Notes

Uno target builds cleanly but wasn't run/visually verified. Worth a quick look in Visual Studio at the new glyph (\ue8cb) next to the existing ascending/descending icons before merging, to confirm it reads well at 10px.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Initially enabling the property before header creation leaves the hint icon hidden.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds an opt-in hint icon for sortable, unsorted columns.

Changes:

  • Adds ShowSortableColumnIcon and runtime update callbacks.
  • Adds the sortable visual state, glyph, tests, sample, and documentation.
File summaries
File Description
tests/TableViewSortableColumnIconTests.cs Tests icon states and runtime changes.
src/VisualStates.cs Defines the sortable state.
src/Themes/TableViewColumnHeader.xaml Renders the hint icon state.
src/Themes/Resources.xaml Adds the hint glyph resources.
src/TableViewColumnHeader.cs Selects the sortable visual state.
src/TableView.Properties.cs Adds the new table property and callbacks.
src/Columns/TableViewColumn.cs Reacts to CanSort changes.
samples/WinUI.TableView.SampleApp/Pages/SortingPage.xaml Demonstrates the option.
docs/docs/sorting.md Documents the feature.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/TableView.Properties.cs
@w-ahmad
w-ahmad merged commit 8ea878f into main Aug 27, 2026
11 checks passed
@w-ahmad
w-ahmad deleted the feat/sortable-column-hint branch August 27, 2026 08:19
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.

Add icon for Not-Sorted-State in columnheader

2 participants