Skip to content

Update ux redirects

Marcel Amirault requested to merge update-ux-redirects into master

Why is this change being made?

This fixes the redirects file, related to the UX section changing from Engineering to Product.

Related to https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/13954, !111459 (merged), !111778 (merged)

The problem was discovered due to some redirect issues:

This MR does two major things:

  • Reverts !111778 (merged), as it wasn't the correct solution to the issue.

    The main thought was that you couldn't redirect all subdirectories at once, and each one had to be added individually. The actual problem in the original MR (below) is that it used the = operator by accident. If you want to redirect all subdirectories and files as well, you need to use the ~ operator.

  • Fixes the redirects added in !111459 (merged)

    • The main redirect section in the original MR used =, but needed ~. See: https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/redirects_on_about_gitlab_com.md#regex-

      • Before (see !111459 (comment 1109853735)):

        - sources:
          - /handbook/engineering/ux
          - /handbook/engineering/ux/
          target: /handbook/product/ux/
          comp_op: '='
      • After:

        - sources:
          - /handbook/engineering/ux/
          target: /handbook/product/ux/
          comp_op: '~'
    • In some place we updated the redirect source for older redirects. I've made some comments in the original MR, like here: !111459 (comment 1109855495)

      The issue is that we don't want to change the source, only targets. The old sources did exist originally, so they still need to be redirected to the new location.

    • In a few places we added some extra redirects using handbook/product/ux as the source, but those locations never existed before, so we shouldn't be redirecting from them. For example: !111459 (comment 1109854170)

Verify functionality

To verify the ~ redirects as expected, you can test this real world example in the redirects file (https://gitlab.com/gitlab-com/www-gitlab-com/-/blob/825ff8f3b27688507b146d7c549e6d98cbf93b8b/data/redirects.yml#L190-192):

- sources: /roles/
  target: /job-families/
  comp_op: '~'

Test this ~ redirect like this:

Author Checklist

  • Provided a concise title for this Merge Request (MR)
  • Added a description to this MR explaining the reasons for the proposed change, per say why, not just what
    • Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added.
  • Assign reviewers for this MR to the correct Directly Responsible Individual/s (DRI)
    • If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the Maintained by section on the page being edited
    • If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies
  • If the changes affect team members, or warrant an announcement in another way, please consider posting an update in #whats-happening-at-gitlab linking to this MR
    • If this is a change that directly impacts the majority of global team members, it should be a candidate for #company-fyi. Please work with internal communications and check the handbook for examples.

Edited by Marcel Amirault

Merge request reports