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

Feature/edit vs browse #1757

Merged
merged 11 commits into from
Jan 6, 2024
Merged

Feature/edit vs browse #1757

merged 11 commits into from
Jan 6, 2024

Conversation

sebjulliand
Copy link
Collaborator

Changes

Resolves #1752

As discussed in https://github.com/orgs/codefori/discussions/1331, browsing/editing support could use a little love. This PR brings some enhancement to address what was discussed:

  • A new Open sub-menu replaces the single Browse action in stream files/member's right click menu. The sub-menu offers to explicitly open a streamfile/member read-only or for editing.
    image
  • A new global setting lets the user define what should be the open action by default when clicking on a streamfile/member to open it
    image
  • A new connection settings lets the user define protected paths: a comma-separated list of libraries and/or IFS paths that will always be opened read-only.
    image

Under the hood, all the actions that open a streamfile/member now end up using code-for-ibmi.openEditable that holds all the logic for checking if the target should be opened read-only or not. This command has also be enhanced to allow to open a resource and highlight a range in the opened document.

Checklist

  • have tested my change

sebjulliand and others added 5 commits December 28, 2023 23:12
Signed-off-by: S. Julliand <sebjulliand@gmail.com>
Signed-off-by: S. Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
@sebjulliand sebjulliand added the enhancement New feature or request label Jan 4, 2024
@sebjulliand sebjulliand requested a review from a team January 4, 2024 15:04
@sebjulliand sebjulliand self-assigned this Jan 4, 2024
Copy link
Collaborator

@chrjorgensen chrjorgensen left a comment

Choose a reason for hiding this comment

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

@sebjulliand Great PR - only a few issues:

  • directory uppercase (see code comment)
  • filter does not show the library is protected - only when the filter is marked as protected. Could this be done?

src/webviews/settings/index.ts Outdated Show resolved Hide resolved
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
@sebjulliand
Copy link
Collaborator Author

There you go @chrjorgensen :

  • Only libraries will be uppercase when saving the protected paths setting
  • Both IFS browser and Object browser will take into account the protected paths
  • IFS browser will show a lock on folders that are protected (or parent of a protected folder)
  • Changing the protected paths setting will automatically refresh the browsers to immediately protect what needs to be

@chrjorgensen
Copy link
Collaborator

@sebjulliand Looking very good and promising! 😍

I will do some more testing tomorrow - before I'll approve this great enhancement.

Copy link
Collaborator

@chrjorgensen chrjorgensen left a comment

Choose a reason for hiding this comment

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

@sebjulliand All is fine - as always with your PR's! 😍

Rebase and merge when appropriate...

@sebjulliand
Copy link
Collaborator Author

@sebjulliand All is fine - as always with your PR's! 😍

Rebase and merge when appropriate...

Will do! Thank you so much!

@sebjulliand sebjulliand merged commit ed8453b into master Jan 6, 2024
1 check passed
@sebjulliand sebjulliand deleted the feature/editVsBrowse branch January 6, 2024 08:55
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.

Edit mode vs. Browse mode
2 participants