Skip to content

Remove truncate function when flattening the tree

Jérémie Bresson requested to merge jmini/gitlab:issue-369534 into master

What does this MR do and why?

Remove truncate function when flattening the tree, because the UI components used to display tree nodes is already shortening long paths: https://gitlab-org.gitlab.io/gitlab-ui/?path=/docs/utilities-truncate--docs

With an appropriate tooltip that displays the original value.

Fixes #369534 (closed)

Screenshots or screen recordings

Before After
Screenshot_large New_large
Screenshot_small New_small

To observe the current behavior, you can go to this MR: jmini/test_project!16 (diffs)

How to set up and validate locally

  1. In a repo, on a feature branch patch-1 create several files with dummy content:
    • a/foo/b/bar/c/baz/d/lorem/ipsum/file.txt
    • a_foo_long_long_long_long_folder/b_bar_long_long_long_folder/c_lorem_ipsum_folder/file.txt
    • a_long_folder_name/a_sub_folder_long_name/file.txt
  2. Create a MR for this branch patch-1 targeting the main branch
  3. On the "Changes" tab in the merge-request UI observe the file tree (change its width to observe the desired change)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jérémie Bresson

Merge request reports