mruby-zest / mruby-zest-build

Root repo for mruby-zest containing links to all submodules
GNU Lesser General Public License v2.1
19 stars 24 forks source link

Development branch #101

Open marahmbawwab opened 1 year ago

pgervais commented 1 year ago

Thanks. Now the code runs. I played with the new behavior: cursor movement works fine. Left and right arrows correctly move it and it's displayed in the correct place. There are a few issues though:

  1. On initial display the widget is blank. You need to insert or delete a character for anything to show. How to reproduce:

    • start the UI
    • go to part settings: the 'name' and 'comment' fields are blank. I expect them to show their initial values.
    • click in the 'name' field: a blinking cursor appears, but there is still no text.
    • press a letter key (for ex. 't'): some text appears in addition to the letter just inserted.
  2. Pressing the 'enter' key creates a new line. The solution here is to catch this keypress in onKey and simply return without doing anything.

  3. The behavior under Kits > Kit Name is incorrect. Previous behavior: all blank kit names (all of them by default) show an ellipsis (three dots: "..."). These ellipsis disappear as soon as one character is entered and reappears when all characters are deleted. New (incorrect) behavior: all kit names show "kit name" instead of an ellipsis if they're blank or their initial value otherwise. When all characters are deleted the field stays blank. This new behavior is related to the code here https://github.com/mruby-zest/mruby-zest-build/blob/a5810360f86ef7bc18825ec0f2271eb9797e9ae1/src/mruby-zest/example/TextLine.qml#L47 that is now ignored.

marahmbawwab commented 1 year ago

Thanks. Now the code runs. I played with the new behavior: cursor movement works fine. Left and right arrows correctly move it and it's displayed in the correct place. There are a few issues though:

  1. On initial display the widget is blank. You need to insert or delete a character for anything to show. How to reproduce:
  • start the UI
  • go to part settings: the 'name' and 'comment' fields are blank. I expect them to show their initial values.
  • click in the 'name' field: a blinking cursor appears, but there is still no text.
  • press a letter key (for ex. 't'): some text appears in addition to the letter just inserted.
  1. Pressing the 'enter' key creates a new line. The solution here is to catch this keypress in onKey and simply return without doing anything.
  2. The behavior under Kits > Kit Name is incorrect. Previous behavior: all blank kit names (all of them by default) show an ellipsis (three dots: "..."). These ellipsis disappear as soon as one character is entered and reappears when all characters are deleted. New (incorrect) behavior: all kit names show "kit name" instead of an ellipsis if they're blank or their initial value otherwise. When all characters are deleted the field stays blank. This new behavior is related to the code here https://github.com/mruby-zest/mruby-zest-build/blob/a5810360f86ef7bc18825ec0f2271eb9797e9ae1/src/mruby-zest/example/TextLine.qml#L47 that is now ignored. Hi @pgervais , For your comment here, the first comment the behavior is different than what you say on my side --> when I ran it the initial value displayed. Note on the second point I am trying to find where the value of which key is pressed (enter) in order to do nothing in this case. and for the third point you mean that ... should be displayed when the text_field is blank instead if nothing ?
pgervais commented 1 year ago

Answering in order:

pgervais commented 1 year ago

Sending some screenshots to illustrate points 1 and 3 I made above:

Initial display for "Part settings":

Correct display (before this PR):

partsettings-good

Incorrect display (this PR, on my machine):

partsettings-bad

Initial display for "Kits":

Correct display (before this PR):

kitname-good

Incorrect display (this PR, on my machine):

kitname-bad