==Summary of updates
Outlined below are proposed updates to the iOS edit history view to reflect proposed changes on desktop web related to IP masking work. Icons used in these designs come from T335694 and are subject to change based on updates from AHT.
==Relevant links
- [[ https://www.figma.com/file/ulUzSE2p8OGN9k2SxXBBiR/IP-Masking-on-the-native-apps?type=design&node-id=15%3A499&t=OYUb3vgXeTRq28Ad-1 | Figma file]]
- [[ https://docs.google.com/presentation/d/1CnWTI2LqSZJ0TwbSL428RY84drB6WYqQmaFeg7ky-yc/edit?pli=1#slide=id.g11aa5f56b62_0_97 | IP masking deck from AHT ]]
- [[ https://docs.google.com/presentation/d/1hGgo-q7uuxtPnFKtZx1Eu04eVAI-R7jJQyZubEKUtrE/edit#slide=id.g1ae90ff18f2_0_123 | IP Masking x Apps deck from AHT x Apps]]
==Proposed designs
|Edit history
|---
| {F37029417 width=220}
=====Design details
**In edit count area:**
- 'anon edits' string replaced with 'unregistered'
- 'anonymous' icon replaced with new 'temporary account' icon
- 'user edits' string replaced with 'logged-in'
- 'bot edits' string replaced with 'bot'
**In the list of edits and compare area:**
- For historical edits made by IP addresses: NO CHANGES
- For new edits made by unregistered / temporary accounts: update icon from 'anonymous' icon to new 'temporary account' icon and show temp account name NOT IP address
==Related affected screens
- Updates to icons for unregistered/temp accounts should also appear in the diff view / on watchlists and anywhere else an unregistered/temp account user is referenced throughout the app
==Assets
|IP masking temp account icon
|---
|{F37029372}
|{F37029374}
| from https://phabricator.wikimedia.org/T335694
==Engineering Notes
1. For the unregistered counts data, please aggregate the counts from https://{lang}.wikipedia.org/w/rest.php/v1/page/{title}/history/counts/anonymous and https://{lang}.wikipedia.org/w/rest.php/v1/page/{title}/history/counts/temporary. Currently those counts are only the number from the `anonymous` endpoint.
2. (Unrelated bug, let's fix while we're here) The "user edits" count section (to be renamed to "logged-in"), is currently powered by this endpoint: https://test.wikipedia.org/w/rest.php/v1/page/IOS/history/counts/userEdits. However, that is failing on Test Wiki. We should check and see if we have the incorrect endpoint naming here.
3. The revision cell data is currently powered by the MediaWiki revisions endpoint ([[ https://test.wikipedia.org/w/api.php?action=query&continue=&format=json&prop=revisions&rvdir=older&rvlimit=51&rvprop=ids%7Ctimestamp%7Cuser%7Csize%7Cparsedcomment%7Cflags&titles=IOS | example ]]). To determine if a revision was made by a temporary user, the object will have this `temp = ""` key:
```
{
"revid": 620790,
"parentid": 620788,
"user": "~2024-7809",
"temp": "",
"timestamp": "2024-10-24T16:29:15Z",
"size": 4592,
"parsedcomment": "Fixed typo"
}
```
And anonymous edits look like this:
```
{
"revid": 588205,
"parentid": 588171,
"user": "198.17.32.214",
"anon": "",
"timestamp": "2024-02-06T22:18:00Z",
"size": 2162,
"parsedcomment": ""
}
```
We will need to deserialize this new `temp: ""` key and check if it exists before using the correct icon. Continuing to display the `user` name value will still work as it did when displaying the IP address, since it's now populated with the temp account name.