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

[BWA-86] Debug Menu #4 #276

Merged
merged 37 commits into from
Nov 18, 2024
Merged

[BWA-86] Debug Menu #4 #276

merged 37 commits into from
Nov 18, 2024

Conversation

andrebispo5
Copy link
Contributor

@andrebispo5 andrebispo5 commented Nov 5, 2024

🎟️ Tracking

https://bitwarden.atlassian.net/browse/BWA-86

📔 Objective

Bring over the debug menu files from the main app and adjust the navigation flows.

📸 Screenshots

Screen.Recording.2024-11-06.at.12.28.16.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 86.59794% with 26 lines in your changes missing coverage. Please review.

Project coverage is 41.28%. Comparing base (5f109b5) to head (9c77f8e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ature/debugmenu/components/FeatureFlagListItems.kt 61.29% 2 Missing and 10 partials ⚠️
...eature/debugmenu/manager/DebugLaunchManagerImpl.kt 76.00% 1 Missing and 5 partials ⚠️
...r/ui/platform/feature/debugmenu/DebugMenuScreen.kt 95.45% 1 Missing and 2 partials ⚠️
...cator/ui/platform/feature/rootnav/RootNavScreen.kt 0.00% 2 Missing ⚠️
...latform/manager/DebugMenuFeatureFlagManagerImpl.kt 92.30% 0 Missing and 1 partial ⚠️
...ata/platform/repository/DebugMenuRepositoryImpl.kt 94.11% 1 Missing ⚠️
...i/platform/feature/debugmenu/DebugMenuViewModel.kt 97.05% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #276      +/-   ##
==========================================
+ Coverage   39.66%   41.28%   +1.61%     
==========================================
  Files         112      118       +6     
  Lines        5503     5697     +194     
  Branches      646      679      +33     
==========================================
+ Hits         2183     2352     +169     
- Misses       3158     3163       +5     
- Partials      162      182      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

# Conflicts:
#	app/src/main/kotlin/com/bitwarden/authenticator/data/platform/manager/di/PlatformManagerModule.kt
@andrebispo5 andrebispo5 marked this pull request as ready for review November 6, 2024 22:02
}
}

private fun handleOpenDebugMenu() {
sendEvent(MainEvent.NavigateToDebugMenu)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get a test for this event?

/**
* Default implementation of the [DebugMenuRepository]
*/
class DebugMenuRepositoryImpl(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get tests for this repo?

@OptIn(ExperimentalMaterial3Api::class)
@Suppress("LongMethod")
@Composable
fun DebugMenuScreen(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get tests for this screen?

* ViewModel for the [DebugMenuScreen]
*/
@HiltViewModel
class DebugMenuViewModel @Inject constructor(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get tests for this view model?

*/
@Suppress("UNCHECKED_CAST")
@Composable
fun <T : Any> FlagKey<T>.ListItemContent(
Copy link
Contributor

Choose a reason for hiding this comment

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

Tests for DebugMenuScreen should give us coverage of this extension.

/**
* Default implementation of the [DebugMenuLaunchManager]
*/
class DebugLaunchManagerImpl(
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing tests DebugLaunchManagerImpl.

Comment on lines +84 to +88
setupDebugMenuDestination(
onNavigateBack = {
navController.popBackStack()
},
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we cover these lines?

Copy link
Contributor

github-actions bot commented Nov 12, 2024

Logo
Checkmarx One – Scan Summary & Detailsad607bb8-800f-4949-b8b0-f4fd9145a9be

No New Or Fixed Issues Found

@andrebispo5
Copy link
Contributor Author

Sorry @SaintPatrck for some reason I totally missed the test files in the main app, I blame the IDE 😆

SaintPatrck
SaintPatrck previously approved these changes Nov 15, 2024
Base automatically changed from bwa-86/featureflag-service to main November 18, 2024 22:24
@andrebispo5 andrebispo5 dismissed SaintPatrck’s stale review November 18, 2024 22:24

The base branch was changed.

# Conflicts:
#	app/src/main/kotlin/com/bitwarden/authenticator/data/platform/manager/di/PlatformManagerModule.kt
@andrebispo5 andrebispo5 merged commit f3f51cf into main Nov 18, 2024
9 checks passed
@andrebispo5 andrebispo5 deleted the bwa-86/debug-menu branch November 18, 2024 22:39
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