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

Issue #734: Context menu & menu bar edits #957

Merged
merged 38 commits into from
Jan 26, 2021

Conversation

katelynienaber
Copy link
Contributor

@katelynienaber katelynienaber commented Jul 24, 2020

Proposed changes

Small changes to context menus & menu bars according to conversation with @jelaplan and the team:

  • Moved all commands into the context menu except: Add Session, Refresh All, Search, Add/Remove Favorite
  • Renamed some commands to be more specific: Paste/Paste Data Set, Issue Command/Issue MVS Command (as requested by Venkat & John)
  • Put Search at the top of every menu
  • Put Update/Hide/Delete Profile at the bottom of every menu
  • Gave Add to Favorites its own group in the menu
  • Reduced number of groups in the menus...we now have DS/file options, auth options, & profile options (plus some small groups specific to certain menus)

@lauren-li I tagged you for review because you had helped with reordering the context menus before :)

Release Notes

Milestone: Backlog
Changelog: All commands moved/copied into the context menus, and some commands renamed to be more specific.

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • npm run vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Further comments

This PR does NOT close Issue #734. It just happens to be related. So please don't close the issue! :D

@katelynienaber katelynienaber added this to the Backlog milestone Jul 24, 2020
@katelynienaber katelynienaber self-assigned this Jul 24, 2020
@katelynienaber katelynienaber linked an issue Jul 24, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #957 into master will decrease coverage by 0.63%.
The diff coverage is 68.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #957      +/-   ##
==========================================
- Coverage   92.87%   92.23%   -0.64%     
==========================================
  Files          50       50              
  Lines        5288     4922     -366     
  Branches     1022      873     -149     
==========================================
- Hits         4911     4540     -371     
- Misses        375      380       +5     
  Partials        2        2              
Impacted Files Coverage Δ
src/uss/USSTree.ts 94.06% <ø> (ø)
src/uss/actions.ts 84.61% <60.00%> (-7.01%) ⬇️
src/dataset/actions.ts 94.10% <100.00%> (-1.84%) ⬇️
src/extension.ts 78.32% <100.00%> (-0.68%) ⬇️
src/globals.ts 100.00% <100.00%> (ø)
src/shared/utils.ts 92.18% <0.00%> (-3.23%) ⬇️
src/job/ZosJobsProvider.ts 90.55% <0.00%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bb2157...6ff16f4. Read the comment docs.

@zdmullen zdmullen mentioned this pull request Jul 30, 2020
14 tasks
@crawr crawr removed a link to an issue Jul 31, 2020
@crawr crawr modified the milestones: Backlog, 1.9 Release Jul 31, 2020
@katelynienaber katelynienaber changed the title Issue #734: Context menu & menu bar edits Issue #734: Context menu & menu bar edits READY (only Codecov/project failing) Aug 17, 2020
@katelynienaber katelynienaber changed the title Issue #734: Context menu & menu bar edits READY (only Codecov/project failing) Issue #734: Context menu & menu bar edits READY (only codecov/project failing) Aug 17, 2020
@katelynienaber katelynienaber changed the title Issue #734: Context menu & menu bar edits READY (only codecov/project failing) Issue #734: Context menu & menu bar edits - READY (only codecov/project failing) Aug 17, 2020
zFernand0
zFernand0 previously approved these changes Aug 17, 2020
Copy link
Member

@zFernand0 zFernand0 left a comment

Choose a reason for hiding this comment

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

Looks awesome! 😋
Thanks for cleaning things up! 👍

@jellypuno jellypuno self-requested a review September 1, 2020 09:20
jellypuno
jellypuno previously approved these changes Sep 1, 2020
Copy link
Contributor

@jellypuno jellypuno left a comment

Choose a reason for hiding this comment

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

Looks Great! Just one comment on the Edit Label. Since all functions has the word dataset or member in it, maybe you can add Dataset and Member in the Edit as well. Just for consistency. Same with Rename and Delete File. Other than that, everything looks good!

image

@katelynienaber katelynienaber dismissed stale reviews from jellypuno and zFernand0 via 11fd8ed September 1, 2020 09:58
@katelynienaber
Copy link
Contributor Author

katelynienaber commented Sep 1, 2020

Looks Great! Just one comment on the Edit Label. Since all functions has the word dataset or member in it, maybe you can add Dataset and Member in the Edit as well. Just for consistency. Same with Rename and Delete File. Other than that, everything looks good!

image

Fixed this for Copy & Edit Data Set/Member

@jellypuno
Copy link
Contributor

Was this handled?

image

@katelynienaber
Copy link
Contributor Author

katelynienaber commented Sep 4, 2020

Was this handled?

I just added it in the latest version :) So handled now, yes.

jellypuno
jellypuno previously approved these changes Sep 10, 2020
Copy link
Contributor

@jellypuno jellypuno left a comment

Choose a reason for hiding this comment

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

Looking good! I just have this error. Maybe it is from my machine. Please check if this error is not happening to others.

image

Copy link
Contributor

@lauren-li lauren-li left a comment

Choose a reason for hiding this comment

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

Thanks @katelynienaber for the updates in this PR!

Apologies for being slow on this review. It took me some time to get what was happening with the changes to DS createFile and USS createUSSNode and why, but I understand now.

Overall, the PR looks good! All unit and expected integration tests are passing. I think it is near ready for approval, but I have some quick suggestions and questions that I think should be addressed before this goes into master branch (see code references).

I know you are focusing heavily on the base profile PR now, so I tried to figure out some of the issues to make polishing this PR quicker and easier for you. Hope it helps!

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@lauren-li
Copy link
Contributor

@zFernand0 @katelynienaber Just a heads-up when bringing this branch up-to-date with the master branch: The context menu commands for favoriting a USS session and favoriting a Jobs session are now zowe.uss.addFavorite and zowe.jobs.addFavorite, respectively (instead of x.saveSearch). (The functionality to favorite/save a search was moved into addFavorite since they shared so much code.)

Therefore, you may encounter a merge conflict in package.json that looks like:
Screen Shot 2020-09-11 at 12 21 15 PM

It should be resolved to look something like below. (Note especially the command value: zowe.uss.addFavorite.):

       {
          "when": "view == zowe.uss.explorer && viewItem =~ /^(?!.*_fav.*)ussSession.*/",
          "command": "zowe.uss.addFavorite",
          "group": "3_workspace@3"
        },

@katelynienaber katelynienaber changed the title Issue #734: Context menu & menu bar edits - READY (only codecov/project failing) Issue #734: Context menu & menu bar edits - READY Sep 29, 2020
@katelynienaber
Copy link
Contributor Author

Aaand again XD @lauren-li I've added this back.

@zdmullen
Copy link
Contributor

@lauren-li
Copy link
Contributor

lauren-li commented Jan 21, 2021

I went about clicking on the commands involved in this PR, and I found a bit of odd behavior when trying to favorite a profile/search in the Jobs view. Clicking "Add to Favorites" doesn't seem to add it into the Job view's Favorites section. However, when I next click on the profile/search, it will act like a profile/search item in the Favorites section, and show the context menu for a favorited profile/search, even though it is not located in the Favorites section. The resulting error is probably due to it not being under the Favorites section, and might go away once we map the command correctly.

ze-jobFav2

I also think we may want to reorganize the commands in package.json for better maintainability, but that should be a separate PR. I will start a discussion about it in our repo.

Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
@katelynienaber
Copy link
Contributor Author

@lauren-li I've fixed the dropdown issue, please check again ^^

@lauren-li
Copy link
Contributor

@katelynienaber Thank you for addressing the issue I found. I don't see it happening anymore.

While manually retesting, I noticed a couple other issues. (Hopefully these will be the last ones!):

  1. USS favorited profile nodes have extra commands in their context menus. The only command we currently support for these nodes is "Remove profile from Favorites". Clicking the other context menu items either doesn't do anything or produces errors, so they should be removed:
    Screen Shot 2021-01-24 at 3 58 39 PM
  2. USS favorited profile nodes have the "Remove Favorite" star icon next to them. Clicking on it doesn't do anything, as that "Remove" command was not designed for favorited profile nodes, so the icon should be removed. (Favorited profile nodes in the Data Sets and Jobs views also do not have the star icon, so removing it here would also improve consistency between views.):
    Screen Shot 2021-01-24 at 4 17 51 PM
  3. For job items in the Jobs view, we should add an "Add to Favorites" item into the context menu to be consistent with the way you can favorite items in the Data Sets and USS views:
    Screen Shot 2021-01-24 at 4 23 32 PM

I think this PR is getting really close to being good to go. We are just at the polishing stage now. Thanks Katelyn for all your hard work on this!

Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
@katelynienaber
Copy link
Contributor Author

@lauren-li This is like whack-a-mole XD Ok please give it another shot

Copy link
Contributor

@lauren-li lauren-li left a comment

Choose a reason for hiding this comment

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

Thanks @katelynienaber!

I made some suggestions for the when... viewItem =~ values for USS Copy Path, USS Rename, and USS Pull from Mainframe, as it seems those commands got removed from some context menus where they should have remained.

I like the addition of the inline "Remove Search" icons for favorited searches. Although I didn't ask for them since we never had them before, I did always think it was a bit odd we excluded them. The new icons seem to function well. I made some suggestions for the USS "Remove Search" icon to make it more consistent with MVS and Jobs.

I went ahead and made PR #1153 into your PR with these requested changes since I know your plate is already full with like 3 other pull requests that are a bit more complicated. Feel free to bring #1153 into this PR if you agree with the suggestions. I hope this helps, and that we can get this PR merged into master soon!

packages/zowe-explorer/package.json Outdated Show resolved Hide resolved
packages/zowe-explorer/package.json Outdated Show resolved Hide resolved
packages/zowe-explorer/package.json Outdated Show resolved Hide resolved
packages/zowe-explorer/package.json Outdated Show resolved Hide resolved
@katelynienaber
Copy link
Contributor Author

Thanks @katelynienaber!

I made some suggestions for the when... viewItem =~ values for USS Copy Path, USS Rename, and USS Pull from Mainframe, as it seems those commands got removed from some context menus where they should have remained.

