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
Fix : Hides hidden files and folder in modal (beginning with a dot) #37597
Conversation
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com> Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works, but a bit of a hack, no?
What would a solution in js look like?
@artonge, I have no skill on JS, so I don't know what could be the solution. |
I dug a little, and looks like a condition already exist, but it is wrong in my opinion. Lines 1174 to 1179 in 9db3305
The code is searching for #showHiddenFiles , but no component with this id is created for the settings page. It is only created for files. The code then default to showing hidden files, which is unexpected, it should be the opposite.
Replacing the code by the following works. @Jerome-Herbinet can you handle that? I don't think I can push to your branch. const showHiddenInput = document.getElementById('showHiddenFiles')
if (showHiddenInput?.value !== "1") {
files = files.filter(function (file) {
return !file.name.startsWith('.')
})
} Commit: 1fa58be |
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Done @artonge :-) |
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Can you test on your side @artonge ? |
Can you remove the original change? It should not be needed anymore |
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Done + npm run sass @artonge |
Perfect 👌 |
Signed-off-by: Jérôme Herbinet <33763786+Jerome-Herbinet@users.noreply.github.com>
Done |
Signed-off-by: Jérôme Herbinet 33763786+Jerome-Herbinet@users.noreply.github.com
Summary
Fixes the mentioned problem in this modal (IMO this is a problem) :
Checklist