Create gitlab-experiment for combined menu [CI SKIP]
What does this MR do?
Introduces the usage of gitlab-experiment to support multi-variant experiments for #301143 (closed) and other future Category:Navigation & Settings work.
Tasks
-
Introduce minimal usage of gitlab-experiment
and associated:combined_menu
feature flag. -
Add user-based example to prove we can meet goal in issue #321904 (closed) to "Aim for the FF to be enabled only on a per-user basis till we have everything in that's needed" -
We can move the params-based override to a module or common place if we still need this behavior going forward after we are more comfortable with the experiment framework. Need to discuss with Product/Design what features they want. -
Document how to turn this on with this variant opt-in approach, by making sure the feature flag is in the :conditional
status by running the chatops command to enable the flag for any user (yourself is fine):-
/chatops run feature set --user=my-gitlab-username some_feature true
. - Or, in dev, just
Feature.enable(:some_feature)
- See
ApplicationExperiment#enabled?
for more context.
-
NOTES:
- Experiment superclass #publish method shouldn't use gon.global, this will be fixed in an MR: !55421 (merged)
- If we don't see
window.gon.experiment
defined on the client, it may be becauseGon::Base.render_data(nonce: content_security_policy_nonce)
is in the wrong order inapp/views/layouts/_head.html.haml
- If we don't see
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related Issues and MRs
Related to #321904 (closed)
Edited by Chad Woolley