mwbouwkamp-mendix / treeGraphWidgets

1 stars 1 forks source link

Issues when running widget in different language #9

Closed merijntiebie closed 3 months ago

merijntiebie commented 7 months ago

In both Mendix 9.24.3 and 10.6.1: When running the demo implementation with a user with Dutch as the user language, the following things happen in the organigram:

In Mendix 10:

mwbouwkamp-mendix commented 6 months ago

With respect to the Dutch language related issue. I cannot reproduce the behavior you are seeing. Can you please provide a step-by-step scenario to reproduce your findings?

mwbouwkamp-mendix commented 6 months ago

With respect to the issues you report in Mendix 10. I cannot reproduce the behavior you are seeing, except for the widget icon. For the other issues, can you provide a step-by-step scenario to reproduce your findings?

mwbouwkamp-mendix commented 6 months ago

As a side note: there is a scenario where the root object is not shown in the center of the screen for the OrgChart. This is the case when all its descendants are collapsed (so the root is the only node to show). This is unrelated to the Dutch language or Mendix 10.

merijntiebie commented 6 months ago

With respect to the Dutch language issue:

  1. Add Dutch as a language in your application
  2. Download the module from the app store
  3. Log in as a user with Dutch as the chosen language
  4. Open the page with the org chart example and the issues should reproduce

It seems there's an issue where in the widget code, for some equations, the display value of booleans such as showChildren is used instead of its 'value'.

With respect to the Mx 10 issues:

  1. Download the module from the app store
  2. Login and open the page with the org chart example
  3. Both the edit and delete function within the cards are not clickable

The logging issue I described earlier does not seem to be related to the usage of the widget.

I indeed also found the issue where the root object is not properly centered in the screen. This also seems to occur when the root object has only 1 descendant.

mwbouwkamp-mendix commented 3 months ago

For your initial issue, two things:

  1. If you indeed see nothing, this may have to do with the fact that there is no data yet. Don't forget to also call the ACT_Node_ResetDatabase microflow to generate some demo data.
  2. There are indeed issues with the Dutch language. Funny thing is that if you first add the language to your project and then you download the module, you get an issue. You get the editor preview that should show up in the Design mode in Mendix Studio Pro, instead of in your app. I am not sure what goes wrong there. If you remove the Dutch language, run your project and readd the Dutch language, it should work again, though.
mwbouwkamp-mendix commented 3 months ago

For your second issue: I tried to reproduce it again, but do not get this issue.

merijntiebie commented 3 months ago

Thanks for looking into it again! With respect to the language issue, I took a look at your code and it seems there are a couple of places where you check for the display value of a boolean instead of the actual value. Changing this in the js files of the widget into 'value === true' solved the issue for me.

LanguageBug_HierarchyWidget