These are chat archives for AvaloniaUI/Avalonia

6th
Nov 2018
ahopper
@ahopper
Nov 06 2018 07:18
uwp appears to give all key presses for multi key character input https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.characterreceived
ahopper
@ahopper
Nov 06 2018 08:09
@grokys just confirmed that moving content under a stationary mouse does cause pointerover stuff to happen in wpf
Steven Kirk
@grokys
Nov 06 2018 08:11
thanks @ahopper - yeah i thought it would
we need to implement that
is there an issue for it yet?
ahopper
@ahopper
Nov 06 2018 08:12
nope, I'll post one
Andrey Kunchev
@donandren
Nov 06 2018 08:13
@grokys pushed the submodule for the extension pr, sorry i missed it somehow :(
Steven Kirk
@grokys
Nov 06 2018 08:13
np, i've done it many times ;)
Andrey Kunchev
@donandren
Nov 06 2018 08:14
me 2, but always annoying like you make it for the first time
Steven Kirk
@grokys
Nov 06 2018 08:14
@donandren i'd be interested on your thoughts on https://github.com/grokys/devtools
should we be maybe maintaining the current one for use internally on the avalonia repository and move to :point_up: for the official one?
Andrey Kunchev
@donandren
Nov 06 2018 08:15
i can spend some time for the extension to improve completion for Static, Type etc. done this in the past if you guys need
Steven Kirk
@grokys
Nov 06 2018 08:15
improve the current one and don't use DataGrid?
@donandren that would be great!
the submodule was https://github.com/kekekeks/Avalonia.Ide right? you should probably open a PR there too
Andrey Kunchev
@donandren
Nov 06 2018 08:17
will do it in the next days when i have free time, i liked https://github.com/grokys/devtools checked out the code, i can integrate this changed without the datagrid dependency if you want, seems interesting stuff
Steven Kirk
@grokys
Nov 06 2018 08:17
yeah, i'm really not sure what the best thing to do is!
i'd like to use DataGrid because with RowDetails I think we can drill into bindings to see what's set where
Andrey Kunchev
@donandren
Nov 06 2018 08:19
yes with datagrid look much better, but datagrid need to be in the main repo or additional package it's a complicated dependency ...
Steven Kirk
@grokys
Nov 06 2018 08:20
yeah... maybe we just need to move datagrid into the main repo...
Andrey Kunchev
@donandren
Nov 06 2018 08:20
also option to investigate styles and which style has set property etc. would be cool stuff
yes moving datagrid to main repo is the best for devtools :)
Wiesław Šoltés
@wieslawsoltes
Nov 06 2018 08:24
:+1: for DataGrid in main repository
ahopper
@ahopper
Nov 06 2018 08:24
:+1: for moving datagrid, I suspect it would get more attention then
Andrey Kunchev
@donandren
Nov 06 2018 08:25
:heart: for adding datagrid to main repo
Andrey Kunchev
@donandren
Nov 06 2018 08:31
Avalonia became my favorite side project, thank you all for all the cool stuff happening here, I'm trying to convince my managers we use it more for real work. Already convinced them in the past for 2 really cool applications and it's working well so far
Jumar Macato
@jmacato
Nov 06 2018 08:31
It's getting a bit jarring switching between repos so :+1: for integrating DataGrid to main repo
@donandren im mighty curious what cool apps could those be :smile:
Andrey Kunchev
@donandren
Nov 06 2018 08:34
very challenging complex and rich UI tbh, almost using the main avalonia branch with small mods that i'm constantly making prs for integration
Jumar Macato
@jmacato
Nov 06 2018 08:34
good to know avalonia is holding up nicely :smile:
Steven Kirk
@grokys
Nov 06 2018 08:35
hmm, not sure i understand. do people think it's a good idea to move DataGrid to the main repository? :P
@sdoroff :point_up:
@donandren yes your PRs are very much appreciated! sorry i can be a bit slow getting them merged
Nikita Tsukanov
@kekekeks
Nov 06 2018 08:38
@Gillibald Please, read the docs on XIM carefully
It explicitly states that we shouldn't try to handle events filtered by XFilterEvent
If one wants to have access to all raw key presses, there won't be text input
ahopper
@ahopper
Nov 06 2018 08:46
@kekekeks but might there be a case where you want all keypresses at some higher level even if a textbox has focus, can the choice be left to the programmer or can't the events even be passed without harm
Nikita Tsukanov
@kekekeks
Nov 06 2018 08:46
Input method will show it's own window
On top of non-texbox control
Andrey Kunchev
@donandren
Nov 06 2018 08:47
@grokys @kekekeks much :heart: for your hard work on this amazing project and to all of you who contribute and support it in any way
Nikita Tsukanov
@kekekeks
Nov 06 2018 08:47
Because it will be thinking that user is typing text
We need a way to signal the system that we want text for this particular focused control
And ignore keypresses (even Tab key) if they are filtered by input method
Some "higher level" control might change the current focused control, navigate to some other page, etc
We don't know how particular input method works
We don't know which keys it needs
We only know which keys it marks as handled
Nikita Tsukanov
@kekekeks
Nov 06 2018 08:54
There are also Compose key sequences
Which may have any key configured as a part of them
ahopper
@ahopper
Nov 06 2018 08:58
Thanks for the explanation, I can see the issue but still wonder if there might be times when you want to override this despite the possible issues
ahopper
@ahopper
Nov 06 2018 09:16
say I wanted to write an app to educate western programmers on the more complex input systems and wanted to show keys pressed vs text :)
ahopper
@ahopper
Nov 06 2018 09:32
could we have a marker for filtered key presses or a separate event ?
Steven Kirk
@grokys
Nov 06 2018 09:48
@kekekeks any idea how xamarin.forms handles this?
(btw sorry if this is annoying, just trying to jump-start my understanding of the whole area)
Nikita Tsukanov
@kekekeks
Nov 06 2018 09:54
They are using native views
That do input handling for them
Their textbox (Entry) only has TextChanged and Completed events
Steven Kirk
@grokys
Nov 06 2018 10:04
ok, so again it's a case of "our textbox handles this"
Nikita Tsukanov
@kekekeks
Nov 06 2018 10:14
X11 and OSX expect applications to have a separate view/window to handle text, so there is no "who should be handling input" problem there
We have everything in one view/window
And need a way to select input mode
It's already quite troublesome to do with Cocoa
Even without "I still want to preview my events"
Steven Kirk
@grokys
Nov 06 2018 10:26
ok, thanks for the explanation!
being english i've never used any of these input methods so it's all completely new to me
Nikita Tsukanov
@kekekeks
Nov 06 2018 12:36
Also regarding text input
Our TextBox needs rework
Benedikt Stebner
@Gillibald
Nov 06 2018 12:36
Yes
Nikita Tsukanov
@kekekeks
Nov 06 2018 12:36
It's currently using very inefficient way of storing text contents
We need to implement at least a gap buffer
GtkTextBuffer uses mutable rope
John Källén
@uxmal
Nov 06 2018 12:38
Also consider piece table
Nikita Tsukanov
@kekekeks
Nov 06 2018 12:39
Piece table is hard to implement
It's really convenient for things like undo/redo
BTW, vi uses a simple list of strings
One string per row
We also need to make our FormattedText to work with a list of text spans
Instead of requiring a single string
Benedikt Stebner
@Gillibald
Nov 06 2018 13:07
We also need to make our FormattedText to work with a list of text spans
That would help a lot but as long as we recreate the layout every time something text related is changed we don't get much improvents.
Nikita Tsukanov
@kekekeks
Nov 06 2018 13:08
We should have one FormattedText per line
per paragraph, actually
That should allow to generate FormattedText instances only for on-screen text
Benedikt Stebner
@Gillibald
Nov 06 2018 13:09
Why not just leave text storage to the layout(FormattedText)?
Nikita Tsukanov
@kekekeks
Nov 06 2018 13:10
That would be inefficient for huge text files
like 10MB+
Benedikt Stebner
@Gillibald
Nov 06 2018 13:10
So you want to virtualize some parts?
Nikita Tsukanov
@kekekeks
Nov 06 2018 13:10
Yes
Not sure how to implement smooth scrolling though
Benedikt Stebner
@Gillibald
Nov 06 2018 13:16
Isn't FlowDocument doing that under WPF? Having one FormattedText per paragraph is fine the layout system should still work.
Benedikt Stebner
@Gillibald
Nov 06 2018 13:31
Having something like a text graph would help splitting text into smaller peaces that can be within a container. TextNode, ControlNode etc.
Something like this would involve a unified text layout to properly break lines etc.
Wiesław Šoltés
@wieslawsoltes
Nov 06 2018 13:51
I am getting exception when ReactiveCommand is executed Call from invalid thread, my main view model is create in program Main before avalonia App start
danwalmsley
@danwalmsley
Nov 06 2018 13:53
@wieslawsoltes do you have UseReactiveUI() in appbuilder?
Wiesław Šoltés
@wieslawsoltes
Nov 06 2018 13:57
yes
danwalmsley
@danwalmsley
Nov 06 2018 13:58
is the code on github?
Wiesław Šoltés
@wieslawsoltes
Nov 06 2018 13:59
danwalmsley
@danwalmsley
Nov 06 2018 13:59
it crashes there?
no when you execute command
any button in main window
with command
danwalmsley
@danwalmsley
Nov 06 2018 14:00
my suspicion is that you need to create your VM after avalonia is setup and UseReactiveUI is called
we had similar issue in wasabi wallet which let to
...
Wiesław Šoltés
@wieslawsoltes
Nov 06 2018 14:10
thanks that solved the issue
danwalmsley
@danwalmsley
Nov 06 2018 14:10
:)
I think its like you create a Command before RxApp.MainThread scheduler is initialized
then later on the scheduler gets reinitialized to something else
Wiesław Šoltés
@wieslawsoltes
Nov 06 2018 14:13
probably UI thread
Benedikt Stebner
@Gillibald
Nov 06 2018 14:57
But somehow selection highlighting isn't working. I guess I shouldn't call canvas.Translate but maybe you have an idea.
TextStyleSpan is apllied correctly but the highlight rectangle isn't drawn at the correct position until I select the whole text.
selection.png
Benedikt Stebner
@Gillibald
Nov 06 2018 15:04
Selection starts at index 0 with a length of 4. The rectangle has the right size but is at the wrong position.
Benedikt Stebner
@Gillibald
Nov 06 2018 15:34
Okay looks like hit testing returned wrong results in some case so my bad.
Wiesław Šoltés
@wieslawsoltes
Nov 06 2018 17:11
My progress with color picker control :smile:
ahopper
@ahopper
Nov 06 2018 18:45
Has anyone got any thoughts on my second comment in #2079 , I don't have a good enough grasp of everything to guess what is going on
Steven Kirk
@grokys
Nov 06 2018 18:54
@ahopper hmm strange - i've not seen that. sounds like a bug somewhere but not sure where
nice @wieslawsoltes !
ahopper
@ahopper
Nov 06 2018 19:04
@grokys it happens in unmodified control catalog, it is as if the visual tree is not quite valid directly after a change
Steven Kirk
@grokys
Nov 06 2018 21:54
@ahopper yep, just tried and repro'd it
yeah i think we just require an IsAttachedToVisualTree check there
the hit test goes to the scene graph to do it's stuff but it's possible that the control has been removed from the visual tree in between when the scene graph has been built and the mouse moved
Sorien
@Sorien
Nov 06 2018 21:57
hi, there was one guy that was working on native windows theme, anybody remember his name?
Sorien
@Sorien
Nov 06 2018 22:11
@Splitwirez can i find your theme anywhere?
ahopper
@ahopper
Nov 06 2018 22:14
@grokys thanks, I'd put the check there, good to know it is not a bodge, I have the basics of the pointerover content changed stuff working.
Splitwirez
@Splitwirez
Nov 06 2018 23:06
It was an Aero clone
...and I haven't exactly been maintaining it very well
(or at all, for that matter)
braca
@braca
Nov 06 2018 23:28

Hi guys, I'm trying Avalonia, I would like to run the control catalog sample in OSX Mojave.
I've followed the instructions from this page http://avaloniaui.net/contributing/build
(I have the latest stable .NET Core SDK installed)

In the last step 'dotnet run', it throws this error:
Process error CX0003: Unable to generate XML file with castxml [/Users/braca/Projects/Avalonia/src/Avalonia.Native/obj/Debug/netstandard2.0/SharpGen/SharpGen-MSBuild.xml].

Any clues?