Skip to content

feat(store): show the sort order when tab changes it - #8

Open
albertonoys wants to merge 2 commits into
CardputerZero:mainfrom
albertonoys:feat/store-sort-label
Open

albertonoys wants to merge 2 commits into
CardputerZero:mainfrom
albertonoys:feat/store-sort-label

Conversation

@albertonoys

Copy link
Copy Markdown

Problem

Tab on the catalog screen cycles the sort order (Default, Newest first, Oldest first, A-Z, Z-A), but nothing on screen says so:

  • The status line is cleared, and the current order is not shown anywhere. sort_rule_label() exists but nothing calls it.
  • The selected app stays selected. The catalog shows one app at a time, so after Tab the same app is still on screen and only the "In category" counter changes. Tab looks like it does nothing.

Change

  • Tab shows Sort: <order> in the status line, using sort_rule_label(), which now returns readable names ("Newest first" instead of "new").
  • After the sort changes, the first app in the new order is selected.

Tests

  • test_catalog_controller: Tab sets the status message and selects the first app. The old code fails the second check.
  • test_appstore_input_controller and test_appstore_request_coordinator link the catalog controller and stub the client functions it calls, so both got a sort_rule_label stub.
  • Those three tests pass, built with clang on macOS. I did not run the full run_tests.sh, which needs Linux.
  • Tried on a CardputerZero.

- tab cycled the sort order with nothing on screen saying so; it now shows "Sort: <order>" in the status line
- sort_rule_label(), unused until now, returns readable names
- the catalog shows one app at a time, so keeping the selected app made tab look like it did nothing
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