fix: file list visual fixes on expirations date and decuplicate elements on shared files#41056
fix: file list visual fixes on expirations date and decuplicate elements on shared files#41056DeepDiver1975 merged 5 commits intomasterfrom
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
|
Any side effect? I mean, removing ALL "click" events from the filelist might cause issues |
There shouldn't be any side effects. From what I gather, the code is designed to attach the relevant events each time the file list gets initialized. |
|
CI now approves of my changes, but I noticed that there may still be an issue deeper within the code. Here's the specific line in the code: The first time |
|
I think we should look into it, at least to know why that change happens (maybe it makes sense, or maybe we can't do anything about it) |
|
I've identified the reason behind it returning a value of 0 instead of null after clicking. When you click the element, it fetches the attributes from the model, which, in turn, retrieves the data from the jQuery object: https://github.com/owncloud/core/blob/b451ac539617129632f262cabc61e84a0ec8e579/apps/files/js/filelist.js#L448C3-L457 The reason you get the integer 0 is because of these specific lines in the code: core/apps/files_sharing/js/sharedfilelist.js Lines 95 to 99 in b451ac5 |
|
I'd need to check the documentation... If the API is documented to return I'd write a comment with a brief explanation, at least to know that we need to handle those 2 values. |
|
|
This ensures that older events won't be triggered, preventing the file list from having duplicate entries.
The null check failed, which resulted in unexpected timestamps.
I applied the wrong logic in my first commit.
fa8fa3b to
934983e
Compare
|
@steelcuts I took the freedom to finalize this pr |
934983e to
a476fc5
Compare
|
Kudos, SonarCloud Quality Gate passed! |








Description
This PR fixes 2 issues:
Related Issue
#41055
Motivation and Context
Visual issues that could be missleading
How Has This Been Tested?
Not extensively tested, only with Brave and Chrome on oC 10.13.2.
Screenshots (if appropriate):
Issue:

Fixed:

Types of changes
Checklist: