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

Introduce feature flags #1092

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open

Introduce feature flags #1092

wants to merge 22 commits into from

Conversation

Process-ing
Copy link
Contributor

@Process-ing Process-ing commented Jan 20, 2024

Closes #872
I included some example flags to clarify the normal use-case, they should be removed later when real feature flags are to be included

Workflow

  1. Add the feature flag info inside featureFlagTable
  2. Retrieve the feature flag to the UI component, using featureFlagController.getFeatureFlag(<code>) and save it in a static field (if you receive the error Null check operator used on a null value, it probably means the feature flag code is mismatched)
  3. Wrap the experimental components inside ExperimentalFeatureWrapper, and associate the latter to the feature flag
  4. Toggle the feature flags in the app settings to see the results

Review checklist

  • Terms and conditions reflect the current change
  • Contains enough appropriate tests
  • If aimed at production, writes a new summary in whatsnew/whatsnew-pt-PT
  • Properly adds an entry in changelog.md with the change
  • If PR includes UI updates/additions, its description has screenshots
  • Behavior is as expected
  • Clean, well-structured code

@Process-ing Process-ing requested a review from a team January 20, 2024 14:20
@Process-ing Process-ing force-pushed the feature/feature-flags branch from 7ef2024 to 7839ca9 Compare January 20, 2024 14:21
Copy link

codecov bot commented Jan 20, 2024

Codecov Report

Attention: Patch coverage is 1.92308% with 153 lines in your changes missing coverage. Please review.

Project coverage is 11%. Comparing base (4259069) to head (07a3d04).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #1092    +/-   ##
========================================
- Coverage       12%     11%    -0%     
========================================
  Files          266     275     +9     
  Lines         7201    7347   +146     
========================================
+ Hits           803     806     +3     
- Misses        6398    6541   +143     

@Process-ing Process-ing changed the title Feature/feature flags Introduce feature flags Jan 20, 2024
Copy link
Member

@LuisDuarte1 LuisDuarte1 left a comment

Choose a reason for hiding this comment

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

Could you add "group" feature flags? For instance, the feature flag new-redesign will activate/deactivate many feature flags like: courses-page, and schedule-page. To make feature flags easier to interact with.

@Process-ing Process-ing force-pushed the feature/feature-flags branch 2 times, most recently from 751733d to 73be404 Compare August 21, 2024 22:24
@Process-ing Process-ing requested review from a team and LuisDuarte1 August 21, 2024 22:36
@Process-ing Process-ing force-pushed the feature/feature-flags branch from 73be404 to 2c52f36 Compare October 1, 2024 21:43
@Process-ing Process-ing removed the request for review from bdmendes October 2, 2024 07:00
@Process-ing Process-ing dismissed stale reviews from LuisDuarte1 and bdmendes October 2, 2024 07:00

Resolved

@Process-ing Process-ing removed the request for review from LuisDuarte1 October 2, 2024 07:01
@Process-ing Process-ing force-pushed the feature/feature-flags branch 2 times, most recently from 2164944 to 007bbe3 Compare October 25, 2024 11:33
@Process-ing Process-ing enabled auto-merge October 26, 2024 20:33
@Process-ing Process-ing force-pushed the feature/feature-flags branch from 007bbe3 to 07a3d04 Compare October 29, 2024 10:04
@Process-ing Process-ing force-pushed the feature/feature-flags branch from 07a3d04 to 706db83 Compare November 11, 2024 17:03
limwa
limwa previously requested changes Nov 12, 2024
Copy link
Member

@limwa limwa left a comment

Choose a reason for hiding this comment

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

Since we're now turning towards a more testable approach to uni, do you think you can remove the static modifier from the methods and use Provider.value() to deliver the FeatureFlagsController to wherever it is needed?

@Process-ing Process-ing force-pushed the feature/feature-flags branch from 706db83 to b4b0703 Compare January 18, 2025 13:08
@Process-ing Process-ing requested a review from a team January 19, 2025 12:51
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.

Introduce feature flags
4 participants