forgejo/web_src/js
mhughes9 2024031a7a Simplify pronouns in user settings (#6835)
The main change here is to use `datalist` for pronouns This supports
(see also docs[1]):

* Displaying the value already set by the user (if any), otherwise
* Presenting a list of common options to the user, and
* Allowing them to freely enter any value

This setup requires no additional JS and resolves[2].

This is different from the previous flow which used, if JS was available:

* A menu for a default 'recognised' set of pronouns, and if the user
  wanted another value:
* An extra text div if the user wanted to enter custom pronouns

Without JS enabled both the menu and the custom text div would always be
displayed.

This change means there's no longer a distinction between 'custom' and
'recognised' pronouns (this difference looks to have only been made in
code, and not in any data models).

Link: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist [1]
Link: https://codeberg.org/forgejo/forgejo/issues/6774 [2]

Co-authored-by: Matthew Hughes <matthewhughes934@gmail.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6835
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: mhughes9 <mhughes9@noreply.codeberg.org>
Co-committed-by: mhughes9 <mhughes9@noreply.codeberg.org>
2025-02-26 18:46:51 +00:00
..
components linting: fix typos, add toml validation (#7007) 2025-02-21 08:23:03 +00:00
features Simplify pronouns in user settings (#6835) 2025-02-26 18:46:51 +00:00
markup chore: Update katex import path 2024-12-18 01:17:23 +01:00
modules Fix issue/comment menus 2024-12-30 16:06:18 +01:00
render
standalone
utils
vendor
webcomponents fix(tests): prevent frontend test dependency on system locale (#6649) 2025-01-22 03:56:36 +00:00
bootstrap.js
bootstrap.test.js
htmx.js
index.js Simplify pronouns in user settings (#6835) 2025-02-26 18:46:51 +00:00
jquery.js
svg.js Fix incomplete Actions status aggregations (#32859) 2024-12-22 08:46:38 +01:00
svg.test.js
utils.js
utils.test.js Update dependency happy-dom to v16 (forgejo) (#6454) 2025-01-07 11:38:58 +00:00
vitest.setup.js