Extend meaning of "Hidden Files" #270

Open
opened 2 years ago by VinceR · 13 comments
VinceR commented 2 years ago
Collaborator

Currently, a file or directory is considered "hidden" if its name begins with a period. This is an old unix convention that dates back to a time when a user's home directory was littered extensively with such files which while necessary for applications, were not considered appropriate for direct user manipulation. Of course all of this has changed, thanks to XDG and the fact that users really do HAVE to interact directly with some of those dot files.

I would propose allowing users to redefine what they consider as "hidden" and would suggest that is be based on something as simple as some sort of name globbing. For instance, while I always want to see dotfiles like .config/ or .bashrc, I might not want to see backup files \*~ or files named temp*, et cetera. Or I may want to seem them sorted first in Konqueror (when Group Hidden First is checked).

This idea was proposed many years ago to the KDE team: Option to hide backup files as well as dotfiles. A reasonable-looking patch was submitted in that bug report but never got implemented.

I think that re-doing the patch for TDE, making some minor changes to Konqueror file manager code, and adding a user interface to the parameter would do the trick.

Currently, a file or directory is considered "hidden" if its name begins with a period. This is an old unix convention that dates back to a time when a user's home directory was littered extensively with such files which while necessary for applications, were not considered appropriate for direct user manipulation. Of course all of this has changed, thanks to XDG and the fact that users really do HAVE to interact directly with some of those dot files. I would propose allowing users to redefine what they consider as "hidden" and would suggest that is be based on something as simple as some sort of name globbing. For instance, while I always want to see dotfiles like `.config/` or `.bashrc`, I might not want to see backup files `\*~` or files named `temp*`, et cetera. Or I may want to seem them sorted first in Konqueror (when *Group Hidden First* is checked). This idea was proposed many years ago to the KDE team: [Option to hide backup files as well as dotfiles](https://bugs.kde.org/show_bug.cgi?id=3212). A reasonable-looking [patch](https://bugsfiles.kde.org/attachment.cgi?id=10208) was submitted in that bug report but never got implemented. I think that re-doing the patch for TDE, making some minor changes to Konqueror file manager code, and adding a user interface to the parameter would do the trick.
VinceR added the SL/wishlist label 2 years ago
Owner

This may be a good idea. Providing the user with an interface to select "families" of files to hide by default would be a nice to have feature.

This may be a good idea. Providing the user with an interface to select "families" of files to hide by default would be a nice to have feature.
Collaborator

That's certainly a nice idea, wil take care of these annoying backup files from showing all over the place 👍

That's certainly a nice idea, wil take care of these annoying backup files from showing all over the place 👍
VinceR commented 2 years ago
Poster
Collaborator

As you can see, I started a couple of PRs to address this:

TDE/tdelibs#163
TDE/tdebase#273

Things look good but I will need some more time to test.

As you can see, I started a couple of PRs to address this: TDE/tdelibs#163 TDE/tdebase#273 Things look good but I will need some more time to test.
Owner

Sounds great. Let us know when they are ready for review.

Sounds great. Let us know when they are ready for review.
Owner

@VinceR
are the two PRs mentioned above ready for review?

@VinceR are the two PRs mentioned above ready for review?
VinceR commented 2 years ago
Poster
Collaborator

@VinceR
are the two PRs mentioned above ready for review?

@MicheleC

They are almost ready to go but I need to complete and push some additional modifications.

> @VinceR > are the two PRs mentioned above ready for review? @MicheleC They are almost ready to go but I need to complete and push some additional modifications.
VinceR commented 2 years ago
Poster
Collaborator

These 2 PRs are ready to review

tde/tdelibs#163
tde/tdebase#273

Most of the code changes are in the tdelibs PR. The tdebase PR interfaces with the tdelibs code from Konqueror listview interface.

These 2 PRs are ready to review https://mirror.git.trinitydesktop.org/gitea/tde/tdelibs/issues/163 https://mirror.git.trinitydesktop.org/gitea/tde/tdebase/issues/273 Most of the code changes are in the tdelibs PR. The tdebase PR interfaces with the tdelibs code from Konqueror listview interface.
VinceR commented 2 years ago
Poster
Collaborator

The original patch that inspired the tdelibs PR did a pretty complete job of changing *dotfile* nomenclature to *hiddenfile*. Although tdelibs PR code is quite different in other respects, I did preserve those changes.

The question is whether or not to try to do the same thing in the tdebase PR.

The original [patch](https://bugsfiles.kde.org/attachment.cgi?id=10208) that inspired the tdelibs PR did a pretty complete job of changing **\*dotfile\*** nomenclature to **\*hiddenfile\***. Although tdelibs PR code is quite different in other respects, I did preserve those changes. The question is whether or not to try to do the same thing in the tdebase PR.
VinceR closed this issue 2 years ago
VinceR reopened this issue 2 years ago
Owner

Thanks @VinceR, I will take a look during the (busy) week and feedback.

Thanks @VinceR, I will take a look during the (busy) week and feedback.
VinceR commented 2 years ago
Poster
Collaborator

Thanks @VinceR, I will take a look during the (busy) week and feedback.

Hi @MicheleC, I don't know if you have started your review of the PRs yet. If you have not, the following may not make a lot of sense.


I have been testing the most recent pair of commits (a30e487eac and 749ef05c55 ) that were pushed to address this issue. While everything works fine, I have identified the following areas of concern that I will address with the next updates:

  1. Hidden file match criteria changed through the dialog update the current instance of HiddenFileMatcher and are automatically stored as new default settings. A case can be made for 2 more choices: apply changes to running instance without changing default settings; ignore changes and re-apply stored default settings to running instance.
  2. If files are currently hidden (per former criteria) and criteria is changed before un-hiding them, there may be unexpected results such as missing or duplicate file entries. This issue is addressed for the view displayed in current Konqueror tab but is not addressed for views in other tabs wherein files are hidden.
  3. Hidden file match criteria is applied equally to all tabs in a Konqueror window. A case can be made for having different criteria active for individual tabs.

I have changed the code to address these concerns and will be updating the respective PRs after a bit more testing.

> Thanks @VinceR, I will take a look during the (busy) week and feedback. Hi @MicheleC, I don't know if you have started your review of the PRs yet. If you have not, the following may not make a lot of sense. ----- I have been testing the most recent pair of commits ([a30e487eac ](https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs/commit/a30e487eacb830381910672e395b45fd6effee76) and [749ef05c55 ](https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/commit/749ef05c55cb7075b2f0a377d83de2d9c6dfe6c9)) that were pushed to address this issue. While everything works fine, I have identified the following areas of concern that I will address with the next updates: 1. Hidden file match criteria changed through the dialog update the current instance of HiddenFileMatcher **and** are automatically stored as new default settings. A case can be made for 2 more choices: apply changes to running instance **without** changing default settings; ignore changes and re-apply stored default settings to running instance. 1. If files are currently hidden (per former criteria) and criteria is changed before un-hiding them, there may be unexpected results such as missing or duplicate file entries. This issue is addressed for the view displayed in current Konqueror tab but is not addressed for views in other tabs wherein files are hidden. 1. Hidden file match criteria is applied equally to all tabs in a Konqueror window. A case can be made for having different criteria active for individual tabs. I have changed the code to address these concerns and will be updating the respective PRs after a bit more testing.
VinceR commented 2 years ago
Poster
Collaborator

UPDATE

I had tested the most recent pair of commits successfully in chroot test environment -- Konqueror had worked fine with the new functionality.

However in trying to run the full TDE desktop with these commits, I am running into some major issues with kicker and konqueror.

Until I get a better understanding, I recommend that you don't do any testing just yet. The prior pair of commits worked fine.

**UPDATE** I had tested the most recent pair of commits successfully in chroot test environment -- Konqueror had worked fine with the new functionality. However in trying to run the full TDE desktop with these commits, I am running into some major issues with kicker and konqueror. Until I get a better understanding, I recommend that you don't do any testing just yet. The prior pair of commits worked fine.
VinceR commented 2 years ago
Poster
Collaborator

UPDATE 2

Situation has been resolved -- problem was on my end and caused by incomplete propagation of updated libraries into my "production" system :)

Everything is ready for review and testing.

**UPDATE 2** Situation has been resolved -- problem was on my end and caused by incomplete propagation of updated libraries into my "production" system :) Everything is ready for review and testing.
Owner

I don't know if you have started your review of the PRs yet.

No, unfortunately I haven't. The workload has been bigger than I thought this week. But I will do it this weekend.

> I don't know if you have started your review of the PRs yet. No, unfortunately I haven't. The workload has been bigger than I thought this week. But I will do it this weekend.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdebase#270
Loading…
There is no content yet.