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

In shared file module, file name should truncate when it reaches the width of the column. #1277

Closed
DerekCaelin opened this issue Nov 13, 2023 · 5 comments · Fixed by #1339
Closed
Assignees
Labels
bug Engineering tasks lead by the engineering team enhancement improving an existing feature
Milestone

Comments

@DerekCaelin
Copy link

DerekCaelin commented Nov 13, 2023

Description

When share a file with a long name, eg, 400358235_10225919693641079_6899336601157390679_n.jpg(53 chars) the file name should truncate rather than extend into the neighboring column.

Steps To Reproduce

  1. Go to a landscape or group
  2. upload a file
  3. name file something long: 400358235_10225919693641079_6899336601157390679_n.jpg
  4. see issue

Expected behavior

  • NO overlap between the file name and the the size.
  • File name/title visible whenever possible (text wrapped, e.g. A in the screenshot)
  • Truncate the long file name (by column width) and add the ellipsis in the middle.

[Screenshot]
image

Actual behavior

text runs into neighboring column.
image

@DerekCaelin DerekCaelin added 1000L bug enhancement improving an existing feature labels Nov 13, 2023
@DerekCaelin DerekCaelin added this to the 1000L 2023-12 milestone Nov 13, 2023
@github-project-automation github-project-automation bot moved this to Todo in Terraso Nov 13, 2023
@paulschreiber
Copy link
Member

Perhaps we can use something like this: https://github.com/bluepeter/react-middle-ellipsis

There isn't yet a CSS rule for middle truncation. Draft: w3c/csswg-drafts#3937

@Hanal-code
Copy link

@josebui First, widening the file name column can prevent the text display challenge. Can you move the file size column to right?

@paulschreiber
Copy link
Member

@Hanal-code That won't solve the problem for small viewport sizes.

@Hanal-code
Copy link

Hanal-code commented Nov 13, 2023

@paulschreiber I added the expected behaviors including the truncation with mockup above

@DerekCaelin DerekCaelin added the Engineering tasks lead by the engineering team label Nov 20, 2023
@paulschreiber
Copy link
Member

This is fixed on staging:

  1. There is more space for long names
  2. Names that are still too long are middle-truncated.

@github-project-automation github-project-automation bot moved this from Todo to Done in Terraso Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Engineering tasks lead by the engineering team enhancement improving an existing feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants