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

[iOS] Unification of Navigation Titles and Error Message Handling Across Multiple Views #443

Open
IvanStepanok opened this issue May 29, 2024 · 0 comments
Labels
enhancement Relates to new features or improvements to existing features

Comments

@IvanStepanok
Copy link
Contributor

We have identified repetitive implementations of navigation titles and error message handling across multiple views in our project. This redundancy makes the codebase harder to maintain and less consistent. Specifically, the navigation titles are repeatedly defined in VideoDownloadQualityView, SignUpView, SettingsView, ManageAccountView, VideoSettingsView, and VideoQualityView. Additionally, the SnackBarView(message: viewModel.errorMessage) is used across various screens for error messaging but lacks a unified implementation.

To address this, I propose creating reusable components for navigation titles and error message handling. This would involve:

Implementing a NavigationTitle component that can be reused across all views requiring a navigation title.
Implementing a SnackBarView component for consistent error message display across the application.
Refactoring the views (VideoDownloadQualityView, SignUpView, SettingsView, ManageAccountView, VideoSettingsView, VideoQualityView) to use these new components.
This unification will lead to a more maintainable and consistent codebase.

An alternative would be to continue with the current implementation, making individual changes to navigation titles and error messages as needed. However, this approach is not scalable and would result in further code duplication and inconsistencies.

I've already done similar unification in a previous pull request: PR #439, where I created ErrorAlertView and NavigationTitle components. We can reuse these components for this unification effort.

@rnr rnr added the enhancement Relates to new features or improvements to existing features label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Relates to new features or improvements to existing features
Projects
None yet
Development

No branches or pull requests

2 participants