Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

Warning labels for "not stable yet" features in ControlCatalog

Open Splitwirez opened this issue 1 year ago • 6 comments

What does the pull request do?

Adds warning labels to tabs in ControlCatalog which pertain to features which aren't adequately stable as of yet.

The idea came to me after cloning master, firing up ControlCatalog.NetCore, and finding that selecting the "Native Embed" tab caused the whole program to just...exit. Weird crash, but ok.

It occurred to me that, for those evaluating Avalonia for the first time, features inexplicably causing such weird app crashes could be a really bad look, given there was absolutely nothing signalling that the features in question were still being worked on (thus don't represent the level of stability which should be expected of Avalonia's stable feature set). With this in mind, I figured that maybe a little warning marker could to help manage their expectations around such features accordingly.

What is the current behavior?

image

What is the updated/expected behavior with this PR?

image

How was the solution implemented (if it's not obvious)?

I added the warning label icon as part of a new DataTemplate, added to the HamburgerMenu in MainView.xaml. It can be added to any TabItem in the HamburgerMenu as necessary going forward, by simply adding "warning" to the item's Classes. Figured that would ensure the label could be easily applied wherever it may be needed in the future, as existing features become more stable and work on new features begins with the passing of time.

Splitwirez avatar Aug 18 '22 16:08 Splitwirez

You can test this PR using the following package version. 0.10.999-cibuild0023282-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]

avaloniaui-team avatar Aug 18 '22 16:08 avaloniaui-team

While it's a nice addition in here, why NativeControlHost? It is stable now. What kind of a problem do you have with it?

maxkatz6 avatar Aug 19 '22 09:08 maxkatz6

While it's a nice addition in here, why NativeControlHost? It is stable now. What kind of a problem do you have with it?

@maxkatz6 As mentioned in OP, selecting that tab caused the sample app to abruptly exit. Oddly, I tried it again just now, and it no longer happened. I am...quite confused now...

EDIT: Also, how to I convert this to a draft PR? It appears I messed something up... image

Splitwirez avatar Aug 22 '22 14:08 Splitwirez

Converted to draft.

grokys avatar Aug 29 '22 19:08 grokys

Converted to draft.

Okay, fixed the bug I mentioned.

Splitwirez avatar Aug 30 '22 17:08 Splitwirez

You can test this PR using the following package version. 11.0.999-cibuild0023497-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]

avaloniaui-team avatar Aug 30 '22 18:08 avaloniaui-team

It should be reopened, when we will have experimental/unstable pages in the control catalog. Though even then control catalog isn't exactly public application.

maxkatz6 avatar Oct 31 '22 05:10 maxkatz6