opto / Imageview

Thunderbird addon to view images in attachments
Other
2 stars 2 forks source link

add preview to download location and improve other parts #2

Closed jobisoft closed 3 years ago

jobisoft commented 3 years ago

This PR does the following:

  1. Re-adding the loading screen
  2. Moving the download of the image data into a separate API method, so we can do something after each downloaded image (for example add a progress bar to the loading screen or load the images on demand into the viewer and use it independently.
  3. Use the customUI API from Dirk (https://github.com/rsjtdrjgfuzkfg/thunderbird-experiments/tree/master/experiments/customui) to add the preview in the unknow download location dialog.
  4. The preview in the download dialog is skipped, if nostalgy is installed

The customUI API adds iframes to the Thunderbird UI and allows the developer to load standard WebExtension pages into those iframes. This cleanly decouples the legacy/core part from the WebExtension part and is one of the options we evaluate to make it possible for WebExtension to add/manipulate Thunderbird UI.

The customUI API provides dedicated locations identifiers like "LOCATION_ADDRESSBOOK" or "LOCATION_CALENDAR_EVENT_EDIT" which the developer can pick to add his content. It did not have a "LOCATION_UNKNOWN_FILE_ACTION" yet. I added that. I also created a pull request to Dirk to get it added upstream. This means you are not using an "official" version of the customUI API as long Dirk has not merged my changes.

jobisoft commented 3 years ago

Correction: Dirk merged my PR.

jobisoft commented 3 years ago

When merging, could you use "squash and merge"?