UNIT3D-Community-Edition icon indicating copy to clipboard operation
UNIT3D-Community-Edition copied to clipboard

[Bug] Unnecessary labels in views, "for=" attributes without ids

Open Oha-you opened this issue 4 years ago • 3 comments

Describe the bug Noticed two issues with <label> tags in views:

  1. Looks like these (automated?) changes produced unexpected results: https://github.com/HDInnovations/UNIT3D-Community-Edition/commit/1f7b8c9956961fcd69736b016d530e393adddbf0
    • Labels have been added around all inputs. They are bold by default: _custom.scss#L501
    • I think it doesn't follow any standards and makes text bold where it's not needed (see screenshots below)
  2. There are many places where label for="..." is used but inputs don't have any id= set, like edit_torrent.blade.php#L21
    • id attribute (not name) should be set in order for for= label to focus the input on click: MDN for label

To Reproduce Steps to reproduce the behavior:

  • Go to any Edit or Settings page with form inputs:
    • /users/<user>/settings
    • /dashboard/categories/1/edit
    • /dashboard/users/<user>/settings

Expected behavior

  1. Remove unnecessary labels around inputs
    • Alternatively: put one input inside one label (example), but remove global font-weight: 700 style
  2. Make sure id is set for each label with for= attribute

Screenshots 2021-04-14_014430 2021-04-14_020234

UNIT3D:

  • UNIT3D Version: 5.2.0 (latest master)
  • Laravel Version: 8.36.2
  • PHP Version: 8.0.3
  • Database Driver & Version: 8.0.23-0ubuntu0.20.04.1
  • Web Server Driver & Version: nginx/1.18.0 (Ubuntu)
  • OS Driver and Version: Ubuntu 20.04.2

Desktop:

  • OS: Ubuntu 20.04.2
  • Browser: Firefox
  • Version: 85.0

Additional context MDN quote: 2021-04-14_022925

Possible Fix? Manually check and fix all labels in views, provide a PR. I can help.

Oha-you avatar Apr 13 '21 23:04 Oha-you

Thank you for submitting your first issue. Please make sure it follows our Issue Template and you have provided all information.' first issue

github-actions[bot] avatar Apr 13 '21 23:04 github-actions[bot]

The views need some major cleanup. They were messed up by my IDE a few years back. If anyone is willing to tackle this please lmk. Otherwise I will get to it as soon as I can. However this while is a time consuming task it is pretty easy as its only formatting, hopefully someone will step up.

HDVinnie avatar Oct 26 '21 17:10 HDVinnie

This maybe will be resolved in the new UI 7-1 Pattern branch? @Roardom

HDVinnie avatar Mar 09 '22 20:03 HDVinnie