Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Truncate file names while preserving file extensions #1782

Merged
merged 2 commits into from
Nov 29, 2021

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Nov 16, 2021

Related Issue

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation added/updated

Open tasks:

  • ...

@JammingBen
Copy link
Contributor Author

JammingBen commented Nov 16, 2021

A few notes/questions:

  • Do we want to separate the file name and the extension, e.g. by using the muted class on the extension? OC10 currently does this: Nvm, I saw that the Jira ticket already mentions this.
    image
  • Do we want to have tooltips on truncated file names? The issue I see here is that we can't determine if a file name is being truncated or not. So we'd have to implement tooltips for all file names. Edit: I think this will become obsolete with what we discussed for Show path / parent folder to distinguish files web#5953 as we want introduce a separate property for tooltips.
  • With very long folder paths, the filename will not be displayed at all. It was like this before, and I don't see an easy way to overcome this, but I want to point it out. It can be kinda confusing now with the file extension showing at the end. Edit: After discussing Show path / parent folder to distinguish files web#5953, I'd say we ignore it for now as it will be irrelevant after.
    image

@kulmann @pascalwengerter Any opinions here?

@JammingBen JammingBen self-assigned this Nov 16, 2021
@JammingBen JammingBen added the enhancement New feature or request label Nov 16, 2021
@fschade
Copy link
Contributor

fschade commented Nov 18, 2021

@JammingBen just an idea, if we have a path in the resource name, can we create 3 containers?

(a/very/long/pa...)(aLongFileNa....)(.ext)
(path)(fileName)(fileExtension)

@JammingBen
Copy link
Contributor Author

JammingBen commented Nov 18, 2021

Actually it is already divided in 3 containers. But as mentioned above, in the near future we will have the path beneath the file name (owncloud/web#5953) anyway, so the problem becomes kinda obsolete IMO.

@JammingBen JammingBen marked this pull request as ready for review November 23, 2021 12:53
@sonarcloud
Copy link

sonarcloud bot commented Nov 23, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@JammingBen JammingBen requested a review from kulmann November 25, 2021 07:57
@kulmann kulmann merged commit 535904d into master Nov 29, 2021
@delete-merged-branch delete-merged-branch bot deleted the truncate-file-name branch November 29, 2021 15:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 - To Review enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants