dmytro-anokhin / url-image

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.
MIT License
1.11k stars 96 forks source link

Roadmap to v2.0 #86

Closed dmytro-anokhin closed 4 years ago

dmytro-anokhin commented 4 years ago

Motivation

URLImage has grown from a small library to a functional package. Since original release after WWDC 2019, features like incremental loading, flexible image cache, filters, were implemented. Besides that, a number of feature requests implemented, bugs fixed, SwiftUI learned, and pitfalls discovered. I'm grateful everyone who helped me to investigate bugs and created feature request. This really pushed the package forward.

With features comes complexity. My intention was to keep URLImage lightweight, but currently this is not the case. With small changes here and there the code became hard modify.

Development is iterative process and now is time for big refactoring iteration: v2.0.

Goals

URLImage was developed with performance in mind. Files are downloaded directly on disk to reduce memory footprint. Image decoding and processing done in background threads to minimize UI thread utilization. Download tasks are reused, even when there are multiple views that initiate download, to reduce network traffic consumption.

My intention is to keep this fundamental features.

The focus for v2 is on architecture and flexibility. This will open next possibilities:

Process

v2.0 will be built from ground up, using all the good parts from v1.0. This will allow me to rethink architecture and structure of the package.

Package will be split into local dependencies managed by SPM. There will be code breaking API changes and number of features will be initially reduced.

Progress can be tracked in version_2 branch.

There won't be new development for current version. I will of course fix critical bugs if any. After releasing v2.0, previous version will be deprecated. I will keep the current version so you will be able to use it.

Timeline

When it's ready πŸ™‚ I work on this project in my spare time and it is currently my top priority. So should be soon (-ish).

dmytro-anokhin commented 4 years ago

Weekly update

The goal for the next week is to have first alpha release.

dmytro-anokhin commented 4 years ago

Weekly update:

Goals for the next week:

dmytro-anokhin commented 4 years ago

Weekly update:

I also started work on documentation and explored possibilities to download images in WidgetKit.

Next week I plan to release first beta.

dmytro-anokhin commented 4 years ago

There's new alpha πŸ₯³

In addition to previous week changes it includes:

Beta build is coming soon. This will mean that all major features implemented, the API is frozen and the package builds for all supported platforms.

dmytro-anokhin commented 4 years ago

Beta time πŸ₯³ I'm pretty happy with new API and plan to keep it.

Additionally to previous updates, there are few more features:

What's left for v2.0:

To speed up things I need to cut corners. So there won't be watchOS and WidgetKit support in 2.0. I hope to ship watchOS support in 2.1. WidgetKit after preloading images feature. I will also be closing old open issue.

If you use beta - please report bugs and mark them with v2.0 label. I hope to release v2.0 by the end of this week.

dmytro-anokhin commented 4 years ago

New beta, here are the changes:

BTW, you can configure SPM to track concrete branch if you feel lucky πŸ˜€

dmytro-anokhin commented 4 years ago

Created a demo app that I will fill in with various how-to's: https://github.com/dmytro-anokhin/url-image-demo

dmytro-anokhin commented 4 years ago

version_2 is now in master: #89 πŸŽ‰ Some more testing and cleanup coming before official release. I will keep this issue updated. I will also be closing long lasting open issue that I had no time to resolve.

dmytro-anokhin commented 4 years ago

Version 2 is officially out πŸ₯³πŸŽ‰

New structure should allow me to fix bugs and implement new features faster. I already have exciting features planned for the future.

On this note, I'm also dropping support for previous versions, so please consider updating.

Cheers!