Extensions: First time dialogs and setups #120665

Closed
opened 2024-04-15 17:04:37 +02:00 by Dalai Felinto · 4 comments
  • Edit: If bpy.app.online_access is off, and you drag from the internet, you should have a dialog:

    Internet access is required to install extensions from the internet.
    
    Please turn Online Access on the System settings.
    
    [ Cancel] [ Go to Settings]
    

    8f97419561.


With the introduction of the extension system, Blender needs a clear way for users to grant access to online repositories. Even Blender's own extensions.blender.org should be explicitly authorized (enabled) before Blender starts accessing it.

When will Blender access the remote repositories:

  • Every time you open the Preferences → Extensions: ALL the enabled repositories get checked for the latest info (json).
  • Every time you try to install by dragging: ALL the enabled repositories get checked for the latest info (json).
  • Every time you start Blender: selected repositories get checked for the latest info (json).

Proposed changes:

  • The extensions.blender.org repository will be disabled by default.
  • The extensions.blender.org repository will have "Check for Updates on Startup" enabled by default.
  • The "Check for Updates" operator shouldn't be exposed on the UI.

In the future the Extensions system will likely also be used for assets. Making the definition of extensions close to: "External resources to extend Blender functionality".


The remaining of this task specify how we should handle all the scenarios when users first interact with extensions.

  • Preferences
  • Check for updates for (all) repositories when dragging from the internet.
  • Drag in an extension URL from a disabled repository
  • Drag in a extension URL from a repository not added yet
  • Drag in a extension URL from a unknown repository

Drag in an extension URL from a disabled repository

If an extension from an added but disabled repository e.g., extensions.blender.org is dragged we get a special dialog. You know this is a known repository:

(mockup is out of date)

image

Drag in a extension URL from a repository not added yet

Extensions download URLs have an optional parameter to specify which repository they come from.

  • https://extensions.blender.org/add-ons/mypackage/1.0.0/download/?repository=/
  • https://aws1.com/mypackage.zip?repository=http://mysite.com/blender.json

If this extension is not in any of the available repositories (even after the check for updates that happens automatically) the user first has to setup the repository:

image

Note: We can show the complete Add Remote dialog options here.

Drag in a extension URL from a unknown repository

If this extension is not in any of the available repositories and no repository information is available:

image

Install an Extension

In all these cases, after you click on "Enable..." or "Add Repository...", the next dialog shown is the "regular" Install Extension dialog. Similar to a Wizard (first-time setup).

image

It would be nice if both set of dialogs were shown centralized (like "Saving changes before closing"), instead of where the cursor is.

Design done together with Pablo Vazquez.

- [x] Edit: If bpy.app.online_access is off, and you drag from the internet, you should have a dialog: ``` Internet access is required to install extensions from the internet. Please turn Online Access on the System settings. [ Cancel] [ Go to Settings] ``` 8f97419561bebdb657da575bf1ca7fcb47690eda. ---- With the introduction of the extension system, Blender needs a clear way for users to grant access to online repositories. Even Blender's own extensions.blender.org should be explicitly authorized (enabled) before Blender starts accessing it. When will Blender access the remote repositories: * Every time you open the Preferences → Extensions: ALL the enabled repositories get checked for the latest info (json). * Every time you try to install by dragging: ALL the enabled repositories get checked for the latest info (json). * Every time you start Blender: selected repositories get checked for the latest info (json). Proposed changes: * The extensions.blender.org repository will be disabled by default. * The extensions.blender.org repository will have "Check for Updates on Startup" enabled by default. * The "Check for Updates" operator shouldn't be exposed on the UI. In the future the Extensions system will likely also be used for assets. Making the definition of extensions close to: "External resources to extend Blender functionality". ---- The remaining of this task specify how we should handle all the scenarios when users first interact with extensions. - [x] Preferences - [ ] Check for updates for (all) repositories when dragging from the internet. - [ ] Drag in an extension URL from a disabled repository - [ ] Drag in a extension URL from a repository not added yet - [ ] Drag in a extension URL from a unknown repository # Drag in an extension URL from a disabled repository If an extension from an added but disabled repository e.g., extensions.blender.org is dragged we get a special dialog. You know this is a known repository: * ~~Because the .zip file matches one from the repository listing; OR~~ * https://extensions.blender.org/files/myfile.zip?repository=/api/v1/ (mockup is out of date) ![image](/attachments/cf5315ee-4ff3-4fb8-b7a4-d840cff90734) # Drag in a extension URL from a repository not added yet Extensions download URLs have an optional parameter to specify which repository they come from. * `https://extensions.blender.org/add-ons/mypackage/1.0.0/download/?repository=/` * `https://aws1.com/mypackage.zip?repository=http://mysite.com/blender.json` If this extension is not in any of the available repositories (even after the check for updates that happens automatically) the user first has to setup the repository: ![image](/attachments/2b39bbec-7aff-4b28-b074-14a13f137c9b) Note: We can show the complete Add Remote dialog options here. # Drag in a extension URL from a unknown repository If this extension is not in any of the available repositories and no repository information is available: ![image](/attachments/c60757f4-7a14-4c2b-8a94-33bb49fb76e0) ## Install an Extension In all these cases, after you click on "Enable..." or "Add Repository...", the next dialog shown is the "regular" Install Extension dialog. Similar to a Wizard (first-time setup). ![image](/attachments/3f6c3b72-479a-401d-9234-c9ea693fe7c5) It would be nice if both set of dialogs were shown centralized (like "Saving changes before closing"), instead of where the cursor is. Design done together with Pablo Vazquez.
Dalai Felinto added the
Type
To Do
label 2024-04-15 17:04:37 +02:00
Dalai Felinto added this to the Python API project 2024-04-15 17:04:40 +02:00

