Commit 111919f5 authored by Ivan Tyagov's avatar Ivan Tyagov

Shjape and dtype are NOT editable but visible in UI.

Fix.
parent f6b3945b
Pipeline #32183 failed with stage
in 0 seconds
......@@ -197,6 +197,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -219,7 +223,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
  • hi @Tyagov , this commit broke the wendelin tutorial, the part where we load data in the notbeook. I did not find out yet, why the ui test of the tutorial did not detect the breakage. Maybe it only checks if graph is displayed, but not if graph shows correct data.

  • It seems like that is indeed the reason why. In https://lab.nexedi.com/nexedi/wendelin/-/blob/master/bt5/erp5_wendelin_tutorial_ui_test/PathTemplateItem/test_page_module/test_07_wendelin_HowTo_Create_Notebook_with_Graphs.html, the last thing the test does is checking if the plot_div element is shown, but it does not check anything beyond that. From looking at the HTML of both a working graph and a broken one, it also seems that the data points are not represented in any svg template.

    Edited by Paul Graydon
Please register or sign in to reply
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -235,7 +239,7 @@
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>input_type</string> </key>
......
......@@ -195,6 +195,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -217,7 +221,7 @@
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
......@@ -233,7 +237,7 @@
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>1</int> </value>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>input_type</string> </key>
......
  • mentioned in commit 57785f50

    Toggle commit list
  • Klaus Wölfel @klaus

    mentioned in merge request !161 (merged)

    ·

    mentioned in merge request !161 (merged)

    Toggle commit list
  • @klaus , it is a real surprise how a form field editable attribute can break the tutorial. As I do not know the JS visual part at all can you please share the part of code which breaks?

    The reason for my change is that dtype and shape are NOT UI editable (it prevented ERP5 Form from saving on Data Array). So this change is good but anyway I want to investigate the broken tutorial part.

  • The problem is when accessing the array from javascript in jio: https://wendelin.nexedi.com/wendelin-HowTo.Create.Notebook.with.Graphs/WebPage_viewAsWeb wendelin.js uses the dtype and shape information it gets from jio to calculate the range request. The jio.get used in this tutorial does not return the dtype and shape if the fields are readonly. This is why they were writable but hidden. Of course this was only a workaround and a real solution must be found. One solution would be to create another hal style for accessing the array information from jio (separate api access from ui), then we do not have the risk to break it when we change the user interface.

  • Thanks, @klaus . I understand now.

  • mentioned in merge request !162 (merged)

    Toggle commit list
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment