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 ~> Existing Module #5008

Closed
retailcoder opened this issue Jun 13, 2019 · 13 comments · Fixed by #5026

Comments

@retailcoder
Copy link
Member

commented Jun 13, 2019

The "Import" functionality is currently visually rather far from the "Add Module" functionality:

image

Meanwhile in Visual Studio, Add -> Existing Item... is right on top of the list of available item types.

Let's leave "Export" grouped with "Remove" (they do go hand-in-hand), and move "Import" under the "Add" menu, both in the context menu and the "+" dropdown.

@mansellan

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

Nice idea. Could I also suggest the label gets changed from 'Add Module' to simply 'Add'? 'Module' doesn't really fit with UserForms for example, nor with ActiveX designers (if we ever want to support them for ODE) nor with several of the VB6 component types (if we want to be a little consistent between VBA and VB6)

@Inarion

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

May I suggest adding a 'Replace' functionality? Quite often I find myself wanting to replace (first delete, then re-import) a certain module, for example when rolling back changes.

Edit: The VBE's standard behavior when trying to import a module whose name is already taken is to append a number to the name (or increment the existing number).

@retailcoder

This comment has been minimized.

Copy link
Member Author

commented Jun 14, 2019

@Inarion good idea! ref. #4781

@mansellan mansellan self-assigned this Jun 20, 2019

@mansellan mansellan removed the up-for-grabs label Jun 20, 2019

@mansellan

This comment has been minimized.

Copy link
Member

commented Jun 20, 2019

Currently, the Add button drop-down comes from the same resource entry as the Add context (sub) menu. If we add an entry for 'File...' there, it will show up in both places. That being so, the Import... menu item seems somewhat redundant. Did we want to keep it?

@retailcoder

This comment has been minimized.

Copy link
Member Author

commented Jun 20, 2019

Indeed this makes the "Import..." menu item somewhat completely redundant, the "Existing Item..." menu item means to replace it, leaving "Export" close to "Remove", and effectively moving "Import" closer to the "Add" commands.

@mansellan

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

So, here's what the VBA context menu looks like with the changes (including shortening add/collapse):

image

@retailcoder

This comment has been minimized.

Copy link
Member Author

commented Jun 25, 2019

@mansellan that looks great!

@daFreeMan

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2019

I might suggest that the main menu level be Add/Import to retain consistency with the standard VBE Project Explorer context menu:
2019-06-26 07_13_48-Microsoft Visual Basic for Applications - Satisfaction Summary Master v3 34 - De

Having reread the issue log and knowing what was going on, it still took me a few moments to find Add | Existing file....

Perhaps at least consider changing Existing file... to Existing module... to retain consistency with the wording module since that's used on almost every other line of the sub-menu.

@mansellan

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

Hmm, not sure... I definitely think Add/Import is too noisy. As for the Existing {?}, here's how it looks in VB6:

image

I think module would be counter-productive there. Torn between file and item though...

@mansellan

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

Incidentally, Import was never available to VB6, the word Import didn't really fit, so the functionality was missed. Now that it's Add, I'm adding it.

mansellan added a commit to mansellan/Rubberduck that referenced this issue Jun 27, 2019
@mansellan

This comment has been minimized.

Copy link
Member

commented Jun 27, 2019

I do wonder though if Add, Export and Remove should be in one group, separately from Find and Indent?

@mansellan

This comment has been minimized.

Copy link
Member

commented Jul 3, 2019

OK, so I've tried the following:

  • Grouping Add\Export\Remove
  • Putting Expand All above Collapse all (seems more natural)

The question then is - where should the group go? Below Find/Indent or above it. Both options shown below:

image

Thoughts?

@bclothier

This comment has been minimized.

Copy link
Contributor

commented Jul 3, 2019

For the question, I think the above makes more sense.

I would also think that I think it makes more sense & discoverable to have the Existing file... as a first menu option, with the new stuff following.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.