0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-03-14 07:31:31 -05:00
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 Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
standalone [CHORE] Proper chunking for swagger 2024-08-22 15:48:05 +02:00
utils chore: add new lint rules 2024-10-23 08:10:18 +02:00
vendor Vendor jquery.are-you-sure with strict mode fixes (#26901) 2023-09-06 00:02:44 +00:00
webcomponents fix(tests): prevent frontend test dependency on system locale (#6649) 2025-01-22 03:56:36 +00:00
bootstrap.js Suppress Monaco JavaScript errors in Safari (#3805) 2024-05-18 21:07:09 +00:00
bootstrap.test.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
htmx.js Auto-update the system status in admin dashboard (#29163) 2024-02-17 23:24:31 +01:00
index.js Simplify pronouns in user settings (#6835) 2025-02-26 18:46:51 +00:00
jquery.js Forbid variables containing jQuery collections not having the $ prefix (#29839) 2024-03-20 08:46:30 +01:00
svg.js Fix incomplete Actions status aggregations (#32859) 2024-12-22 08:46:38 +01:00
svg.test.js Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
utils.js chore: add new lint rules 2024-10-23 08:10:18 +02:00
utils.test.js Update dependency happy-dom to v16 (forgejo) (#6454) 2025-01-07 11:38:58 +00:00
vitest.setup.js [BUG] Render emojis in labels in issue info popup 2024-03-30 11:18:46 +01:00