Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visually indicate to users that they should click Refresh #4133

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Jul 29, 2024

Background

Since its creation (see #2177), ConsoleUI has shown the time since the last repo refresh in its bottom right corner:

  • image
  • image

Problem

Lately, that text indicates the last time a mod was installed or uninstalled, not the last repo refresh.

Cause

As of #3904, the available modules are no longer stored in CKAN/registry.json, which is no longer written after a repo update, but this is the file that ConsoleUI checks for the last update timestamp.

Motivation

@JonnyOThan reports (see #4130 (comment)):

I just had someone tell me that they couldn't find tweakscale rescaled on ckan because they hadn't refreshed since it was released.

GUI users apparently need a cue/reminder to update their metadata.

Changes

  • Now RepositoryDataManager provides:
    • A LastUpdate function that returns the time since the last update
    • TimeTillStale and TimeTillVeryStale properties indicating when metadata should be considered a little stale (3 days) and when it should be considered very stale (14 days)
  • ConsoleUI now:
    • Uses LastUpdate to get the last refresh timestamp instead of looking at CKAN/registry.json
    • Uses those intervals instead of its previous values of 1 and 7 days
  • When a GUI user's metadata is stale, a yellow notification-style dot (created by @JadeOfMaar) appears on the Refresh button, and its tooltip is set to a message suggesting to click Refresh
    image
    • The same happens for very-stale but with a red dot
    • After refreshing, the dot goes away and the tooltip reverts to normal

Fixes #4130.

@HebaruSan HebaruSan added Bug Something is not working as intended Enhancement New features or functionality GUI Issues affecting the interactive GUI Core (ckan.dll) Issues affecting the core part of CKAN ConsoleUI Issues affecting the interactive console UI labels Jul 29, 2024
@HebaruSan HebaruSan merged commit 5c1b90a into KSP-CKAN:master Jul 29, 2024
3 checks passed
@HebaruSan HebaruSan deleted the feature/refresh-alert branch July 29, 2024 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended ConsoleUI Issues affecting the interactive console UI Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: alert the user when the repository is older than some threshold
1 participant