[PR #2431] [MERGED] [PM-1351][PM-190] Add a mobile service to retrieve feature flags from API #3562

Closed
opened 2025-11-26 23:34:26 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2431
Author: @andrebispo5
Created: 3/23/2023
Status: Merged
Merged: 5/19/2023
Merged by: @andrebispo5

Base: masterHead: feature/pm-1351-get-feature-flags


📝 Commits (10+)

  • ff04ded [PM-1351] Add service to retrieve feature flags from api.
  • b4a8fda [PM-1351] Fix formating
  • fe3c04b [PM-1351] Add config cache for 10 mins during session or app restart.
  • 9eafa50 code format
  • f36a159 Merge branch 'master' into feature/pm-1351-get-feature-flags
  • d4395fb Update ConfigService.cs
  • 0ba5ff4 Merge branch 'master' into feature/pm-1351-get-feature-flags
  • 736ceb5 Merge branch 'master' into feature/pm-1351-get-feature-flags
  • 5140f56 [PM-1351] Add configs to state, only fetch state if no state or expired validation.
  • ab8b856 PR fixes

📊 Changes

18 files changed (+355 additions, -24 deletions)

View changed files

📝 src/App/App.xaml.cs (+8 -0)
📝 src/App/Pages/Accounts/EnvironmentPageViewModel.cs (+3 -1)
📝 src/App/Pages/Accounts/HomePage.xaml (+21 -5)
📝 src/App/Pages/Accounts/HomePage.xaml.cs (+10 -8)
📝 src/App/Pages/Accounts/HomePageViewModel.cs (+73 -4)
📝 src/App/Pages/Accounts/LoginPageViewModel.cs (+13 -1)
📝 src/App/Resources/AppResources.Designer.cs (+48 -3)
📝 src/App/Resources/AppResources.resx (+17 -2)
📝 src/Core/Abstractions/IApiService.cs (+1 -0)
src/Core/Abstractions/IConfigService.cs (+15 -0)
📝 src/Core/Abstractions/IStateService.cs (+2 -0)
📝 src/Core/Constants.cs (+3 -0)
📝 src/Core/Models/Data/EnvironmentUrlData.cs (+11 -0)
src/Core/Models/Response/ConfigResponse.cs (+31 -0)
📝 src/Core/Services/ApiService.cs (+10 -0)
src/Core/Services/ConfigService.cs (+77 -0)
📝 src/Core/Services/StateService.cs (+10 -0)
📝 src/Core/Utilities/ServiceContainer.cs (+2 -0)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Add a new service to consume the api endpoint /config/. This will be used to get feature flags to later be used by the UI.

Code changes

Added new ConfigService, models and new method in ApiService to fetch the data.

Screenshots

image

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2431 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 3/23/2023 **Status:** ✅ Merged **Merged:** 5/19/2023 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `master` ← **Head:** `feature/pm-1351-get-feature-flags` --- ### 📝 Commits (10+) - [`ff04ded`](https://github.com/bitwarden/android/commit/ff04ded157d69e34eb822dd62cf4be8486f7f3df) [PM-1351] Add service to retrieve feature flags from api. - [`b4a8fda`](https://github.com/bitwarden/android/commit/b4a8fdaff057658dd3a9010112f063edee7a0c92) [PM-1351] Fix formating - [`fe3c04b`](https://github.com/bitwarden/android/commit/fe3c04b4269238a12f6ceaa6b46622a2b5dfd459) [PM-1351] Add config cache for 10 mins during session or app restart. - [`9eafa50`](https://github.com/bitwarden/android/commit/9eafa503e70e3739f22926ffc462e7cb40fe7877) code format - [`f36a159`](https://github.com/bitwarden/android/commit/f36a1593560c25ad6908580a073cc0a4b1cd85ad) Merge branch 'master' into feature/pm-1351-get-feature-flags - [`d4395fb`](https://github.com/bitwarden/android/commit/d4395fb3e62fdba65555a9e42a7c3c95867a6c97) Update ConfigService.cs - [`0ba5ff4`](https://github.com/bitwarden/android/commit/0ba5ff4e75acad41472363d55ef24d63b7593dd8) Merge branch 'master' into feature/pm-1351-get-feature-flags - [`736ceb5`](https://github.com/bitwarden/android/commit/736ceb5447d68a63568ceaf2f193b947b749a421) Merge branch 'master' into feature/pm-1351-get-feature-flags - [`5140f56`](https://github.com/bitwarden/android/commit/5140f56b5fe82dd2211e016f7879c30e6817b980) [PM-1351] Add configs to state, only fetch state if no state or expired validation. - [`ab8b856`](https://github.com/bitwarden/android/commit/ab8b8567cb7b7c1c9c1661b9cb5d4aa2ec2d3c51) PR fixes ### 📊 Changes **18 files changed** (+355 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `src/App/App.xaml.cs` (+8 -0) 📝 `src/App/Pages/Accounts/EnvironmentPageViewModel.cs` (+3 -1) 📝 `src/App/Pages/Accounts/HomePage.xaml` (+21 -5) 📝 `src/App/Pages/Accounts/HomePage.xaml.cs` (+10 -8) 📝 `src/App/Pages/Accounts/HomePageViewModel.cs` (+73 -4) 📝 `src/App/Pages/Accounts/LoginPageViewModel.cs` (+13 -1) 📝 `src/App/Resources/AppResources.Designer.cs` (+48 -3) 📝 `src/App/Resources/AppResources.resx` (+17 -2) 📝 `src/Core/Abstractions/IApiService.cs` (+1 -0) ➕ `src/Core/Abstractions/IConfigService.cs` (+15 -0) 📝 `src/Core/Abstractions/IStateService.cs` (+2 -0) 📝 `src/Core/Constants.cs` (+3 -0) 📝 `src/Core/Models/Data/EnvironmentUrlData.cs` (+11 -0) ➕ `src/Core/Models/Response/ConfigResponse.cs` (+31 -0) 📝 `src/Core/Services/ApiService.cs` (+10 -0) ➕ `src/Core/Services/ConfigService.cs` (+77 -0) 📝 `src/Core/Services/StateService.cs` (+10 -0) 📝 `src/Core/Utilities/ServiceContainer.cs` (+2 -0) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Add a new service to consume the api endpoint `/config/`. This will be used to get feature flags to later be used by the UI. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> Added new ConfigService, models and new method in ApiService to fetch the data. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> <img width="817" alt="image" src="https://user-images.githubusercontent.com/4648522/227260149-dc82e3fe-98a8-4c19-9587-0740211d2497.png"> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:34:26 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3562