Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Bugs to be fixed in WinUI 3 Preview 2 #2643

Closed
anawishnoff opened this issue Jun 10, 2020 · 34 comments
Closed

Discussion: Bugs to be fixed in WinUI 3 Preview 2 #2643

anawishnoff opened this issue Jun 10, 2020 · 34 comments
Labels
discussion General discussion

Comments

@anawishnoff
Copy link
Contributor

Discussion: Bugs to be fixed in WinUI 3 Preview 2

Hi everyone!

Our team is hard at work on WinUI 3 Preview 2 and are excited to share it with you all as soon as possible. As we announced previously, Preview 2 will be a stability and quality focused release, with an emphasis on fixing bugs from Preview 1. In order to make sure that our work really focuses on our developers, I wanted to ask our community:

What are the serious and/or blocking bugs that you encountered in Preview 1?

As we work through bugs we want to make sure that we're fixing ones that will really impact your quality of life as a developer, so feel free to share any significant ones in the comments.

NOTE: Please "thumbs up" ones that you agree with/have also encountered! This makes it much easier for us to keep track.

Thanks!

@anawishnoff anawishnoff added the discussion General discussion label Jun 10, 2020
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 10, 2020
@anawishnoff anawishnoff removed the needs-triage Issue needs to be triaged by the area owners label Jun 10, 2020
@mqudsi
Copy link

mqudsi commented Jun 10, 2020

Why don't you look through the repo to see the bugs people have reported in Preview 1?

@myokeeh
Copy link

myokeeh commented Jun 10, 2020

Thorn on side: #597

@dotMorten
Copy link
Contributor

Support for System.Collections.Specialized.INotifyCollectionChanged

It's quite involved to try and rewrite your app currently to make it work, and a lot of View Models rely on observable collections to function. I gave up trying to port any current applications to WinUI, simply because significant rewrites were required. It was by far the single most biggest blocker for trying to run any existing code on WinUI.

@robloo
Copy link
Contributor

robloo commented Jun 11, 2020

System.Collections.Specialized.INotifyCollectionChanged is the biggest one that hides all the rest

@shaheedmalik
Copy link

#2236

@terrycox
Copy link

Back on March 25th, I posted this (regarding the Alpha release):

Windows UI should support at least the major MVVM frameworks- MVVM Light, Prism, and Caliburn. Unfortunately, your documented problem with changes to INotifyPropertyChanged and INotifyCollectionChanged breaking ObservableCollection certainly breaks MVVM Light, and probably the other two frameworks as well. Thought you should know.

(#1045)

If the goal is 'one UI to bind them all', you need to maintain enough compatibility that developers aren't chasing some moving target you keep shifting. How many projects do you think uses these frameworks?

@terrycox
Copy link

I'd also like to see you bring some love for WinRT back into Win UI. The Win32 support is lovely, but where did WinRT go? And why?

@MikeHillberg
Copy link
Contributor

@terrycox, what lack of WinRT love are you referring to?

@terrycox
Copy link

The Alpha documentation contained procedures and templates for updating WinRT apps to use Win UI 3. All of that disappeared in Preview 1, which had templates for Win32 apps, but no templates for UWP progs, and no mention in the documentation whatsoever.

I understand that the focus was on the new bits, Win32, and that the code didn't vanish, but it was disconcerting to see WinRT references disappear altogether.

@terrycox
Copy link

The documentation and templates in the Alpha disappeared in Preview 1. The bits were still there, but all the WinRT stuff- nope. I realize the focus was on the new stuff (Win32), but hey.

@dotMorten
Copy link
Contributor

@terrycox huh? It's not just Win32. The WinUI UWP templates are still there.

@sonnemaf
Copy link
Contributor

I have played around with Validation. It is quite instable. It crashes a lot.

I'm using an improved version of ValidationBase baseclass with an extra AllError property. Use it for a kind of 'Validation Summary' (ListView)

public class ValidationBase : INotifyPropertyChanged, INotifyDataErrorInfo {

    public event PropertyChangedEventHandler PropertyChanged;
    public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;

    protected void SetValue<T>(ref T currentValue, T newValue, [CallerMemberName] string propertyName = "") {
        if (!EqualityComparer<T>.Default.Equals(currentValue, newValue)) {
            currentValue = newValue;
            OnPropertyChanged(propertyName, newValue);
        }
    }

    readonly Dictionary<string, List<ValidationResult>> _errors = new Dictionary<string, List<ValidationResult>>();

    public bool HasErrors {
        get {
            return _errors.Any();
        }
    }
    public IEnumerable GetErrors(string propertyName) {
        return _errors[propertyName];
    }

    private void OnPropertyChanged(string propertyName, object value) {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        Validate(propertyName, value);
    }

    private void AddErrors(string propertyName, IEnumerable<ValidationResult> results) {
        if (!_errors.TryGetValue(propertyName, out List<ValidationResult> errors)) {
            errors = new List<ValidationResult>();
            _errors.Add(propertyName, errors);
        }

        errors.AddRange(results);
        ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(AllErrors)));
    }

    private void ClearErrors(string propertyName) {
        if (_errors.TryGetValue(propertyName, out List<ValidationResult> errors)) {
            errors.Clear();
            ErrorsChanged?.Invoke(this, new DataErrorsChangedEventArgs(propertyName));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(AllErrors)));
        }
    }

    public void Validate(string memberName, object value) {
        ClearErrors(memberName);
        List<ValidationResult> results = new List<ValidationResult>();
        bool result = Validator.TryValidateProperty(
                value,
                new ValidationContext(this, null, null)
                {
                    MemberName = memberName
                },
                results
                );

        if (!result) {
            AddErrors(memberName, results);
        }
    }

    public IEnumerable<ValidationResult> AllErrors => _errors.Values.SelectMany(v => v);
}
public class Employee : ValidationBase {

