Closed RakshaKShetty closed 2 years ago
Good catch. We need to improve the way this widget resizes to allow for perfect alignment of input fields. Else our forms will look terrible. @momcilo-appsmith check this out
I suggest we split the width of the widget 50/50 between the label and input box when the label is on the side and not on the top.
I got a few questions. How would resizing work then? Would the split always be 50/50 between the label and input field? Wouldn't this be wasted space if the label is too small? How would this work if the label is too big?
Is this experience possible to prototype in Figma using autolayout?
Alternatively I was wondering if we can treat the input+label as a compound widget with two widgets side by side.
@areyabhishek @momcilo-appsmith another way should be to have the label on top of the input with increased default height, Hence I wanted to consider the use case while thinking about the reflow feature.
50/50 will work fine until all the fields are of the same width, Other wise the above mentioned will be repeated.
If there is a need to develop a composite widget with input and label we need to create a new widget all together.
Second @somangshu here for label placement above/below the input box since it takes up less of that valuable real estate on the canvas.
Edit: Looks neat too
@ramsaptami that ideally is a solution which is proposed multiple times but has an implementation challenge. To do this we will have to allow dynamic height inside of widgets which will be picked up as a stretch goal from the Reflow widgets epic.
Can reflow widgets and dynamic height be different issues? Dynamic height is really important, because it's impairing the quality of widgets. Meanwhile for horizontal labels, can we do something to help alignment of the labels? The label text styling is also off in comparison to our text widget, so it looks out of place.
"50/50 will work fine until all the fields are of the same width, otherwise the above mentioned will be repeated." @somangshu I think this is where the user has to worry about the design.
@areyabhishek Yes, 50/50 is possible to prototype with auto layout.
I think 50/50 or 40/60 is definitely the solution here. It will resize with the widget + it will give the user the ability to make all the inputs in the form the same size and aligned.
@momcilo-appsmith @areyabhishek should we solve for the above with a 40/60 width approach?
@momcilo-appsmith could you prototype this interaction before we build it?
@sbalaji1192 the design team has worked on a solution for the challenge above and we might be ready to go in a few days, Check out the design and discussion here. If things look good, we could take this up with the widget enhancements.
Dev Note:
cc @dilippitchika @wmdev0808
@somangshu reviewed the figma, have some doubts I have added to figma, just adding the comment screenshot here.
@momcilo-appsmith need some help with these if these are already discussed. If not, let's close this on a priority.
Items discussed - Users can control the following properties
Adding the PRD here -
Today the users have to manually align labels for the input fields they are working on. With the default settings we provide it’s hard for a user to keep aligning them manually. We wish to improve this experience by providing the user will controls for editing the label’s position, alignment and width.
Goal | Metric |
---|---|
Build forms which are visually great | User feedback on the label controls |
The following widgets need label fields:
After labels are added, Labels controls are needed for the following widgets (Type 1)
Label controls are different for checkbox and radio widgets (Type 2) will be covered in a different issue.
Requirement | User story |
---|---|
Devs can configure the position of the label to be left, top or auto. | As a developer in appsmith, I want to control the position of the label to align my forms accordingly. |
Devs can configure the alignment of the label to be left or right | As a developer in appsmith, I want to control the alignment of the label to align my forms accordingly. |
Devs can configure the width of the label in grid columns. | As a developer in appsmith, I want to control the width of the label to perfectly align forms with labels on the left. |
Positions
Alignment
Width in grid columns
Property pane design - https://www.figma.com/file/hlOcM5LasxcRqEwHPXe5lm/UI-|-Content-Property-Pane?node-id=2777%3A64824
Widget design - https://www.figma.com/file/w9CaXHF5iYcrLtiEbAHcFu?node-id=1580:9841#126493257
Responsible | |
---|---|
Accountable | |
Consulted | |
Informed |
@somangshu , According to your suggestion, I've put my estimation for this issue 15.
@somangshu Why am I assigned to this again?
@momcilo-appsmith I was tagging you for the design audit I believe, @wmdev0808 can you tell us if there is a design requirement here. Apologies for the confusion
@somangshu, The basic functionality is working as expected. The point is that almost all relevant widgets also have Label styling section named by "Styles" which includes label text color, label text size and label font style(actually label relevant style props). As far as we are adding new Label section(position, alignment, width), will we merge these properties or leave them as they are? Note: This is just my guess, @dilippitchika will finally confirm
Change - We want to support our developers adding the label width using a slider interaction than simply having to type out a number and trying to approximate. This slider type interaction will be how developers interact with the width property.
Design is pending for this and is being worked on.
@dilippitchika Just asked Emy for the component, will be updated soon.
@momcilo-appsmith @emysmth any updates here?
@somangshu We are proceeding with the input for now, as this is blocking us and we believe that the users will understand the designs.
Since we are not able to get a slider property type yet, the current suggestion is to implement arrows to increase or decrease the number.
Additional requirements In the "width" field in the label group
Support arrows to increase or decrease the "width" using clicks, similar to the number type input where the developer can only add numbers.
Support JS switch for the "width" field, which when clicked shows the input field for adding JS or number.
@somangshu , For the above additional requirements, my time estimation is 2
Hi @somangshu As we've already discussed, Having JSONForm in the release is breaking the current PR.
What should be done:
- Label tooltip feature should be reimplemented so it no longer depends on
width
andheight
props- Some additional code refactoring because all the fields from JSONForm are using the same underlying components as ones in this PR
For this, I am increasing the estimate by 2
@somangshu , I am increasing the estimate by 0.5 for fixing the failed test cases that is introduced by implementing this request at https://github.com/appsmithorg/appsmith/pull/10600#issuecomment-1081814439
@somangshu , I am adding more 2 for the estimate. It covers the work taken for fixing scrollbar issue between Release vs DP
Description
[What happened] When there are multiple input widgets with different label lengths then the input box looks miss aligned
Steps to reproduce the behaviour:
Important Details