OmarEmaraDev added a comment.

Since we are still working on this diff. I will add the other form 
functionality I have been working on here as well if you don't mind.



================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:1396-1405
+  // ___<Form Name>_________________________________________________
+  // |                                                             |
+  // |                                                             |
+  // | Form elements here.                                         |
+  // |                                                             |
+  // |                            ...                              |
+  // |-------------------------------------------------------------|
----------------
clayborg wrote:
> Should we put a cancel button and "Submit" button in the window's bottom line 
> to save space? Any errors could be popped up with a modal dialog when the 
> user tries to submit. The help for a form could specify that "Esc" will 
> cancel the dialog and we wouldn't have to write it into the bottom of the 
> window.
Moving the buttons to the border seems like a good idea to me, so I will do 
that.

However, I think we should generally avoid double modals, as it is frowned upon 
in the UX world. So showing errors in a modal is probably not a good idea.  

I am currently reworking some aspects of forms to be more dynamic. The new 
forms supports full vertical scrolling, field validation, per field errors, and 
list of fields. So errors can be incorporated nicely in the new design.


================
Comment at: lldb/source/Core/IOHandlerCursesGUI.cpp:1450
+    // Draw the centered submit button.
+    const char *button_text = "[Submit]";
+    int x = (window.GetWidth() - sizeof(button_text) - 1) / 2;
----------------
clayborg wrote:
> Maybe we want to add a ButtonDelegate class and each window can add a list of 
> button delegates. Then the window draw code would know to draw them?
I guess it depends if we really need this flexibility. I can't think of a form 
that would need (or should have) more than confirmation and cancellation. Can 
you give an example where a different configuration would be needed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104395/new/

https://reviews.llvm.org/D104395

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to