These are chat archives for AvaloniaUI/Avalonia

6th
Jan 2017
Jeremy Koritzinsky
@jkoritzinsky
Jan 06 2017 06:21
.net standard and .net core are coming when vs 2017 releases with the stable msbuild tooling
Steven Kirk
@grokys
Jan 06 2017 12:00
@wieslawsoltes well i was searching for hours for that one, but I found it eventually and it was a simple bug in the end: #833
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:21
@grokys Yeah nice find! It fixes the first part of issue. Still this is happening https://files.gitter.im/AvaloniaUI/Avalonia/mMun/2017-01-04_22-05-18.mp4
This may be some other issue not related to the binding perhaps
Steven Kirk
@grokys
Jan 06 2017 12:22
ah ok, yeah i will take a look at that
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:23
Looks like binding is broken and not observed anymore or something
Steven Kirk
@grokys
Jan 06 2017 12:24
oh... i didn't see that
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:24
sorry I mixed probably two issues in one :)
Steven Kirk
@grokys
Jan 06 2017 12:25
in your latest video how do you get the end textboxes to be empty?
they're populated when i try
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:25
select second item in listbox
then first change Start, End tabs selection
do it few times
Steven Kirk
@grokys
Jan 06 2017 12:26
ah yes i see it
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:27
@grokys And I dont know if you did notice, but ListBox on the left displays ScrollBar when it should not, ScrollBar disappears after you add new item to ListBox
Steven Kirk
@grokys
Jan 06 2017 12:29
yeah, i did notice that - another thing to fix!
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:29
:)
Steven Kirk
@grokys
Jan 06 2017 12:29
i will add an issue
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:29
ok
Steven Kirk
@grokys
Jan 06 2017 12:30
AvaloniaUI/Avalonia#834
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 12:58
@grokys Can we merge AvaloniaUI/Avalonia#833 , tested it and LGTM
Steven Kirk
@grokys
Jan 06 2017 13:15
yeah, merge that and i'll submit another for the other problems
Steven Kirk
@grokys
Jan 06 2017 13:31
merged it myself
ok @wieslawsoltes #835 should fix the other binding problems hopefully!
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 13:39
ok will try after CI finishes
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 13:50
@grokys #835 Yes! It fixes the issue. Nice work!
Steven Kirk
@grokys
Jan 06 2017 13:50
excellent!
please feel free to merge and delete the branch ;)
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 13:50
ok
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:07
I have made quick demo of what recent fixes by @grokys now allow when using Avalonia+MVVM https://youtu.be/u_99sdF_ivI
Steven Kirk
@grokys
Jan 06 2017 14:10
i have a similar undo/redo framework
it's something we probably want in avalonia as textboxes support undo/redo
we should merge our two implementation!
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:12
yeah that would be nice
The hardest part was getting Property changes to work for me
I rely heavily in my sample app on ReactiveProperty framework
danwalmsley
@danwalmsley
Jan 06 2017 14:23
@wieslawsoltes @grokys I could also make good use of undo / redo !
@wieslawsoltes do your Linux builds still work, iv not been able to get Avalon studio to function on Linux for a while now
would like to try and investigate to get it fixed for this next release, but I struggle with debugging on Linux quite a bit, mono develop is really unstable for me
Johan Larsson
@JohanLarsson
Jan 06 2017 14:25
For undo/redo it is nice to be able to define a scope
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:25
Don't know, I did not run Linux version for some time
danwalmsley
@danwalmsley
Jan 06 2017 14:25
I get no window and a black box shows on screen, that I cant drag or resize or close :(
Johan Larsson
@JohanLarsson
Jan 06 2017 14:26
<Grid Undo.ScopeName="Edit">
    <TextBox .../>
    <TextBox .../>
<Grid>
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:27
@JohanLarsson Well I setup this in my VM using Rx so you probably can do a lot here
Johan Larsson
@JohanLarsson
Jan 06 2017 14:29
Animation.gif
Using this but it is just a prototype.
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:30
yeah this is doable in my framework
Johan Larsson
@JohanLarsson
Jan 06 2017 14:30
Nice ux when it jumps to correct cursor position. I think
Ok, nice!
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:31
I just did not think about doing such sample :)
Johan Larsson
@JohanLarsson
Jan 06 2017 14:32
Scopes are nice for validation also. Here is a thing that is past prototype but WPF.
Form validation in viewmodel only is problematic for things like cancelling navigation as illegal values may not be sent from the view.
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:34
yeah my framework is very minimal as I rely on other things to be provided from ReactiveProperty
like validation
danwalmsley
@danwalmsley
Jan 06 2017 14:37
@wieslawsoltes can you point me to an example of where you do validation on one of your textboxes?
Steven Kirk
@grokys
Jan 06 2017 14:37
@JohanLarsson what is the use-case for scopes like that? can you think of existing applications that have such scopes? to me it looks slightly confusing
also i'd prefer undo/redo to be done at the view model layer
Johan Larsson
@JohanLarsson
Jan 06 2017 14:37
IIRC excel has that kind of undo, lemme try it
Steven Kirk
@grokys
Jan 06 2017 14:38
doing it at the view layer doesn't seem right as when i've done such things i've needed to push complex changes
Johan Larsson
@JohanLarsson
Jan 06 2017 14:39
Excel does it like that, checked.
Steven Kirk
@grokys
Jan 06 2017 14:42
has separate undo scopes for individual controls? i assumed it would be at a sheet level
(not used excel in many many years)
Johan Larsson
@JohanLarsson
Jan 06 2017 14:42
yeah it is sheet level
and if there are scopes it probably makes sense to define the scope at form level
or same as navigationscope if any, dunno
Steven Kirk
@grokys
Jan 06 2017 14:43
well for me each sheet view model would have an undo manager
doing it at the view level means you can only undo/redo simple property changes
Johan Larsson
@JohanLarsson
Jan 06 2017 14:44
but in wpf there is no such thing iirc
at least not public
Steven Kirk
@grokys
Jan 06 2017 14:44
no, i had to write my own
Johan Larsson
@JohanLarsson
Jan 06 2017 14:44
ok
Steven Kirk
@grokys
Jan 06 2017 14:46
i need to upload it to GH
Johan Larsson
@JohanLarsson
Jan 06 2017 14:46
would be nice to play with
Animation.gif
Steven Kirk
@grokys
Jan 06 2017 14:47
but it allowed you to do stuff like:
            var operation = new UndoableAction(
                "Reset Surface Transform",
                () =>
                {
                    this.Surface.Rotate = oldRotate;
                    this.Surface.Scale = oldScale;
                    this.Surface.Translate = oldTranslate;
                },
                () =>
                {
                    this.Surface.Rotate = new Vector3(0, 0, 0);
                    this.Surface.Scale = new Vector3(100, 100, 1);
                    this.Surface.Translate = new Vector3(0, 0, -200);
                });

            this.UndoManager.Push(operation);
