Closed ichan-mb closed 3 years ago
but, still have to fix the tests on the CI
P.S. Please also squash commits into one for the final version. :)
Maybe you've noticed already, but tests are failing on AppVeyor due to failing to load images. https://ci.appveyor.com/project/fusetools/fuselibs-public/builds/38382999#L896
Exception was thrown: FuseTest.DiagnosticException: InternalError: ImageSource error: 'Loading image from file failed. Could not find a part of the path 'C:\projects\fuselibs-public\Source\Fuse.Elements\Tests\build\dotnet\test\UX\Assets\200x100.png'.': Could not find a part of the path 'C:\projects\fuselibs-public\Source\Fuse.Elements\Tests\build\dotnet\test\UX\Assets\200x100.png'.
In: Fuse.Resources.FileImageSourceImpl
Fuse: C:\projects\fuselibs-public\Source\build\Fuse.Elements\2.0.0-beta.7\Resources\ImageSource.uno:111 ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\projects\fuselibs-public\Source\Fuse.Elements\Tests\build\dotnet\test\UX\Assets\200x100.png'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at Fuse.Resources.ImageBackgroundLoad.RunTask() in C:\projects\fuselibs-public\Source\build\Fuse.Elements\2.0.0-beta.7\Resources\ImageBackgroundLoad.uno:line 53
--- End of inner exception stack trace ---
at FuseTest.TestBase.OnDiagnosticReported(Diagnostic d) in C:\projects\fuselibs-public\Source\Fuse.Common\Tests\FuseTest\TestBase.uno:line 94
at FuseTest.TestBase.DispatchDiagnostic(Diagnostic d) in C:\projects\fuselibs-public\Source\Fuse.Common\Tests\FuseTest\TestBase.uno:line 85
at Fuse.Diagnostics.Report(Diagnostic d) in C:\projects\fuselibs-public\Source\build\Fuse.Common\2.0.0-beta.7\Diagnostics.uno:line 180
at Fuse.Diagnostics.UnknownException(String msg, Exception ex, Object obj, String filePath, Int32 lineNumber, String memberName) in C:\projects\fuselibs-public\Source\build\Fuse.Common\2.0.0-beta.7\Diagnostics.uno:line 301
at Fuse.Resources.ImageSource.OnError(String msg, Exception e) in C:\projects\fuselibs-public\Source\build\Fuse.Elements\2.0.0-beta.7\Resources\ImageSource.uno:line 112
at Fuse.Resources.FileImageSourceImpl.FailureCallback(Exception e) in C:\projects\fuselibs-public\Source\build\Fuse.Elements\2.0.0-beta.7\Resources\FileImageSource.uno:line 251
at Fuse.Resources.ImageBackgroundLoad.UIFailCallback() in C:\projects\fuselibs-public\Source\build\Fuse.Elements\2.0.0-beta.7\Resources\ImageBackgroundLoad.uno:line 80
at Fuse.UpdateListener.Invoke() in C:\projects\fuselibs-public\Source\build\Fuse.Common\2.0.0-beta.7\UpdateManager.uno:line 61
at Fuse.UpdateManager.ProcessOnces(Stage stage, List`1& _exceptions) in C:\projects\fuselibs-public\Source\build\Fuse.Common\2.0.0-beta.7\UpdateManager.uno:line 369
Yes, still working on it.
Lazy-load on
Image
component andImageFill
. Introduce theAutoLoad
bool property to control when we fetch the image data. The default value istrue
which means it automatically load the image data and display it whenever it rooted. Set it tofalse
to make it lazy-load and using the newLoadImage
trigger action to actually load the image. You can also change the value totrue
to load the imageAdded
LoadImage
trigger action to load image data forImage
orImageFill
Added
TargetSize
property onHttpImageSource
andFileImageSource
to resize the image resolution before display. Works on iOS and Android onlyExample:
This PR contains: