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

Access MainTabBarController through an abstraction #14062

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

staskus
Copy link
Collaborator

@staskus staskus commented Sep 27, 2024

Description

A refactoring to avoid accessing MainTabBarController directly or through static methods.

To support a sidebar on iPad, we will likely need to create a new entity that encompasses both tab bar and split view functionality. Defining a clear public interface allows us to ensure that no functionality would be missed.

Testing information

This PR doesn't change any functionality. Only defines a protocol and accesses MainTabBarController through a shared entity rather than through a static method. However, I tested navigation through deep links, home actions, and generally within the app.

Screenshots


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

- Created MainTabBarControllerProtocol
- Remove static methods
- Always call MainTabBarController incorrectly through a protocol
@staskus staskus added type: enhancement A request for an enhancement. type: technical debt Represents or solves tech debt of the project. labels Sep 27, 2024
@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A request for an enhancement. type: technical debt Represents or solves tech debt of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants