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

Refactor navigation to community/user pages, and fixes to iOS swipe back not working properly #723

Merged
merged 3 commits into from
Sep 9, 2023

Conversation

hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Sep 8, 2023

Pull Request Description

  • Refactors some code which handles navigation to CommunityPage/UserPage
    • navigateToCommunityPage and navigateToUserPage replaces the previous functions for navigating to community/user pages by name. It is now more generic and will accept the name or the id of the community/user
  • Increased width for swipeable page route detection
  • Moved swipeable page route offset back to default for iOS, but kept it the same for Android
  • CreateCommentPage and CreatePostPage are no longer full screen swipe to go back. This fixes an issue where it is really difficult to horizontally scroll on the markdown options at the bottom of the screen

Test out the following if possible!

  • Navigating to community/user pages from all the possible places (from long press actions, tapping on usernames/communities, user and community sidebars, etc)
  • Test out comment swipe detection to see if that's been improved (hopefully should trigger accidental comment swipes less often)

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@hjiangsu hjiangsu changed the base branch from main to develop September 8, 2023 18:19
@micahmo
Copy link
Member

micahmo commented Sep 9, 2023

Let us know if this is ready for review!

@hjiangsu
Copy link
Member Author

hjiangsu commented Sep 9, 2023

@micahmo Feel free to test this out! I think its pretty much good

Copy link
Member

@micahmo micahmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Code LGTM. I tested a few scenarios and they all worked fine!

),
),
);
navigateToCommunityPage(context, communityId: communityId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need these wrapper functions any more, or could we just put navigateToCommunityPage right in the tap handler?

@hjiangsu hjiangsu marked this pull request as ready for review September 9, 2023 17:36
@hjiangsu
Copy link
Member Author

hjiangsu commented Sep 9, 2023

Alright, I'll go ahead and merge it in! Let me know if you encounter anything though 😅

@hjiangsu hjiangsu merged commit 94733a8 into develop Sep 9, 2023
@micahmo micahmo deleted the fix/swipe-back-ios branch September 10, 2023 03:04
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.

2 participants