Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Request: File-Tree sidebar is too small for long filenames #22915

Closed
Hypersomniac opened this issue Feb 15, 2023 · 6 comments · Fixed by #22918
Closed

Pull Request: File-Tree sidebar is too small for long filenames #22915

Hypersomniac opened this issue Feb 15, 2023 · 6 comments · Fixed by #22918
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Hypersomniac
Copy link

Feature Description

In the Pull Request Files Changed view:
When dealing with files with names have the same long prefix, it is impossible to know the file's full name before clicking on them. Which is a bit cumbersome in some situations:

Capture d’écran du 2023-02-15 00-34-13

There is no possibility to either:

  • Expand or resize the sidebar.
  • Scroll the sidebar horizontally.
  • Mouse over to see the full file name (using a simple html title would do the job).

It forces to click on the file, check the top of the page and read the full path name (which can even be broken into multiple lines).

This falls in between usability bug and feature request I guess.

Here is the issue in question https://projects.blender.org/blender/blender/pulls/104599/files#diff-a8030d774c658fc81d1e7a8b0a4aa3044e7b9723

Screenshots

No response

@Hypersomniac Hypersomniac added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Feb 15, 2023
@lunny lunny added topic/ui Change the appearance of the Gitea UI and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Feb 15, 2023
@silverwind
Copy link
Member

silverwind commented Feb 15, 2023

We should set a tooltip or title on these.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 15, 2023

I guess tooltip doesn't work for Vue (out of box) at the moment? So I think title wins.

@delvh
Copy link
Member

delvh commented Feb 15, 2023

I've tried it, the result is not too good:
image
Apparently the magic boundary (or however tippy calls it) is too large for that.

@delvh
Copy link
Member

delvh commented Feb 15, 2023

Okay, yeah, title sounds reasonable.

@delvh
Copy link
Member

delvh commented Feb 15, 2023

Much better.
image

@silverwind
Copy link
Member

Yeah, title is arguably better in this case.

techknowlogick added a commit that referenced this issue Feb 16, 2023
Previously, a file/directory name was simply cut when it was too long.
Now, we display the browser-native tooltip (`title`) instead, so you can
still see it when hovering over it.
In this case, we don't use the normal `tippy` tooltips for three
reasons:
1. Vue components are not included in the global tooltip initialization
2. Vue components would need to initialize their tooltips themselves
whenever their content is changed
3. The tooltips are shown too long under the default configuration (the
tooltip one element above is still shown when hovering on the element
below)

Fixes #22915

## Appearance


![image](https://user-images.githubusercontent.com/51889757/219049642-43668a38-0e86-42bf-a1d0-3742c4dc7fd9.png)

## Room for future improvement

We could think about displaying the whole file path in the title, not
just its name.
This is not done at the moment:

![image](https://user-images.githubusercontent.com/51889757/219050689-1e6e3d57-f2bf-48be-8553-415e744a6e10.png)

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants