Restore File - Long filenames not displayed correctly
-
When doing a Restore File, if the file/directory name is longer then the width of the pop up window, the file/directory name is not viewable.
-
Sadly, it's a bug on our old react component we can't really update. Any idea for a workaround @julien-f ?
-
I believe we could use an non-breakable space the icon and the text and maybe cut the text at a given length.
Maybe there is something that we could do in the CSS too.
@pdonias Could you take a quick look?
-
This isn't actually causing me a problem. It is just something that I came across while doing some testing.
On Linux the maximum file name length is 255 and the maximum combined length of both the file name and path name is 4096, so these should be allowed for in the solution some how.
Unless it is a really easy fix or it its really causing someone issues, can I suggest leaving this in XO 5, but make sure it is covered in XO 6?
Thanks
-
This is the plan already, yes
-
I took a look but I'm not able to reproduce We do have a known issue with the select component but not that one specifically. The non-breakable space wouldn't work between the icon and the text but maybe there's something else we can do if we can ever reproduce it. In any case, this will be fixed in the next major version of XO as we won't use that component at all any more.
-
-
@pdonias I am puzzled. What do you see?
To be clear there are two problems.
- The selected directory truncates the directory name at around 46 characters ("/var/lib/docker/containers" in my original screen shot isn't truncated because it isn't that long).
- "Long" file/directory names in the "Select a file" drop down do not display correctly.
Once a file has been selected, the "Selected files/folders" does show it in a scrollable "widget" that can then be used to see the full file name.
My screen shots are from Chrome on Fedora. I normally use Fedora/Firefox which has the same issues.
I set up the following as a test. Filename lengths are 10-80 characters long.
root@debian42:~/testdir# pwd /root/testdir root@debian42:~/testdir# ls -l total 0 -rw-r--r-- 1 root root 0 Oct 7 09:50 1234567890 -rw-r--r-- 1 root root 0 Oct 7 09:50 12345678901234567890 -rw-r--r-- 1 root root 0 Oct 7 09:50 123456789012345678901234567890 -rw-r--r-- 1 root root 0 Oct 7 09:50 1234567890123456789012345678901234567890 -rw-r--r-- 1 root root 0 Oct 7 09:50 12345678901234567890123456789012345678901234567890 -rw-r--r-- 1 root root 0 Oct 7 09:51 123456789012345678901234567890123456789012345678901234567890 -rw-r--r-- 1 root root 0 Oct 7 09:51 1234567890123456789012345678901234567890123456789012345678901234567890 -rw-r--r-- 1 root root 0 Oct 7 09:51 12345678901234567890123456789012345678901234567890123456789012345678901234567890
Filename lengths 10-50 display. Filename lengths 60-80 do not.