Skip to content

feat: ads#172

Open
AntoC-dev wants to merge 5 commits intomainfrom
feat/ads
Open

feat: ads#172
AntoC-dev wants to merge 5 commits intomainfrom
feat/ads

Conversation

@AntoC-dev
Copy link
Copy Markdown
Owner

📝 Pull Request Description

Add ads banner to seom screens where it doesn't breaks user experience or overall design of the app.

🔗 Related Issue

NA

🛠️ Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update (changes to documentation only)
  • 🔧 Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test additions or improvements
  • 🔨 Build/CI improvements
  • 🎨 UI/UX improvements

🧪 Testing

Test Coverage

  • Added unit tests for new functionality
  • Updated existing tests
  • No tests needed for this change

Manual Testing Checklist

  • Tested on Android emulator
  • Tested on physical Android device
  • Tested on iOS
  • Tested on physical iOS device

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 28, 2025

File Coverage Lines Branches
All files 86% 88% 83%
src/components/organisms/AdBanner.tsx 80% 61% 100%
src/screens/Shopping.tsx 86% 89% 83%
src/utils/AdConfig.ts 43% 29% 57%
src/utils/logger.ts 62% 100% 25%

Minimum allowed coverage is 75%

Generated by 🐒 cobertura-action against cd17c97

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 28, 2025

Reassure — 🔴 2 regressions · 🟢 0 improvements · 0 added · 0 removed

🔴 Regressions (2)

Test Baseline Current Δ%
Menu Screen Performance initial render with empty menu 1.4 ms 1.4 ms 🔴 +6.1%
Menu Screen Performance re-render after removing item from menu 1.3 ms 1.4 ms 🔴 +5.9%
Meaningless changes (119 tests across 14 components)
Test Baseline Current Δ%
BulkImportDiscovery Performance initial render during discovery with progress 22.5 ms 22.5 ms 🔴 +0.0%
BulkImportDiscovery Performance initial render in discovering phase 3.6 ms 3.5 ms 🟢 -1.4%
BulkImportDiscovery Performance initial render in parsing phase with progress 2.1 ms 2.2 ms 🔴 +1.5%
BulkImportDiscovery Performance initial render with all recipes selected 22.2 ms 22.3 ms 🔴 +0.2%
BulkImportDiscovery Performance initial render with discovery error 14.3 ms 14.3 ms 🔴 +0.2%
BulkImportDiscovery Performance initial render with large mixed list (70 fresh + 30 seen) 22.3 ms 22.2 ms 🟢 -0.5%
BulkImportDiscovery Performance initial render with large recipe list (50 fresh recipes) 22.3 ms 22.3 ms 🔴 +0.1%
BulkImportDiscovery Performance initial render with medium recipe list (30 fresh recipes) 22.4 ms 22.3 ms 🟢 -0.5%
BulkImportDiscovery Performance initial render with mixed fresh and seen recipes (30 fresh + 20 seen) 22.3 ms 22.2 ms 🟢 -0.3%
BulkImportDiscovery Performance initial render with only seen recipes (50 seen) 23.8 ms 23.8 ms 🟢 -0.1%
BulkImportDiscovery Performance initial render with small recipe list (10 fresh recipes) 22.5 ms 22.4 ms 🟢 -0.6%
BulkImportDiscovery Performance initial render with very large recipe list (100 fresh recipes) 22.3 ms 22.3 ms 🟢 -0.1%
BulkImportSettings Performance initial render with provider list 3.9 ms 3.9 ms 🟢 -0.6%
BulkImportValidation Performance initial render with large batch (15 recipes, many items) 1.8 ms 1.9 ms 🔴 +1.8%
BulkImportValidation Performance initial render with many recipes (10) to validate 1.8 ms 1.8 ms 🔴 +0.1%
BulkImportValidation Performance initial render with many unknown ingredients (25+) 1.8 ms 1.8 ms 🔴 +1.3%
BulkImportValidation Performance initial render with many unknown tags (15+) 1.8 ms 1.8 ms 🔴 +0.9%
BulkImportValidation Performance initial render with mixed known and unknown items 1.8 ms 1.8 ms 🟢 -0.6%
BulkImportValidation Performance initial render with multiple recipes (5) to validate 1.8 ms 1.8 ms 🔴 +0.0%
BulkImportValidation Performance initial render with recipes containing nutrition data 1.8 ms 1.8 ms 🔴 +1.0%
BulkImportValidation Performance initial render with recipes having similar ingredient names 1.8 ms 1.8 ms 🔴 +0.2%
BulkImportValidation Performance initial render with recipes having similar tag names 1.8 ms 1.9 ms 🔴 +3.5%
BulkImportValidation Performance initial render with single recipe to validate 1.9 ms 1.9 ms 🔴 +1.8%
Home Screen Performance - Large Dataset initial render with 1000 recipes 8.6 ms 8.7 ms 🔴 +1.0%
Home Screen Performance - Large Dataset re-render after adding recipe with 1000 recipes 11.5 ms 11.7 ms 🔴 +1.0%
Home Screen Performance - Large Dataset re-render after toggling season filter with 1000 recipes 8.5 ms 8.6 ms 🔴 +1.3%
Home Screen Performance initial render with 150 recipes 73.8 ms 73.7 ms 🟢 -0.1%
Home Screen Performance re-render after adding multiple recipes rapidly 42.1 ms 41.3 ms 🟢 -1.9%
Home Screen Performance re-render after adding recipe via hook 41.4 ms 41.4 ms 🟢 -0.1%
Home Screen Performance re-render after deleting recipe via hook 41.5 ms 41.5 ms 🔴 +0.1%
Home Screen Performance re-render after pull-to-refresh 79.3 ms 79.4 ms 🔴 +0.1%
Home Screen Performance re-render after toggling season filter off 41.4 ms 41.3 ms 🟢 -0.2%
Home Screen Performance re-render after toggling season filter on 41.4 ms 41.5 ms 🔴 +0.3%
Home Screen Performance re-render with seasonal recipes in carousel 41.5 ms 41.4 ms 🟢 -0.2%
IngredientsSettings Screen Performance - Large Dataset initial render with 1200 ingredients 29.8 ms 30.1 ms 🔴 +1.0%
IngredientsSettings Screen Performance - Large Dataset re-render after adding ingredient with 1200 ingredients 29.8 ms 29.9 ms 🔴 +0.4%
IngredientsSettings Screen Performance - Large Dataset re-render after deleting ingredient with 1200 ingredients 30.0 ms 30.4 ms 🔴 +1.3%
IngredientsSettings Screen Performance initial render 30.0 ms 29.9 ms 🟢 -0.5%
IngredientsSettings Screen Performance re-render after adding ingredient 30.0 ms 29.6 ms 🟢 -1.4%
IngredientsSettings Screen Performance re-render after adding multiple ingredients rapidly 29.8 ms 29.6 ms 🟢 -0.9%
IngredientsSettings Screen Performance re-render after deleting ingredient 29.9 ms 29.8 ms 🟢 -0.5%
IngredientsSettings Screen Performance re-render after editing ingredient 30.2 ms 29.5 ms 🟢 -2.1%
Menu Screen Performance initial render with populated menu 7.2 ms 7.4 ms 🔴 +2.2%
Menu Screen Performance re-render after adding recipe to menu 3.6 ms 3.8 ms 🔴 +3.8%
Menu Screen Performance re-render after clearing menu 1.3 ms 1.4 ms 🔴 +2.8%
Menu Screen Performance re-render after toggling cooked status 3.5 ms 3.7 ms 🔴 +3.5%
Menu Screen Performance re-render with many menu items 19.2 ms 19.2 ms 🔴 +0.1%
Menu Screen Performance re-render with mixed cooked and uncooked items 8.5 ms 8.5 ms 🔴 +0.3%
Parameters Screen Performance initial render 11.3 ms 11.4 ms 🔴 +0.7%
Parameters Screen Performance re-render after dark mode toggle via UI 21.0 ms 20.7 ms 🟢 -1.3%
Parameters Screen Performance re-render after default persons change via hook 10.7 ms 10.8 ms 🔴 +0.4%
Parameters Screen Performance re-render after scaling all recipes via hook 10.7 ms 10.9 ms 🔴 +1.9%
Parameters Screen Performance re-render after season filter toggle via UI 20.5 ms 20.5 ms 🟢 -0.0%
Recipe Screen Performance initial render in add manually mode 11.9 ms 11.9 ms 🔴 +0.0%
Recipe Screen Performance initial render in addFromPic (OCR) mode 15.3 ms 15.2 ms 🟢 -0.5%
Recipe Screen Performance initial render in addFromScrape mode with large scraped data 85.2 ms 84.3 ms 🟢 -1.0%
Recipe Screen Performance initial render in edit mode 25.8 ms 25.6 ms 🟢 -0.6%
Recipe Screen Performance initial render in read-only mode 11.0 ms 11.0 ms 🟢 -0.3%
Recipe Screen Performance re-render after adding recipe to menu 10.4 ms 10.3 ms 🟢 -0.7%
Recipe Screen Performance re-render with full nutrition data 15.2 ms 15.2 ms 🟢 -0.5%
Recipe Screen Performance re-render with recipe containing all optional fields 23.8 ms 23.5 ms 🟢 -1.2%
Recipe Screen Performance re-render with recipe having many ingredients 15.5 ms 15.3 ms 🟢 -1.2%
Recipe Screen Performance re-render with recipe having many preparation steps 13.8 ms 13.7 ms 🟢 -0.8%
RecipeSelectionCard Performance Batch Rendering (List Simulation) 10 fresh cards initial render 18.8 ms 19.0 ms 🔴 +0.9%
RecipeSelectionCard Performance Batch Rendering (List Simulation) 10 seen cards initial render 20.5 ms 20.8 ms 🔴 +1.1%
RecipeSelectionCard Performance Batch Rendering (List Simulation) 100 cards with multiple selections 447.0 ms 444.6 ms 🟢 -0.5%
RecipeSelectionCard Performance Batch Rendering (List Simulation) 100 fresh cards initial render 120.0 ms 121.8 ms 🔴 +1.5%
RecipeSelectionCard Performance Batch Rendering (List Simulation) 50 cards with selection toggle 114.3 ms 113.5 ms 🟢 -0.7%
RecipeSelectionCard Performance Batch Rendering (List Simulation) 50 fresh cards initial render 59.8 ms 60.4 ms 🔴 +1.1%
RecipeSelectionCard Performance Initial Render selected fresh recipe 2.5 ms 2.5 ms 🔴 +1.2%
RecipeSelectionCard Performance Initial Render selected seen recipe (with badge) 2.6 ms 2.7 ms 🔴 +1.8%
RecipeSelectionCard Performance Initial Render unselected fresh recipe 2.5 ms 2.6 ms 🔴 +2.2%
RecipeSelectionCard Performance Initial Render unselected seen recipe (with badge) 2.6 ms 2.7 ms 🔴 +2.4%
RecipeSelectionCard Performance Re-render on Selection Toggle toggle selection on seen recipe 4.6 ms 4.9 ms 🔴 +4.7%
RecipeSelectionCard Performance Re-render on Selection Toggle toggle selection via card press 4.3 ms 4.4 ms 🔴 +1.2%
RecipeSelectionCard Performance Re-render on Selection Toggle toggle selection via checkbox press 4.3 ms 4.4 ms 🔴 +1.3%
Search Screen Performance - Large Dataset initial render with 1000 recipes 37.6 ms 37.8 ms 🔴 +0.4%
Search Screen Performance - Large Dataset re-render after adding recipe with 1000 recipes 41.9 ms 42.1 ms 🔴 +0.4%
Search Screen Performance - Large Dataset re-render after search text change with 1000 recipes 43.9 ms 44.5 ms 🔴 +1.5%
Search Screen Performance initial render with 150 recipes 65.2 ms 64.4 ms 🟢 -1.2%
Search Screen Performance re-render after adding recipe via hook 46.5 ms 34.3 ms 🟢 -26.1%
Search Screen Performance re-render after clearing search 56.1 ms 55.2 ms 🟢 -1.6%
Search Screen Performance re-render after deleting recipe via hook 34.5 ms 34.3 ms 🟢 -0.7%
Search Screen Performance re-render after editing recipe via hook 34.5 ms 34.4 ms 🟢 -0.2%
Search Screen Performance re-render after opening filter mode via UI 83.8 ms 83.5 ms 🟢 -0.4%
Search Screen Performance re-render after rapid search text changes 74.3 ms 75.7 ms 🔴 +1.9%
Search Screen Performance re-render after removing filter via UI 166.4 ms 171.4 ms 🔴 +3.0%
Search Screen Performance re-render after search text change 37.4 ms 38.0 ms 🔴 +1.6%
Search Screen Performance re-render after selecting filter via UI 125.0 ms 127.8 ms 🔴 +2.2%
Search Screen Performance re-render with combined search and filter 60.7 ms 62.4 ms 🔴 +2.8%
Search Screen Performance re-render with long fuzzy search query 44.2 ms 44.3 ms 🔴 +0.2%
Search Screen Performance re-render with multiple filters from different categories 148.2 ms 153.6 ms 🔴 +3.6%
Shopping Screen Performance initial render with empty shopping list 2.7 ms 2.7 ms 🟢 -0.1%
Shopping Screen Performance initial render with populated shopping list 12.2 ms 12.4 ms 🔴 +2.0%
Shopping Screen Performance re-render after adding recipe to menu 12.0 ms 12.2 ms 🔴 +1.8%
Shopping Screen Performance re-render after clearing purchased states 11.9 ms 12.2 ms 🔴 +1.7%
Shopping Screen Performance re-render after deleting recipe that was in shopping list 2.7 ms 2.7 ms 🟢 -0.8%
Shopping Screen Performance re-render after pressing clear button via UI 11.9 ms 12.2 ms 🔴 +2.4%
Shopping Screen Performance re-render after toggling purchase status 11.8 ms 12.2 ms 🔴 +2.8%
Shopping Screen Performance re-render with many items from multiple recipes 15.5 ms 15.6 ms 🔴 +1.0%
TagsSettings Screen Performance initial render 22.3 ms 22.6 ms 🔴 +1.1%
TagsSettings Screen Performance re-render after adding multiple tags rapidly 22.1 ms 22.1 ms 🟢 -0.1%
TagsSettings Screen Performance re-render after adding tag 22.4 ms 22.2 ms 🟢 -0.8%
TagsSettings Screen Performance re-render after deleting tag 22.3 ms 22.3 ms 🟢 -0.3%
TagsSettings Screen Performance re-render after editing tag 22.4 ms 22.6 ms 🔴 +0.5%
ValidationQueue Performance initial render with ingredients similar to existing 2.9 ms 3.0 ms 🔴 +2.1%
ValidationQueue Performance initial render with large ingredient queue from scraping 2.9 ms 3.0 ms 🔴 +1.2%
ValidationQueue Performance initial render with multiple ingredients to validate 2.9 ms 3.0 ms 🔴 +1.5%
ValidationQueue Performance initial render with multiple tags to validate 2.9 ms 2.9 ms 🔴 +1.2%
ValidationQueue Performance initial render with single ingredient to validate 2.9 ms 3.0 ms 🔴 +1.8%
ValidationQueue Performance initial render with single tag to validate 3.0 ms 3.0 ms 🟢 -0.1%
ValidationQueue Performance initial render with tags similar to existing 2.9 ms 2.9 ms 🔴 +1.7%
ValidationReviewList Performance initial render with ingredients only (20 ingredients) 86.0 ms 86.1 ms 🔴 +0.2%
ValidationReviewList Performance initial render with items having similar matches (10 tags, 10 ingredients) 43.6 ms 43.5 ms 🟢 -0.2%
ValidationReviewList Performance initial render with large list (30 tags, 20 ingredients) 107.3 ms 107.5 ms 🔴 +0.1%
ValidationReviewList Performance initial render with medium list (15 tags, 10 ingredients) 64.9 ms 65.2 ms 🔴 +0.5%
ValidationReviewList Performance initial render with mixed known and unknown items (10 similar + 10 unknown tags) 67.1 ms 67.1 ms 🔴 +0.0%
ValidationReviewList Performance initial render with small list (5 tags, 5 ingredients) 41.5 ms 41.3 ms 🟢 -0.5%
ValidationReviewList Performance initial render with tags only (20 tags) 38.3 ms 37.9 ms 🟢 -0.9%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 28, 2025

🧪 CI Test Results Summary

🧩 Unit Tests

3145 passed, 16 skipped

#### 📱 E2E Tests (Android + iOS)

154 passed, 22 failed

Test failures:
  1 - Onboarding Tutorial Flow: 1 - Onboarding Tutorial Flow
  2 - Bottom Tabs Navigation Flow: 2 - Bottom Tabs Navigation Flow
  3 - FAB Menu Toggle Flow: 3 - FAB Menu Toggle Flow
  1 - Duplicate Tag Unique Detection Flow: 1 - Duplicate Tag Unique Detection Flow
  2 - Duplicate Tag Fuzzy Detection Flow: 2 - Duplicate Tag Fuzzy Detection Flow
  3 - Duplicate Tag Exact Prevention Flow: 3 - Duplicate Tag Exact Prevention Flow
  4 - Tag Real-Time Validation Flow: 4 - Tag Real-Time Validation Flow
  5 - Tag Edit Same Name Flow: 5 - Tag Edit Same Name Flow
  6 - Tag Pick From Database Flow: 6 - Tag Pick From Database Flow
  1 - Full Performance Flow: 1 - Full Performance Flow
  1 - Manual Recipe Creation Complete Flow: 1 - Manual Recipe Creation Complete Flow
  1 - Add Single Recipe To Shopping Flow: 1 - Add Single Recipe To Shopping Flow
  2 - Add Multiple Recipes To Shopping Flow: 2 - Add Multiple Recipes To Shopping Flow
  3 - Delete Recipe From Shopping Flow: 3 - Delete Recipe From Shopping Flow
  4 - Duplicate Recipe Ingredients Detection Flow: 4 - Duplicate Recipe Ingredients Detection Flow
  5 - Duplicate Recipe Confirm Flow: 5 - Duplicate Recipe Confirm Flow
  3 - OCR Quitoque V3 Camera Flow: 3 - OCR Quitoque V3 Camera Flow
  4 - OCR Quitoque V2 French Flow: 4 - OCR Quitoque V2 French Flow
  1 - Recipe Read-Only From Search Flow: 1 - Recipe Read-Only From Search Flow
  1 - Search Bar Open/Close Flow: 1 - Search Bar Open/Close Flow
  5 - Search Backspace Correction Flow: 5 - Search Backspace Correction Flow
  6 - Language Switch Flow: 6 - Language Switch Flow
