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

MyProfile updates #58

Merged
merged 1 commit into from
May 9, 2023
Merged

Conversation

aerickson14
Copy link
Contributor

What's changed

The main change in this PR is in MyProfile. Previously it was requiring a contentView to be passed in which would contain the bulk of the profile UI, which was mostly defined in MyProfileInfoAndTweets. After seeing if I could swap the two, it became apparent why it may have been done this way since MyProfileInfoAndTweets relies on feed information and lives in the TimelineUI micro framework. Trying to simply move MyProfileInfoAndTweets into the Profile framework would not work because it would create a circular dependency.

What I was able to do instead was extract the bulk of the profile UI back into MyProfile and then optionally provide additional content that would still exist in the scrollview on my profile. That way MyProfileInfoAndTweets can call MyProfile and provide the ForYouFeedsView as its footer content as intended.

Screenshot 2023-04-14 at 2 49 18 PM

Other changes

  • Updated EditProfileView removing unused variables and some minor label changes.
  • Enabled previews in any of the views that made sense (I hope that's ok!) Although previews don't have the best reputation, and can be tricky to enable when using environment variables I think they are a super valuable way to ensure you're writing modular code.
  • Minor naming updates
  • Created convenience computed variables in ProfileInfoViewModel that help making the code in the view easier to read
  • Updated SettingsView to initially populate with the current logged in user, as well as extracted out each row/view for readability

How to test

  • After logging in, tap on the profile image in the top left as before to see the MyProfile view. It should load with basic profile information as well as any of the current user's tweets (as it did before)
  • Tapping the settings gear icon should show the updates to the Settings page
Screenshot 2023-04-14 at 2 47 08 PM
  • Navigating back to the profile and then into "Edit Profile" should load and display as it did before.
Screenshot 2023-04-14 at 2 48 08 PM

@jeroenleenarts jeroenleenarts merged commit 762b022 into GetStream:main May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants