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

Add option to show hidden files and directories in IFS browser #1839

Merged
merged 7 commits into from
Feb 16, 2024

Conversation

chrjorgensen
Copy link
Collaborator

@chrjorgensen chrjorgensen commented Feb 11, 2024

Changes

Up until now the IFS browser shows all files and directories, even the hidden ones with a . in front of the name.
This PR will add an option to show or hide these files and directories in the IFS browser:

image

image

The option can be changed in the connection settings:

image

  • it is on by default to show hidden files as before this change
  • an icon is added to the IFS browser navigation menu (replacing 'Remove IFS Shortcut'):

image

  • special files and directories are always shown (see constant ALWAYS_SHOW_FILES in ifsBrowser.ts) to always show .vscode and .gitignore

Checklist

  • have tested my change
  • eslint is not complaining
  • for feature PRs: PR only includes one feature enhancement.

@chrjorgensen chrjorgensen added the enhancement New feature or request label Feb 11, 2024
@worksofliam
Copy link
Contributor

@chrjorgensen Any chance you can fix the conflict? 😬

@chrjorgensen
Copy link
Collaborator Author

@worksofliam Conflict fixed...

@worksofliam
Copy link
Contributor

Initial reaction and usage of the code is awesome. I need to play with it more before I merge.

Copy link
Collaborator

@sebjulliand sebjulliand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good enhancement!
I have a few suggestions to make and a question:

  • Shouldn't a button be added to the browser to toggle between hide/show hidden files? I'm quite sure users will either miss the feature of hit ctrl+h by mistake and ask why some files disappeared 😅

src/views/ifsBrowser.ts Outdated Show resolved Hide resolved
src/webviews/settings/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments which I don't expect any changes for, because I love this feature! I have so many hidden folders I don't care about. But, do see Seb's comments for minor fixes and then assign a review back to me. Thanks!

package.json Outdated
},
{
"command": "code-for-ibmi.ifs.toggleShowHiddenFiles",
"when": "code-for-ibmi:connected && view == ifsBrowser"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this when clause in the right place? Even if my focus on was on the IFS Browser, I couldn't get it to show up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove the command and add an icon in the IFS browser instead.

package.json Outdated Show resolved Hide resolved
src/views/ifsBrowser.ts Show resolved Hide resolved
@chrjorgensen
Copy link
Collaborator Author

@worksofliam The keybinding has been removed and replaced by an icon in the IFS browser navigation menu, as suggested by @sebjulliand

Feel free to test and merged, if approved. 🙏

@worksofliam worksofliam self-requested a review February 16, 2024 15:19
Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrjorgensen Thanks for taking my shortcut consideration into account! I prefer the icon over the shortcut for sure due to it already being used on Mac.

Works good to me. Thanks!

@worksofliam worksofliam merged commit ec72b27 into codefori:master Feb 16, 2024
1 check passed
@chrjorgensen chrjorgensen deleted the feature/hidden-files-in-IFS branch February 16, 2024 23:46
@chrjorgensen chrjorgensen mentioned this pull request Feb 22, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants