Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add article inspector mapping (part 4 of 4) #3870

Closed
wants to merge 14 commits into from
Closed

Conversation

tonisevener
Copy link
Collaborator

Fixes Phabricator ticket: https://phabricator.wikimedia.org/T270426

Do not review until #3869 is merged and this PR is updated with main.

Notes

  • This completes the Phabricator task - it is the final step that adds editor and revision information to eachCombinedSentence struct, as well as a way to generate NSAttributedStrings for each CombinedSentence.

Test Steps

  1. Set isEnabled = true in ArticleInspectorController
  2. Add a breakpoint in ArticleInspectorController at the point that self.combinedSections is assigned.
  3. Run and go to the article that is cached on the endpoint. You might need to visit https://wikiwho-ios-experiments.wmflabs.org/whocolor/{article_title} to kick off the caching. See that combinedSections are properly populated at the breakpoint with correct editor and revision information within each CombinedSentence's annotatedData property (note I also added some light unit tests that we can flesh out more fully as we run into issues).

I also added the attributed string generation method as a helper on CombinedSentence. I figure we will call this only after we have chosen a sentence (that will be done in a later Phabricator task). IMO there's no reason to generate attributed strings for every sentence if we're only going to need them for one. Because of this there's no way yet to test this method in the app - for now you can set a breakpoint in the testAttributedString unit test method to inspect those strings that are generated

@tonisevener tonisevener added Hold Dependent PR PR is dependent on another PR - merge dependent PR first and update branch before merging labels Feb 23, 2021
@tonisevener tonisevener changed the title Add article inspector mapping (part 4) Add article inspector mapping (part 4 of 4) Feb 23, 2021
@tonisevener
Copy link
Collaborator Author

Closing this for now to clean up GitHub, will reopen once we get closer to heavy development on it.

@tonisevener tonisevener deleted the T270426-4 branch November 24, 2021 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependent PR PR is dependent on another PR - merge dependent PR first and update branch before merging
2 participants