UIXv2: Events emitted when user modifies an object are inconsistent

I am somewhat puzzled by the events that UIXv2 framework emits when a listing dashboard is showing and the user modifies a selected object using the metadata card in the same client.

To reproduce I use https://github.com/mlisowsk/UIX2.DashboardEvents

Release v0.3 has an mfappx add-on file that can be deployed to any vault running on M-Files >= 24.10 with M-Files Admin.

Case 1: Selecting one object and modifying it in the same client

  1. Navigate to a view that contains at least one object
  2. Select one object (it appears in the metadata card)
  3. Start the dashboard using the top menu “Show DashboardEvents dashboard”
  4. Change object using the metadata card and save the change

What happens:

After step 4 the following events are received both on vNext web and desktop clients:

  1. Listing.ListItemModified
  2. Listing.SelectionChanged is emitted twice with same arguments, except __updatedAt is slightly higher in the second call

Notably, no ContentChanged and no SelectedItemsChanged events are emitted.

What I expected to happen:

Based on the UIXv1 behavior and the documentation I would expect the following events to be emitted by the framework (once each):

  1. Listing.ContentChanged
  2. Listing.SelectedItemsChanged
  3. Listing.ListItemModified
  4. Listing.SelectionChanged (debatable, since only the version changed)

ContentChanged and SelectedItemsChanged events should be emitted by the UIX v2 framework, since the user did change an object that was part of the current listing, and that object also happened to be a selected object. I would also expect the SelectionChanged event to be only emitted once.

Case 2: Selecting more than one object triggers a bug

Also there appears to be a bug when selecting more than one object:

If I select more than one object in step 2, there is an uncaught exception DataCloneError in the console after the SelectionChanged event (a second SelectionChanged event is not received in that case).

Case 3: Using two client windows

It gets stranger, if I use a separate client window to modify the object (using the same user on the same machine).

What happens:

  1. vNext desktop to run dashboard, second vNext desktop client to modify object: The same DataCloneError is also triggered.
  2. vNext desktop to run dashboard, vNext web client to modify object: no events are triggered in the dashboard
  3. vNext web to run dashboard, vNext desktop to modify object: no events are triggered in the dashboard!
  4. vNext web to run dashboard, vNext web to modify object: no events are triggered in the dashboard!

What we expect to happen:

We should get the same events as described in the case 1 section, irrespective of what client is running the dashboard and which type of client is modifying objects.

Case 4: Not selecting any object

Moreover, we even receive SelectionChanged events even if we did not select any items in the first client:

  1. Open a vNext desktop client, navigate to a view
  2. Start the dashboard using the top menu “Show DashboardEvents dashboard”
  3. Observe this client’s console for messages
  4. Start a second vNext desktop client (same user, same machine), navigate to same view
  5. Modify any object on metadata card and save changes

What happens:

After step 5, the first client will receive one Listing.SelectionChanged event with shellItems object with empty members. An uncaught DataCloneError occurs.

What we expect to happen:

In this scenario we would not expect to receive any events, since the selection is and remains empty in the first client window. We expect to receive ContentChanged and ListItemModified events but these events are not received.

 

Platform:

M-Files vNext Desktop and M-Files vNext Web

M-Files 24.10.14158.3

Parents
  • Hi Martin,

    This forum is not a good place to raise bugs.  Please drop me an email with details and I can get these raised.

    Additionally I would caution making any assumptions as to the UIXv2 behaviour based upon UIXv1 behaviour.  This is a completely new (from-scratch) framework and was not designed to behave exactly the same (in many ways, as you know) as the older framework.

    Regards,

    Craig.

Reply
  • Hi Martin,

    This forum is not a good place to raise bugs.  Please drop me an email with details and I can get these raised.

    Additionally I would caution making any assumptions as to the UIXv2 behaviour based upon UIXv1 behaviour.  This is a completely new (from-scratch) framework and was not designed to behave exactly the same (in many ways, as you know) as the older framework.

    Regards,

    Craig.

Children
No Data