This test report was produced by the test-summary action.  Made with ❤️ in Cambridge.
_📊 Coverage for changed files is posted in a separate comment. View merged logs in the Actions tab._

@AntoC-dev AntoC-dev force-pushed the feat/ads branch 4 times, most recently from b5e7aca to c9bdd68 Compare December 29, 2025 14:31
@AntoC-dev AntoC-dev force-pushed the feat/ads branch 8 times, most recently from e935e8d to 11e09e8 Compare May 1, 2026 07:35
@AntoC-dev AntoC-dev force-pushed the feat/ads branch 2 times, most recently from ca8cd35 to 3c22328 Compare May 6, 2026 18:44
AntoC-dev added 5 commits May 7, 2026 15:25
Add support for Google Mobile Ads SDK, including initialization and GDPR
consent flow. Update the app to display adaptive banner ads in the Menu
and Shopping screens. Introduce reusable AdBanner component and AdConfig
utility for centralized ad management.

- Initialize Mobile Ads SDK and GDPR consent in App.tsx
- Add react-native-google-mobile-ads to dependencies
- Implement AdBanner component with adaptive banner ads
- Add logging for ad-related operations
- Update Menu and Shopping screens to include ads

BREAKING CHANGE: App now displays banner ads on Menu and Shopping screens.
- Create `react-native-google-mobile-ads-mock` for testing ad-related behaviors.
- Add `AdBanner` tests to validate rendering, props handling, and environment-based behavior.
- Introduce `AdBanner-mock` for mocking `AdBanner` in tests.
- Update Jest config to include `react-native-google-mobile-ads` mock mapping.

test(ads): add e2e asserts for AdBanner visibility on screens

- Verify AdBanner visibility on Menu, Shopping, and Home screens.
- Ensure AdBanner is displayed even when specific views (e.g., ScrollView) are not visible.

test(ads): add unit tests for AdBanner visibility across screens

- Verify AdBanner behavior on Menu, Shopping, and Home screens.
- Ensure AdBanner rendering respects environment-based settings.
- Preserve `process.env.NODE_ENV` across tests to avoid side effects.
- Document production build requirements for AdMob environment variables in CONTRIBUTING.md.
- Update README.md to include Google AdMob integration details and GDPR consent management.
- Revise privacy-policy.md to outline data collection by AdMob and provide GDPR compliance information.
Button was overlapping the banner. AdBanner now exposes
onHeightChange via onLayout so consumers can offset
absolutely-positioned UI without magic values.
isMountRequested and subscribeMount were removed from PyodideBridgeImpl
during the bridge refactor. runtimeMount.ios.ts now tracks mount state
locally, consistent with the non-iOS implementation.
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.

1 participant