    private string name;
    private double _salary;

    public Employee(string name, double salary) {
        Name = name;
        Salary = salary;
    }

    [MinLength(4)]
    [MaxLength(6)]
    public string Name {
        get { return name; }
        set { SetValue(ref name, value); }
    }

    [Range(0, 10000)]
    public double Salary {
        get { return _salary; }
        set { SetValue(ref _salary, value); }
    }
}
<Page x:Class="App23.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="using:App23"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
      mc:Ignorable="d">

    <StackPanel HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Spacing="12"
                Width="300"
                Orientation="Vertical">
        <TextBox Text="{x:Bind Employee.Name, Mode=TwoWay}" />
        <NumberBox Value="{x:Bind Employee.Salary, Mode=TwoWay}" />
        <Button x:Name="myButton" Click="myButton_Click">Click Me</Button>
        <ListView ItemsSource="{x:Bind Employee.AllErrors, Mode=OneWay}" />
    </StackPanel>
</Page>

@anawishnoff
Copy link
Contributor Author

Why don't you look through the repo to see the bugs people have reported in Preview 1?

Oh we definitely are! I put this issue together so that we have an easy way of seeing peoples biggest blockers. Using an issue like this is also a tool that helps aggregate upvotes on issues, which gives us an easier view into how widespread the issue is.

@myokeeh
Copy link

myokeeh commented Jun 11, 2020

#2440

@robloo
Copy link
Contributor

robloo commented Jun 11, 2020

Thanks @anawishnoff for creating this issue. Addressing bugs has been a long standing problem with UWP and I'm glad to finally see them being addressed head-on and talked about.

A focus here will ensure WinUI 3.0 is smooth for developers to use. I look forward to trying out future previews!

@eleanorleffler
Copy link

Hi Ana,

We have been unable to get the FilePicker/FolderPicker to work, and opening files is the starting point for our application.

The sample code in the WinUI-3-Demos repository crashes after clicking "Select Folder".

For more information, I created an issue on the WinUI-3-Demos repository: Issue 3!

@cirrusone
Copy link

Webview2 is always on top of other controls so other controls with animations are hidden behind the webview2 control. I think this used to be called the 'Airspace problem'.

@eleanorleffler
Copy link

Win2D! Not that this is a bug, but it would be a much-needed addition to Preview 2, rather than waiting until later.

@harvinders
Copy link

harvinders commented Jun 14, 2020

It would be great if x:Uid could be fixed (#2602 ), both UWP and Desktop.

@lhak
Copy link

lhak commented Jun 15, 2020

Not sure if it qualifies as a bug, but can you please add header files and idl files for WRL? These are required to get win2d working (see microsoft/Win2D#707). I created them manually from the .winmd file (not sure if I did it correctly) but a lot of manual editing was required afterwards.

@eleanorleffler
Copy link

TreeView with derived TreeViewNodes crashes in WinUI3 Desktop #2699

@eleanorleffler
Copy link

DataGrid Not Displaying in WinUI3 Desktop #2703

@eleanorleffler
Copy link

Unable to Enter Text into TextBox inside ContentDialog in WinUI3 Desktop #2704

@eleanorleffler
Copy link

eleanorleffler commented Jun 19, 2020

NavigationView inside ContentDialog causes crash in WinUI3 Desktop #2713

@eleanorleffler
Copy link

Change in Appearance of AppBarButton with Flyout on CommandBar in WinUI3 Desktop #2714

@eleanorleffler
Copy link

Unable to drop files onto Grid in WinUI3 Desktop #2715

@eleanorleffler
Copy link

FileOpenPicker, FileSavePicker, and FolderPicker break in WinUI3 Desktop #2716

@eleanorleffler
Copy link

Not exactly a blocking bug, but would be nice to have the TitleBar customization back in Preview 2!

Window.SetTitleBar method is missed in WinUI/Uwp #2559

@Wigmund
Copy link

Wigmund commented Jun 22, 2020

Working ObservableCollections is a must!

@harvinders
Copy link

harvinders commented Jun 29, 2020

It would be nice to see some progress on Dispatcher too.

@eleanorleffler
Copy link

Unable to drop items from ListView onto Grid in WinUI3 Desktop #2782

@eleanorleffler
Copy link

Unable to move item (drag and drop) inside TreeView in WinUI3 Desktop #2783

@Wigmund
Copy link

Wigmund commented Jul 15, 2020

Any news on the Preview 2 release date, with working observable collections ;) ?

@Felix-Dev
Copy link
Contributor

@Wigmund Tune into today's WinUI Community Call, if possible (Preview 2 seems quite close to release by now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion General discussion
Projects
None yet
Development

No branches or pull requests