wikipedia-ios
wikipedia-ios copied to clipboard
T351649 - add edit summaries when updating short description
Phabricator: https://phabricator.wikimedia.org/T351649
Notes
- This is my first PR to this project, so apologies for any errors!
- This PR uses the existing
summary
parameter insectionUploader.uploadWikiText(...)
to provide a default edit summary when updating an existing short description - Also copies the
summary
parameter tosectionUploader.prepend(...)
for the same purpose, when adding a new short description
Test Steps
Add flow
- Find an article without a short description
- Use the "+ Add article description" button to provide a new description
- View the edit history and see that the edit has a summary "Added short description"
Update flow
- Find an article with a short description that could be improved
- Use the Pen button > "Edit article description" to update the description
- View the edit history and see that the edit has a summary "Updated short description"
Screenshots/Videos
@philherbert Thanks for taking this on! This looks good to me so far. Whenever you're ready you can mark this PR as Ready for Review.
@tonisevener Thanks! I'll mark it as Ready for Review shortly. A few things I'm unsure about:
-
docs/localization.md
saysScripts will automatically create proper entries in qqq.json and related files.
- despite building the app and running tests etc, I haven't seen any modifications toqqq.json
, and this PR doesn't include any. Are there additional steps I need to take to get those changes generated? -
The checks on this PR seem to require XCode Cloud to run - my XCode isn't letting me connect to XCode Cloud for some reason, so I may not be able to run those checks. Are there other ways of running them?
Thank you!
@philherbert
docs/localization.md says Scripts will automatically create proper entries in qqq.json and related files. - despite building the app and running tests etc, I haven't seen any modifications to qqq.json, and this PR doesn't include any. Are there additional steps I need to take to get those changes generated?
Good catch! This is because our extract script is set up to only run on specific subdirectories, and ShortDescriptionController is one of a small set of files that resides in a subdirectory under Code. That is why historically our file structure is so flat. I made a separate Phabricator task to improve this - ideally the extract script shouldn't care about subdirectories. Feel free to tackle this as well if you want, but it's not a must for this PR.
One way around this is to move your WMFLocalizationStrings
into CommonStrings.swift, then reference the static properties from ShortDescriptionController. Once you do that, upon build you should see some automatic strings file changes in git. Please commit those and push to this PR.
The checks on this PR seem to require XCode Cloud to run - my XCode isn't letting me connect to XCode Cloud for some reason, so I may not be able to run those checks. Are there other ways of running them?
Yeah, currently our Xcode Cloud setup isn't running on forks. You can run tests locally by selecting the Wikipedia scheme and typing Cmd + U. We'll confirm on our side as well before merging.
Hi @philherbert - we have plans on adjusting this summary view soon. I can merge this PR as-is, then we will tackle feedback from https://github.com/wikimedia/wikipedia-ios/pull/4745#issuecomment-1956840513 as a part of our upcoming work. Let me know if you have objections, thanks!
Hi @tonisevener - no objections here! Sorry that I forgot to update this, it very much fell through the cracks.
Hi @tonisevener - no objections here! Sorry that I forgot to update this, it very much fell through the cracks.
No problem at all - thank you for working on it!