ListoGram Demo and Improve UI Testing Infrastructure
Changes in this pull request
This PR adds a new "ListoGram" demo to the IGListKit example app, showcasing how to implement a social media feed with IGListKit. The demo features infinite scrolling with pagination, post deletion, and interactive elements. Also, I've improved the UI testing infrastructure by adding helper methods for more reliable tests across different device types. The new helpers make the tests more resilient when dealing with iPad split views and ensure elements are properly visible before interacting with them.
Checklist
- [X] All tests pass. Demo project builds and runs.
- [X] I added tests, an experiment, or detailed why my change isn't tested.
- [X] I added an entry to the
CHANGELOG.mdfor any breaking changes, enhancements, or bug fixes. - [x] I have reviewed the contributing guide
Hi there @abhyas01! Thanks for an amazing PR! I've been playing with it in the Simulator and it really does feel like IG's feed!
A couple of things I'd like to ask before we merge it in.
- I get the intent with the name ListoGram, but I feel like it's potentially confusing compared to the names of the other demo view controllers. I saw in the commit history, you were calling it
FeedViewControllerat one point. Would you be okay with renaming it to that? - It looks like a few of the files were imported into the Xcode project as aliases, which is causing the CI to fail (Danger might be failing for other reasons. I need to look into that). Can you please go back and make sure everything is imported not as groups or aliases?
Thanks so much!
Hi there @abhyas01! Thanks for an amazing PR! I've been playing with it in the Simulator and it really does feel like IG's feed!
A couple of things I'd like to ask before we merge it in.
- I get the intent with the name ListoGram, but I feel like it's potentially confusing compared to the names of the other demo view controllers. I saw in the commit history, you were calling it
FeedViewControllerat one point. Would you be okay with renaming it to that?- It looks like a few of the files were imported into the Xcode project as aliases, which is causing the CI to fail (Danger might be failing for other reasons. I need to look into that). Can you please go back and make sure everything is imported not as groups or aliases?
Thanks so much!
Hi there! Thanks so much for the kind words. I'm really glad to hear it’s working well in the Simulator!
Absolutely, I'm happy to rename ListoGramViewController back to FeedViewController for consistency with the other demos. That makes total sense.
Also, regarding the file import issue: I double-checked the project setup, and all files appear to be correctly added with relative paths, not as aliases or folder references. I also verified by cloning the repo cleanly and confirming everything builds and runs locally. That said, I’ll go ahead and re-add the affected files using the recommended Xcode import options (copy if needed, add to targets, create groups) just to be completely safe and ensure CI passes.
Thanks again, and I’ll push up those changes shortly!
Cool! Thanks so much for that!
I think it's namely this folder. It was imported as a group instead of a reference (Denoted by it being blue instead of grey)
There's also some SwiftLint validation errors (Which highlighted to me that the CI is broken. 😅), but I can fix that on my end. :)
Cool! Thanks so much for that!
I think it's namely this folder. It was imported as a group instead of a reference (Denoted by it being blue instead of grey)
There's also some SwiftLint validation errors (Which highlighted to me that the CI is broken. 😅), but I can fix that on my end. :)
Thanks so much for the follow-up and for pointing that out!
I've gone ahead and renamed ListoGramViewController to FeedViewController as discussed, and I made sure the folder structure is now using proper references, no more blue folders! Everything should be correctly linked as expected now.
Appreciate the heads-up on the SwiftLint warnings too. Let me know if you'd prefer me to clean any of those up, or if it's easier for you to take care of it on your end.
Thanks again for the review and support; really excited to contribute! 😊
Do let me know if this causes the CI to again crash, and it needs further changes from my end. Feel free to let me know if my edit requires.
@TimOliver has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@TimOliver merged this pull request in Instagram/IGListKit@01bd505d8b89b55fc3938fc5ce4a9f57a7a92f81.
There's also some SwiftLint validation errors (Which highlighted to me that the CI is broken. 😅), but I can fix that on my end. :)