Skip to content

Define GlTooltips feature flag

Enrique Alcántara requested to merge 292972-rollout-gl-tooltips into master

What does this MR do?

This MR defines a feature flag that allows enabling/disabling GitLab UI tooltips across the entire application. notice: We are not supposed to define feature flags after introducing the code that uses them. In this scenario, we disabled the risky code by default using boolean client-side flag that is false by default. This Merge Request replaces that boolean flag with a proper feature flag we can enable/disable in production.

Context

This Merge Request is part of the effort to replace Bootstrap tooltips with GitLab UI tooltips in HAML/vanilla JS parts of the application. Over this year (2020), we slowly migrated all Bootstrap jQuery tooltip calls to a custom API that invokes GitLab UI tooltips. This API is hidden behind a façade that invokes either the Bootstrap tooltip API or the GitLab UI API depending on the status of a feature flag (enabled/disabled).

We did it in this way to allow replacing the jQuery API calls without introducing the user-facing changes. Now that the whole migration process is over, we will focus on enabling this new API on gitlab.com

How to test

Enable the gl_tooltips feature flag locally:

> bundle exec rails console
> Feature.enable(:gl_tooltips)

Tooltips should work as usual after the feature flag is enabled.

Screenshots (strongly suggested)

This Merge Request doesn’t contain user-facing changes.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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 to #292972 (closed)

Edited by Enrique Alcántara

Merge request reports