Johan Larsson
@JohanLarsson
Jan 06 2017 14:48
made a better gif that shows how cursor position indicates where the undo/redo is made
That part is perhaps hard from the viewmodel, dunno
Steven Kirk
@grokys
Jan 06 2017 14:48
yeah, i don't think mine handled that
danwalmsley
@danwalmsley
Jan 06 2017 14:48
@wieslawsoltes thanks
Johan Larsson
@JohanLarsson
Jan 06 2017 14:49
Maybe worth consideration, maybe not.
Steven Kirk
@grokys
Jan 06 2017 14:49
yeah it's a nice touch
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:53
Johan Larsson
@JohanLarsson
Jan 06 2017 14:54
you don't like screentogif?
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:54
@JohanLarsson I think this is scope idea you have mentioned ? I did this inside my VM
GIFs are slower in browser
Johan Larsson
@JohanLarsson
Jan 06 2017 14:55
Not sure it is the same, can't see that it jumps between textboxes on undo/redo
Watching it again now
Also cursor pos is a bit weird on the redos
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:57
cursor thing may be Avalonia issue ;)
anyway video demostrates undo/redo scope for line object only
the rest of hisotry is globally scoped
Johan Larsson
@JohanLarsson
Jan 06 2017 14:58
ok
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 14:58
but you could configure it in many other ways
this are modification I have made to enable this https://github.com/wieslawsoltes/ReactiveHistory/compare/scopes
Johan Larsson
@JohanLarsson
Jan 06 2017 14:59
looks like a nice api
the rest is just UI :)
this is nice because of ToReadOnlyReactiveCollection
Johan Larsson
@JohanLarsson
Jan 06 2017 15:37
Avalonia uses INotifyPropertyChangedfor updating bindings right?
Johan Larsson
@JohanLarsson
Jan 06 2017 15:44
DotNetAnalyzers/WpfAnalyzers#121
Dunno if anyone is interested
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 16:25
2017-01-06_17-24-23.gif
@grokys Not sure if we dont have related issue filled
Wiesław Šoltés
@wieslawsoltes
Jan 06 2017 16:32
Created issue AvaloniaUI/Avalonia#836
Steven Kirk
@grokys
Jan 06 2017 16:48
yeah @ncarrillo tried to fix it here AvaloniaUI/Avalonia#676 but i don't think the solution in that PR is the root of the problem
Jeremy Koritzinsky
@jkoritzinsky
Jan 06 2017 22:52
@grokys Wasn't there some issue with PeekMessage and WM_TIMER messages that the message wouldn't be removed when the timer is canceled if the message is already in the queue or something?