Skip to content

Commit

Permalink
Updated CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mysteryx93 committed Dec 30, 2023
1 parent 79fea54 commit 8ec9978
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,115 @@

All notable changes to this project will be documented in this file.

## 2.1 - 2023-12-30

This version introduces some breaking changes.

- StrongViewLocator must now have its registrations in its constructor. [See updated documentation.](https://github.com/mysteryx93/HanumanInstitute.MvvmDialogs?tab=readme-ov-file#strongviewlocator). This change was required because 2 separate instances are created: one for `MvvmDialogs` and one for `Avalonia` defined in `App.axaml`.
- Now apply picker `SuggestedStartLocation` and `SuggestedFileName`. The property names and types have been modified.
- Complete overhaul and simplification of `FileSystem` classes. `IPathInfoFactory` and `IBookmarkFileSystem` have been removed. [See new documentation here.](https://github.com/mysteryx93/HanumanInstitute.MvvmDialogs?tab=readme-ov-file#cross-platform-file-access) `DialogStorageFile` got renamed to `DesktopDialogStorageFile` and `DesktopDialogStorageFactory` is available.

Other changes:

- Dialog show calls will now be ignored in design mode to avoid errors
- Updated `CrossPlatform.Browser` to run (there are still issues with it)
- ViewLocatorBase now calls `CreateViewInstance` virtual method instead of `Activator.CreateInstance` for easier customization.

Happy New Year!! May 2024 be the best year in a while

## 2.0 - 2023-06-14

- Updated for Avalonia v11.0.0
- Changed license to MIT
- Removed AppSettings. Design was clumsy, and when it's actually needed, it doesn't work well with the modular design.
- AllowConcurrentDialogs option has been moved to the DialogManager
- Other options (in WPF) have been moved to the DialogFactory
- Avalonia.MessageBox: added an option to display message boxes as windows or popups. Option is available when configuring the DialogFactory: new DialogFactory().AddMessageBox(MessageBoxMode.Popup)

## 2.0-rc1 - 2023-06-10

- ViewModel event handling is now supported for ViewModels shown in DialogHost, FluentContentDialog and FluentTaskDialog
- DialogHost now supports mobile back button
- DialogHost can now display any type of content: ViewModel, Control, or direct content. Renamed ContentViewModel property to Content.
- Avalonia now targets .Net Standard 2.0
- Target Avalonia UI v2.0-rc1.1

## 2.0-preview7 - 2023-03-18

- Automatically set MainWindow in Avalonia when showing the first window

## 2.0-preview6 - 2023-03-06

- Async close confirmation now works properly with mobile navigation
- Added an application setting: AllowConcurrentDialogs. When False (default), it will wait for the previous dialog to close before showing the next one. If you call 3 message boxes at the same time, it will show the message boxes one after the other instead of 3 on top of each other.
- Added support for DialogHost.Avalonia popup views.
- Added support for Aura.UI message boxes for MvvmDialogs v1.4.1 as Aura.UI does not yet support Avalonia11.

## 2.0-preview5 - 2023-03-02

StrongViewLocator to register ViewModel-View combinations in a strongly-typed way to avoid the use of reflection. Useful if you want to use Assembly Trimming! Works for both desktop and mobile and selects the View accordingly.

Sample ViewLocator registration:

```
locator = new StrongViewLocator() { ForceSinglePageNavigation = false }
.Register<MainViewModel, MainView, MainWindow>()
.Register<CurrentTimeViewModel, CurrentTimeView, CurrentTimeWindow>()
.Register<ConfirmCloseViewModel, ConfirmCloseView, ConfirmCloseWindow>();
build.RegisterLazySingleton(() => (IDialogService)new DialogService(
new DialogManager(viewLocator: locator),
viewModelFactory: x => Locator.Current.GetService(x)));
```

It could be done even better. This StaticViewLocatorGenerator (usage here) could be adapted to be more generic and serve for our needs. It would use a Source Generator to generate ViewModel-View mapping at compile-time using naming standards and removing the need for reflection. If someone has experience with Source Generators, contribution is welcomed!

## 2.0-preview4 - 2023-02-22

- Fixed file dialogs filters that were broken
- Removed dependency on Reactive

## 2.0-preview3 - 2023-02-16

It now supports 'magic' mobile navigation on Android and iOS using the exact same API, allowing to convert MVVM desktop apps into mobile with very little efforts. Mobile back navigation is also automatically supported.

Documentation has been updated.

Supporting mobile navigation required extensive internal structural changes which resulted in very little changes to the API.

I believe that these are the only minor breaking changes

- The default ViewLocator now replaces ViewModel with Window on desktop and View on mobile. If you want the old standard of only replacing with View, you can easily create your ViewLocator with a single line to replace ViewModel with View.
- File/folder dialogs now return IDialogStorageFile and IDialogStorageFolder instead of string. To get the same path string you had before (on desktop), simply add .LocalPath.

Known limitations:

- Mobile views are held in a weak cache, and non-visible views should be released from memory when memory is needed. The unit test to ensure this happens does not currently pass. Contribution is welcomed to find the problem.
- Closing async cancellation does not yet work with mobile navigation

## 1.4.1 - 2022-09-03

- Renamed the new ViewLoaded/ViewClosing/ViewClosed methods to OnLoaded/OnClosing/OnClosed. Interface names remain the same.
- Fixed a crash with FluentAvalonia TaskDialog when pressing escape.
- When owner is null, it will now use the main window, or create a dummy window.

## 1.4.0 - 2022-08-29

Handling Loading, Closing and Closed events presents a few annoyances.

Loading is a common business concern. Why would you have to write code in your View for it?

Closing is generally used to display a confirmation before exit. Calling async code from the Closing event would require complex code, both in the ViewModel and the View.

Closed cannot even call a command via an XAML behavior!

As a simple solution, you can implement IViewLoaded, IViewClosing and/or IViewClosed from your ViewModel with no code required in your View.

- IViewLoaded, IViewClosing and IViewClosed interfaces have been added. See documentation.
- Owner parameters are now optional, it's up to the implementation as to whether or not it is supported
- IWindow has been renamed to IView
- Fixed a bug with Fluent TaskMessageBox

## 1.3.1 - 2022-07-01

- File dialog filters can now take extensions with or without the dot
Expand Down

0 comments on commit 8ec9978

Please sign in to comment.