WIP: Extensions: Show Available Updates on Status Bar #122413

Closed
Harley Acheson wants to merge 2 commits from Harley/blender:ExtensionsStatus into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Work in progress and tests towards showing number of updates on the
status bar, as described on #120610


Once applied you can right-click on the status bar bottom right and enable this.

image

When offline (Preferences / System / Network) this shows an "offline" icon:

image

If online but having never checked for updates (unset), it shows:

image

If online but with update checking in progress it looks like:

image

If online but without any updates it shows:

image

When there are updates available the number of them are displayed on the icon like this:

image

When the number of updates is large the value will be approximated like this:

image

Clicking on this icon will bring up "Preferences" on the "Extensions" page.

Work in progress and tests towards showing number of updates on the status bar, as described on #120610 --- Once applied you can right-click on the status bar bottom right and enable this. ![image](/attachments/3754a152-ef4b-455d-adea-bd845480bd58) When offline (Preferences / System / Network) this shows an "offline" icon: ![image](/attachments/66594b8b-4b77-416f-828f-cf844290b769) If online but having never checked for updates (unset), it shows: ![image](/attachments/14dede2e-e2d6-4988-9367-bc2e0cf7d750) If online but with update checking in progress it looks like: ![image](/attachments/c3508318-2df7-4218-9cf7-d145c7202377) If online but without any updates it shows: ![image](/attachments/600aadae-89da-4bdf-9bb8-a93ba28f51bb) When there are updates available the number of them are displayed on the icon like this: ![image](/attachments/b164d0ed-eecc-47ac-9d14-9e8f24e9b1ee) When the number of updates is large the value will be approximated like this: ![image](/attachments/77d64bc0-0434-4c72-a6c9-16c3f810f7d3) Clicking on this icon will bring up "Preferences" on the "Extensions" page.
Harley Acheson added this to the User Interface project 2024-05-29 03:30:19 +02:00
Harley Acheson requested review from Dalai Felinto 2024-05-29 03:30:25 +02:00

Hi Harley, nice first pass.

I played a little with the patch, and I think if you could land this look, it would be great:

image

image

image

You see the hacky patch attached if it helps.

Missing from the hacky patch:

  • Make it not hacky :)
  • Handle the case when we have a backward compatibility issus (has_forward_compatibility_issues).
  • Use natural numbering (1k instead of 1000)
  • Change rna_wm.cc:rna_def_windowmanager:extensions_updates to trigger redraw of the statusbar when re-set.

This builds on top of !122486

Hi Harley, nice first pass. I played a little with the patch, and I think if you could land this look, it would be great: ![image](/attachments/2d2c1521-fedc-439b-84da-bdef227263dd) ![image](/attachments/3c6890c0-c478-4bed-8b3b-f3659e7e5f9e) ![image](/attachments/d40429a6-3ca3-46a1-9681-34fe24d0bf6d) You see the hacky patch attached if it helps. Missing from the hacky patch: * Make it not hacky :) * Handle the case when we have a backward compatibility issus (has_forward_compatibility_issues). * Use natural numbering (1k instead of 1000) * Change rna_wm.cc:rna_def_windowmanager:extensions_updates to trigger redraw of the statusbar when re-set. This builds on top of !122486

