Commit 0819d56
ref(web): remove unused form field classes from sentry.web.forms.fields (#108326)
## Summary
Remove dead code from `sentry.web.forms.fields`: `ReadOnlyTextWidget`,
`ReadOnlyTextField`, and `UserField`.
## Why these are safe to delete
- **ReadOnlyTextWidget** and **ReadOnlyTextField**: Added in commit
c5f224a (Aug 2014, "Implement managed users feature") for read-only
fields on managed users. Last used in `AccountSettingsForm` in
`web/forms/accounts.py` (managed users' username/email/name). That usage
was removed in commit **90d1d243fc4** (Jul 14, 2020, "chore(frontend):
Remove unused django forms" #19873). The admin `ChangeUserForm` usage
was removed in a031b32 (Jul 2019) when the user edit page was
converted to React. No references remain in Sentry or getsentry.
- **UserField** (Django form field): Last used in `web/forms/teams.py`
in `NewAccessGroupMemberForm` (`user = UserField()`). That file was
removed in commit **8d0505ac3b8** (Jun 3, 2015, "Remove usage of
AccessGroup"), so this field has been unused for ~10 years.
The `UserField` that remains in use is the DRF serializer in
`sentry.api.fields.user` (e.g. release owner field); it is unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent d9e7760 commit 0819d56
1 file changed
+1
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 1 | + | |
6 | 2 | | |
7 | 3 | | |
8 | | - | |
9 | 4 | | |
10 | 5 | | |
11 | 6 | | |
| |||
28 | 23 | | |
29 | 24 | | |
30 | 25 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 26 | | |
73 | 27 | | |
74 | 28 | | |
| |||
0 commit comments