What is confusing to me is this concept of checking for updates, which includes both refreshing the list of extensions, and doing that refresh on startup and notifying the user about updates.

I would rather expect that as soon as you have enabled a repository, it is fine to refresh the list of extensions when going to the extensions preferences. That's like browsing a web page, you don't expect it to be out of date. What I think you want permission for is (a) to enable/add the repository, and (b) for Blender to automatically access the internet in the background.

So from that point of view, I would expect the welcome message to be asking to enable or add the extensions.blender.org repository, rather than having it already enabled and only a refresh away from being used.

For the dialog when installing an extension, maybe it would be better to have a single dialog instead of two, with a Add Repository checkbox? I can imagine some confusion with this intermediate step, and it not being obvious that it will be possible to install the extension in the next dialog.

What is confusing to me is this concept of checking for updates, which includes both refreshing the list of extensions, and doing that refresh on startup and notifying the user about updates. I would rather expect that as soon as you have enabled a repository, it is fine to refresh the list of extensions when going to the extensions preferences. That's like browsing a web page, you don't expect it to be out of date. What I think you want permission for is (a) to enable/add the repository, and (b) for Blender to automatically access the internet in the background. So from that point of view, I would expect the welcome message to be asking to enable or add the extensions.blender.org repository, rather than having it already enabled and only a refresh away from being used. For the dialog when installing an extension, maybe it would be better to have a single dialog instead of two, with a Add Repository checkbox? I can imagine some confusion with this intermediate step, and it not being obvious that it will be possible to install the extension in the next dialog.
Author
Owner

Task updated with new design iteration. We may still iterate over the text after (or before?) this is implemented.

Task updated with new design iteration. We may still iterate over the text after (or before?) this is implemented.
Author
Owner

There seems to be a problem with supporting the mutli-screen wizard approach. So Campbell and I went over this task again thinking on an alternative. Instead of a multi-screen dialog we will try now a single-screen dialog for each of the cases presented here.

  • Multi-screen wizard is not trivial and won't be pursuited.

  • Instead, we do single screens:

    • Have checkboxes to enable repository or enable internet, or authorize adding a repo, ...
    • Will need to call Ok/install button "poll()" function on redraw.
  • Cases:

      1. online access is off but is an existing repository
      • Message explaining that it requires internet.
      • Button: "Allow Online Access".
      1. has internet but existing repository is disabled.
      • Message explaining that repository needs to be enabled.
      • Button "Enable Repository".
      1. Drag in a extension URL from a repository not added yet (that contains repository=url)
      • Message asking if the person trust the repo ... OR install from disk.
      • Button "Add Repository"
      • Here we could try two different approaches:
        • [-] A. All the information about the repository is already on the main dialog, and the button just ADDs it.
        • B. Clicking on the Add Repository button will launch a popup dialog with all the options.
      1. Drag in a extension URL from a unknown repository
      • Different message, but same flow as (3).
  • Challenges

    • The final "OK"/"Install" button needs to have its poll() call at every redraw. So it is only clickable when all conditions are satisfied.

    • While the "OK" text can be set it cannot be dynamically updated, nor greyed out
      (it can be hidden using hacks).

      Possible solutions?

      • Add ability to grey out text (unclear how exactly).
There seems to be a problem with supporting the mutli-screen wizard approach. So Campbell and I went over this task again thinking on an alternative. Instead of a multi-screen dialog we will try now a single-screen dialog for each of the cases presented here. * Multi-screen wizard is not trivial and won't be pursuited. * Instead, we do single screens: * Have checkboxes to enable repository or enable internet, or authorize adding a repo, ... * Will need to call Ok/install button "poll()" function on redraw. * Cases: * 1. online access is off but is an existing repository * [x] Message explaining that it requires internet. * [x] Button: "Allow Online Access". * 2. has internet but existing repository is disabled. * [x] Message explaining that repository needs to be enabled. * [x] Button "Enable Repository". * 3. Drag in a extension URL from a repository not added yet (that contains repository=url) * [ ] Message asking if the person trust the repo ... OR install from disk. * [x] Button "Add Repository" * Here we could try two different approaches: * [-] A. All the information about the repository is already on the main dialog, and the button just ADDs it. * [x] B. Clicking on the Add Repository button will launch a popup dialog with all the options. * 4. [x] Drag in a extension URL from a unknown repository * [x] Different message, but same flow as (3). * Challenges * The final "OK"/"Install" button needs to have its poll() call at every redraw. So it is only clickable when all conditions are satisfied. * While the "OK" text can be set it **cannot** be dynamically updated, nor greyed out (it can be hidden using hacks). Possible solutions? * Add ability to grey out text (unclear how exactly).

Closing as 1ed6449c82 has been committed,
along with some other changes that implement the last proposal from @dfelinto.

Closing as 1ed6449c82a80ead894e15295dbd31413876f3cb has been committed, along with some other changes that implement the last proposal from @dfelinto.
Blender Bot added the
Status
Archived
label 2024-06-18 12:12:47 +02:00
Sign in to join this conversation.
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
3 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#120665
No description provided.