Some update based on a meeting we had today:

  • Show the SYNC icon while checking for update.
    • You may need to pre-initialize the wm->extensions_update to some hardcoded values, e.g.:
      • -2 UNSET (don't show anything).
      • -1 CHECKING update (show SYNC).
    • 0 or more: number of updates.
  • Only show INTERNET icon if there is an update available.
    • So there is no need for the INTERNET_CHECKMARK icon.
  • Still shows the INTERNET_OFFLINE icon if offline.
Some update based on a [meeting we had today](https://devtalk.blender.org/t/2024-05-30-extensions-project/34899): * Show the SYNC icon while checking for update. * You may need to pre-initialize the wm->extensions_update to some hardcoded values, e.g.: * -2 UNSET (don't show anything). * -1 CHECKING update (show SYNC). * 0 or more: number of updates. * Only show INTERNET icon if there is an update available. * So there is no need for the INTERNET_CHECKMARK icon. * Still shows the INTERNET_OFFLINE icon if offline.

I went ahead and committed:

+/** #wmWindowManager.extensions_updates */
enum {
  WM_EXTENSIONS_UPDATE_UNSET = -2,
  WM_EXTENSIONS_UPDATE_CHECKING = -1,
};

This should be enough to finish this patch worrying only about the UI logic.

I went ahead and committed: ``` +/** #wmWindowManager.extensions_updates */ enum { WM_EXTENSIONS_UPDATE_UNSET = -2, WM_EXTENSIONS_UPDATE_CHECKING = -1, }; ``` This should be enough to finish this patch worrying only about the UI logic.
Harley Acheson force-pushed ExtensionsStatus from 2b7981ea83 to fe0a517808 2024-05-31 01:18:24 +02:00 Compare
Author
Member

@dfelinto

I have updated this PR and all the captures in the first comment. This won't be exactly as you asked for, but it is much more complete now. It is...

  • less hacky
  • does handle has_forward_compatibility_issues
  • uses natural numbering

Show the SYNC icon while checking for update...

We don't have an ICON_SYNC icon. We do have ICON_UV_SYNC_SELECT that looks like two diagonal arrows? The Extensions area itself seems to be using ICON_SORTTIME during update checks. This PR is currently using ICON_FILE_REFRESH, which looks like rotating arrows (shown in first comment). Easy to change to anything else of course.

Something not explicitly mentioned, but currently with this PR it does not show any numbers when in offline mode. Not sure if it is ever possible have a non-zero extensions_updates while offline though.

-2 UNSET (don't show anything)
Only show INTERNET icon if there is an update available

This is something you requested that I haven't done as this doesn't seem like expected behavior. This new item is in the middle of these status bar items. It therefore has to have a toggle for it on the right-click menu. But I don't think there should be any time when you enable an item in that list and have nothing shown or change. This would be confusing I think.

Change rna_wm.cc:rna_def_windowmanager:extensions_updates to trigger redraw of the statusbar when re-set.

I did add a RNA_def_property_update callback that refreshes the status bar text when extensions_updates changes

@dfelinto I have updated this PR and all the captures in the first comment. This won't be exactly as you asked for, but it is much more complete now. It is... * less hacky * does handle has_forward_compatibility_issues * uses natural numbering > Show the SYNC icon while checking for update... We don't have an ICON_SYNC icon. We do have ICON_UV_SYNC_SELECT that looks like two diagonal arrows? The Extensions area itself seems to be using ICON_SORTTIME during update checks. This PR is currently using ICON_FILE_REFRESH, which looks like rotating arrows (shown in first comment). Easy to change to anything else of course. Something not explicitly mentioned, but currently with this PR it does not show any numbers when in offline mode. Not sure if it is ever possible have a non-zero extensions_updates while offline though. > -2 UNSET (don't show anything) > Only show INTERNET icon if there is an update available This is something you requested that I haven't done as this doesn't seem like expected behavior. This new item is in the middle of these status bar items. It therefore has to have a toggle for it on the right-click menu. But I don't think there should be any time when you enable an item in that list and have nothing shown or change. This would be confusing I think. > Change rna_wm.cc:rna_def_windowmanager:extensions_updates to trigger redraw of the statusbar when re-set. I did add a `RNA_def_property_update` callback that refreshes the status bar text when `extensions_updates` changes
Harley Acheson added 1 commit 2024-05-31 01:59:18 +02:00

Hi @harley thanks for the updates. I talked to Campbell and he will review, tweak and merge it.

My pending requests still hold:

  • To use the UV_SYNC_SELECT icon indeed.
  • To not show anything if there are no available updates.

Although it may sound unusual to have the option enabled even if it may not show anything, this is exactly what we want. Otherwise users may just disable that option, and miss on this important piece of information.

By the way, as per recent design there is no more Extensions update information displayed on the splashscreen. So we really hope that users keep that option enabled.

Hi @harley thanks for the updates. I talked to Campbell and he will review, tweak and merge it. My pending requests still hold: * To use the UV_SYNC_SELECT icon indeed. * To not show anything if there are no available updates. Although it may sound unusual to have the option enabled even if it may not show anything, this is exactly what we want. Otherwise users may just disable that option, and miss on this important piece of information. By the way, as per recent design there is no more Extensions update information displayed on the splashscreen. So we really hope that users keep that option enabled.
Campbell Barton was assigned by Dalai Felinto 2024-05-31 09:39:15 +02:00

Implemented on:

Implemented on: * 8bd3be216015 + fd4a69660b91 * 96424cd2a56f
Dalai Felinto closed this pull request 2024-05-31 14:34:58 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#122413
No description provided.