Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds column header click-to-sort functionality to the Krokiet UI, replacing the previous dropdown-based sorting system with direct column interaction. The implementation introduces ascending/descending sort modes that toggle on repeated clicks.
Key changes:
- Implemented clickable column headers with TouchArea in the table view that trigger sorting via the new
change_sort_column_modecallback - Added SortColumnMode enum (None, Ascending, Descending) to track sorting state per column
- Refactored sorting logic to use a unified
connect_sort_columnfunction that maps column indices to appropriate data sources (strings, integer pairs for size/date, or selection state)
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| krokiet/ui/selectable_tree_view.slint | Added TouchArea to column headers for click-to-sort, added sort state properties (sort_column_mode, sort_column_idx, sort_available), and scan_started function to reset sorting |
| krokiet/ui/main_window.slint | Passed working state to main_list and called scan_started on scan initiation |
| krokiet/ui/main_lists.slint | Added working property and connected it to sort_available on all table views, implemented scan_started dispatcher |
| krokiet/ui/translations.slint | Removed translation properties for deprecated sort modes (ItemName, ParentName, Size, ModificationDate, Checked) |
| krokiet/ui/gui_state.slint | Removed sort model entries for deprecated modes and updated i64 workaround comment |
| krokiet/ui/common.slint | Added SortColumnMode enum and removed deprecated SortMode enum values |
| krokiet/ui/callabler.slint | Added change_sort_column_mode callback and imported SortColumnMode |
| krokiet/src/connect_sort.rs | Implemented connect_sort_column function, added reverse parameter to common_sort_function, removed deprecated sort functions, and removed corresponding tests |
| krokiet/src/connect_translation.rs | Removed translation setup for deprecated sort modes |
| krokiet/src/connect_scan.rs | Converted model creation to use typed arrays with MAX_*_DATA constants for all entry types |
| krokiet/src/common.rs | Added TryFromPrimitive derives to all data enums, added MAX_*_DATA constants, implemented get_str_int_sort_idx method, and added SortIdx enum |
| krokiet/src/main.rs | Added connect_sort_column call during app initialization |
| krokiet/i18n/en/krokiet.ftl | Removed translation strings for deprecated sort modes |
| krokiet/Cargo.toml | Added num_enum dependency for TryFromPrimitive |
| Cargo.toml | Added debug and strip settings to fast_release profile (unrelated to sorting feature) |
| Cargo.lock | Updated with num_enum dependency |
| Changelog.md | Added entry for column header sorting feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 29 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 38 changed files in this pull request and generated 14 comments.
Comments suppressed due to low confidence (1)
czkawka_gui/src/gui_structs/gui_about.rs:146
- The Krokiet button does not have a tooltip set, while all other buttons (repository, donation, instruction, translation) have tooltips. This creates an inconsistent user experience. Consider adding a tooltip to explain what the Krokiet button does.
self.button_repository.set_tooltip_text(Some(&flg!("about_repository_button_tooltip")));
self.button_donation.set_tooltip_text(Some(&flg!("about_donation_button_tooltip")));
self.button_instruction.set_tooltip_text(Some(&flg!("about_instruction_button_tooltip")));
self.button_translation.set_tooltip_text(Some(&flg!("about_translation_button_tooltip")));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #1614 in Krokiet