mirror of
1
Fork 0
forgejo/routers/web/user
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
..
setting Simplify pronouns in user settings (#6835) 2025-02-26 18:46:51 +00:00
avatar.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
code.go feat: filepath filter for code search (#6143) 2024-12-22 12:24:29 +00:00
home.go feat(ui): welcome screen for user dashboard (#7030) 2025-02-23 08:41:31 +00:00
home_test.go chore: remove usages of `sort.Sort` (#6689) 2025-01-26 13:30:00 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
notification.go fix: don't specify FOR clause for index hint 2024-12-06 22:13:17 +01:00
package.go chore: teach `set` module about `iter.Seq` (#6676) 2025-01-24 16:45:46 +00:00
profile.go Rewrite OpenGraph Header 2025-01-01 20:43:20 +01:00
search.go Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for explore pages and fix an issue related to user search (#32288) 2024-10-27 11:27:40 +01:00
stop_watch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
task.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00