Skip to content

Migrate visibility utils to Tailwind

Paul Gascou-Vaillancourt requested to merge 456644-tailwind-visibility into master

What does this MR do and why?

Migrate visibility utils to Tailwind

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

MR sticky header
Screenshot_2024-04-18_at_11.08.05_AM

How to set up and validate locally

  1. gl-invisible

    1. Navigate to an MR.
    2. Observe that the sticky header is only visible when scrolling down.
  2. CSS-in-Js

    1. Run the following script to produce a diff for the CSS-in-Js config:
    git checkout master
    rm config/helpers/tailwind/css_in_js.js && yarn tailwindcss:build
    git add --force config/helpers/tailwind/css_in_js.js
    git checkout 456644-tailwind-visibility
    rm config/helpers/tailwind/css_in_js.js && yarn tailwindcss:build
    git diff config/helpers/tailwind/css_in_js.js
    1. This should cause the visibility-visible util to be dropped from the config. visibility-hidden is still there because it's used in GitLab UI.
    diff --git a/config/helpers/tailwind/css_in_js.js b/config/helpers/tailwind/css_in_js.js
    index 5acd7badd749..d721ba98e294 100644
    --- a/config/helpers/tailwind/css_in_js.js
    +++ b/config/helpers/tailwind/css_in_js.js
    @@ -1,5 +1,5 @@
     /**
    - * The following 640 definitions need to be migrated to Tailwind.
    + * The following 639 definitions need to be migrated to Tailwind.
      * Let's do this! 🚀
      */
     module.exports = {
    @@ -808,7 +808,6 @@ module.exports = {
       '.vertical-align-text-bottom': { 'vertical-align': 'text-bottom' },
       '.vertical-align-text-bottom\\!': { 'vertical-align': 'text-bottom !important' },
       '.visibility-hidden': { visibility: 'hidden' },
    -  '.visibility-visible': { visibility: 'visible' },
       '.z-index-0': { 'z-index': '0' },
       '.z-index-1': { 'z-index': '1' },
       '.z-index-2': { 'z-index': '2' },

Related to #456644 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports