Skip to content

Commit

Permalink
gui tweaks (#406)
Browse files Browse the repository at this point in the history
* gui, fixed 'key' column on addon detail raw data was too small for text 'supported game tracks'.
* gui, fixed 'updated' column on installed addons was too small for '12 months ago'
* gui, switch to log tab when user catalogue is manually refreshed
  • Loading branch information
torkus authored May 28, 2023
1 parent c25c831 commit 9dd9128
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

* manually refreshing the user catalogue will now switch to the `log` pane before doing so.
- see `Catalogue -> Refresh user catalogue`.
- the intent is to show that *something* is happening.
* an (opt-in) automatic refesh of the user-catalogue every 28 days.
- see `Preferences` -> `Keep user catalogue updated`.
- the user-catalogue is a catalogue of the addons added to strongbox using `File` -> `Import addon`
Expand Down Expand Up @@ -48,7 +51,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

* minor cosmetic fix. the buttons on the search tab are now a consistent height.
* filter buttons on the search tab are now a uniform height.
* `key` column in the addon detail 'raw data' widget is now wide enough for the text 'supported game tracks'.
* `updated` column in the installed addon tab is now wide enough for the text '12 months ago'.
* possible cache stampede fetching strongbox release info. A lock is now acquired to ensure checks happen sequentially.
- it was possible for the GUI to fire off many requests to Github simultaneously, bypassing cache and overwriting each other.

Expand Down
24 changes: 17 additions & 7 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ see CHANGELOG.md for a more formal list of changes by release
- disable during testing?
- done

* gui, raw data, 'key' column too small for 'supported-game-tracks'
- done

* gui, installed, 'updated' column too small for 'NN months ago'
- done

* user-catalogue
- switch to log window to see progress when refresh-catalogue triggered
- only when triggered from menu
- scheduled refreshes happen in background
- done

## todo

* 'core/state :db-stats', seems like a nice idea to put more information here
Expand All @@ -92,23 +104,21 @@ see CHANGELOG.md for a more formal list of changes by release
- ...?
- a button on the opposite of the log popup button but similar that will show some overall stats

* user-catalogue
- switch to log window to see progress when refresh-catalogue triggered

* display github requests remaining
- ...

* user-catalogue, don't switch to user catalogue if sub-pane is up and notice logger is showing
- ...

* user catalogue, refreshing may guarantee exceeding github limit.
- if we know this, add a warning? refuse?

* gui, raw data, 'key' column too small for 'supported-game-tracks'

* gui, installed, 'updated' column too small for 'NN months ago'

* update screenshots

## todo bucket (no particular order)

* support NO_COLOR envvar, http://no-color.org

* gui, bug, sorting isn't preserved between addon dir switches
- for example, sorting by 'size' in one addon dir, then switching to another will see random sorting

Expand Down
8 changes: 5 additions & 3 deletions src/strongbox/jfx.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@
(:tag-list row))}})}}

:updated-date {:text "updated"
:min-width 90 :pref-width 110 :max-width 120
:min-width 100 :pref-width 130 :max-width 150
:cell-value-factory :updated-date
:cell-factory {:fx/cell-type :tree-table-cell
:describe (fn [dt]
Expand Down Expand Up @@ -1532,7 +1532,9 @@
(fx/sub-val context get-in [:app-state :cfg :selected-catalogue])
(fx/sub-val context get-in [:app-state :cfg :catalogue-location-list]))
[separator
(menu-item "Refresh user catalogue" (async-handler cli/refresh-user-catalogue))])
(menu-item "Refresh user catalogue" (async-handler (fn []
(switch-tab! LOG-TAB)
(cli/refresh-user-catalogue))))])

cache-menu [(menu-item "Clear http cache" (async-handler core/delete-http-cache!))
(menu-item "Clear addon zips" (async-handler core/delete-downloaded-addon-zips!)
Expand Down Expand Up @@ -2210,7 +2212,7 @@
(let [key-col (fn [keypair]
;; shouldn't ever be nil but better safe than sorry
(-> keypair :key (or ":nil") str (subs 1)))
column-list [{:text "key" :min-width 150 :pref-width 150 :max-width 200 :resizable false :cell-value-factory key-col}
column-list [{:text "key" :min-width 220 :pref-width 250 :max-width 300 :resizable false :cell-value-factory key-col}
{:text "val" :cell-value-factory :val}]

blacklist [:group-addons :release-list :source-map-list]
Expand Down

0 comments on commit 9dd9128

Please sign in to comment.