Problem/Motivation
Claro: Views row weight should be a select list
Steps to reproduce
1. Go to any view page, admin/structure/views/view/articles_aside
2. Rearrange filter or sort criteria.
3. Now you can see the weight field is input type text.
Before Patch

Proposed resolution
Row weight field in views should be a select list.
Remaining tasks
User interface changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot from 2023-07-26 16-34-14.png | 37.4 KB | kostyashupenko |
| #2 | 3376372-2.patch | 1.42 KB | gauravvvv |
| Screenshot 2023-07-23 at 2.57.08 PM.png | 153.41 KB | gauravvvv |
Issue fork drupal-3376372
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
gauravvvv commentedI have changed the textfield for weight to select list, attached patch for same. please review thanks
Comment #3
smustgrave commentedCan we add a simple assertion to check if it's a select list.
Comment #4
kostyashupenkoPatch is working
Comment #5
lauriiiWhat happens if someone has set arbitrary numerical values for the weight using the textfield? Wouldn't that break when we change to a select?
Comment #6
smustgrave commentedMoving to NW as the tests tag was removed without adding anything
Comment #7
gauravvvv commentedHi @lauriii, if we input an arbitrary numerical value in the weight using a text field, it automatically adjusts to the closest available value. For example, if we enter 15.2, it will change to 15, or to the next available value if any are present before 15.