I like the addition of the inline "Remove Search" icons for favorited searches. Although I didn't ask for them since we never had them before, I did always think it was a bit odd we excluded them. The new icons seem to function well. I made some suggestions for the USS "Remove Search" icon to make it more consistent with MVS and Jobs.

I went ahead and made PR #1153 into your PR with these requested changes since I know your plate is already full with like 3 other pull requests that are a bit more complicated. Feel free to bring #1153 into this PR if you agree with the suggestions. I hope this helps, and that we can get this PR merged into master soon!

@lauren-li Thanks for reviewing again!

I added these changes to this branch, but I would prefer not to merge your branch in. I noticed some weird behavior on #1153, ex. clicking a favorited search in USS adds an extra profile node, and the Remove Favorites icons are missing on the inline bar.

Maybe I was going too fast and built it wrong somehow. But these things are working on this branch so I added your changes here and would prefer to just merge this one (#957) without #1153.

Let me know what you think!

Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
@lauren-li
Copy link
Contributor

clicking a favorited search in USS adds an extra profile node

@katelynienaber I believe this is an existing issue (#1029 USS Favorited search creates extra profile node).

Remove Favorites icons are missing on the inline bar

Oh no, sorry. That is somehow missing from my PR. Thanks for catching that.

Since you brought in the changes from PR #1153, I will go ahead and close it. I'll retest this PR (#957) and let you know how it goes!

@lauren-li
Copy link
Contributor

lauren-li commented Jan 25, 2021

@katelynienaber I think this PR is almost there! I promise I'm not finding these issues one-at-a-time on purpose. All the issues I mentioned above are fixed, but I just noticed for sequential data sets only, the "Copy" and "Paste" commands are missing (for both favorited and non-favorited sequential data sets). The expected commands show fine for PDS's and members. The below screenshot is for a sequential data set:

Screen Shot 2021-01-25 at 11 17 35 AM

Other than that, I did not notice any other issues. I counted the commands and compared them to the expected numbers for each item type this time, so I really hope this is the last bit of polish! All unit and expected integration tests are passing.

@lauren-li
Copy link
Contributor

lauren-li commented Jan 25, 2021

but I just noticed for sequential data sets only, the "Copy" and "Paste" commands are missing

@katelynienaber Actually, maybe we want to leave off the "Paste" command for sequential data sets. The current (v1.11.1) behavior is, if you "Copy" a data set member or other sequential data set, and then select "Paste" for a second sequential data set, the content of the second sequential data set gets completely replaced by the content of the copied data set. The mainframer I spoke with said this behavior does not seem intuitive, and I feel this is an easy way for users to accidentally lose data in sequential data sets.

So perhaps, let's leave off the "Paste" command for sequential data sets (as you currently have in this PR), but re-add the "Copy" command for sequential data sets, if @jelaplan is ok with that?

@katelynienaber
Copy link
Contributor Author

but I just noticed for sequential data sets only, the "Copy" and "Paste" commands are missing

@katelynienaber Actually, maybe we want to leave off the "Paste" command for sequential data sets. The current (v1.11.1) behavior is, if you "Copy" a data set member or other sequential data set, and then select "Paste" for a second sequential data set, the content of the second sequential data set gets completely replaced by the content of the copied data set. The mainframer I spoke with said this behavior does not seem intuitive, and I feel this is an easy way for users to accidentally lose data in sequential data sets.

So perhaps, let's leave off the "Paste" command for sequential data sets (as you currently have in this PR), but re-add the "Copy" command for sequential data sets, if @jelaplan is ok with that?

We can discuss it in standup. The function exists in master and this PR is only about rearranging the context menus, not deciding whether any functions are useful or intuitive to users. But if everyone agrees that it is a useless function then I can remove it after standup so that we don't have to open another PR.

@zdmullen
Copy link
Contributor

Re-add Copy for sequential data sets (but leave out Paste, which you have taken out).

Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
jellypuno
jellypuno previously approved these changes Jan 26, 2021
Copy link
Contributor

@jellypuno jellypuno left a comment

Choose a reason for hiding this comment

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

everything looks good! thank you @katelynienaber

@lauren-li
Copy link
Contributor

This looks really good! One last (I hope!) thing: Favorited profile nodes should only have "Remove Search" in their context menus. For the Jobs view only (not MVS or USS), there is an extra "Disable Validation for Profile" command:

Screen Shot 2021-01-26 at 1 55 44 PM

Signed-off-by: katelynienaber <katelyn.nienaber@broadcom.com>
@katelynienaber
Copy link
Contributor Author

@lauren-li Just pushed, check again pls ^^

Copy link
Contributor

@lauren-li lauren-li left a comment

Choose a reason for hiding this comment

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

@katelynienaber Thank you for all your hard work, patience, and perseverance on this PR. I think this looks good now!

@jellypuno jellypuno self-requested a review January 26, 2021 21:38
@jellypuno jellypuno merged commit 6afa469 into master Jan 26, 2021
@jellypuno jellypuno deleted the move-commands-to-context-menu branch January 26, 2021 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review and change the context menu items for clarity and consistency
7 participants