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

Reduce number of "Run" buttons? #19

Closed
bbryson opened this issue Aug 24, 2022 · 6 comments
Closed

Reduce number of "Run" buttons? #19

bbryson opened this issue Aug 24, 2022 · 6 comments

Comments

@bbryson
Copy link

bbryson commented Aug 24, 2022

It's not clear to me why we need both "Run" and "Run (Modify)". Couldn't FlexTools just figure out which one is needed? I'm inclined to tell users "just use "Run (Modify) all the time", but then it is annoying to have messages come up when they run it on a module that doesn't need it: "Changes disabled". That also feels unnecessary. It would be nice to have only "Run" and "Run All" and let the "modify" part be figured out internally.

While we're at it, it would be nice to be able to select a subset of the modules showing (contiguous or not), and be able to "Run all selected". But I'm not asking for six buttons..... I wonder if "Run all" could automatically run all showing modules, and the "Run" button could have the effect of running the selected modules. Actually, this is issue #13.

@cdfarrow
Copy link
Owner

cdfarrow commented Sep 6, 2022

Thanks, Beth, for raising this. I created the Run/Run(Modify) model as a safeguard against making unwanted changes, with the Run option intended to be a "dry run" for a module that makes changes to the project.
I'm reluctant to do away with the dry run option, as I think it is important for cases where people are potentially making significant changes to their data. However, in the case of FlexTrans, I can see how it seems like overkill with the two modes, plus the warning messages. FlexTrans is a well-polished system, and there probably isn't any need for end-users to ever do a dry run.
So, based on your suggestions in this and related issues, I'm wondering if it would work to have a switchable option that simplified the operation like so:

  • Only show one set of Run buttons (the icons with the red warning, but without Modify in the text)
  • Pass the modifyAllowed flag according to the module's modify allowed flag (i.e. same as Run(Modify), but don't output any message for read-only modules (issue Don't warn every time on Run All (Modify) #11))
  • Double-click and Enter would do the same -- i.e. run the module with no warning (addressing Allow double-click of modules that modify #18)
  • Possibly disable the "Are you sure?" dialog boxes (issue Allow double-click of modules that modify #18 comment 2)
    What do you think? Would this meet your wishes and not confuse things too much?
    BTW, the option could be turned on in the default FlexTrans installation.

@rmlockwood
Copy link

I think this looks good. I think we could disable the Are you sure message box. Maybe this is configurable?

@bbryson
Copy link
Author

bbryson commented Oct 3, 2022

This looks promising to me.

My impression is that I can't run modules in "Run" mode currently, if they are marked as modifying the database. So I guess I never actually got the benefit of the "dry run" mode.

Anyway, I think this is a good idea.

@cdfarrow
Copy link
Owner

cdfarrow commented Oct 4, 2022

My impression is that I can't run modules in "Run" mode currently, if they are marked as modifying the database. So I guess I never actually got the benefit of the "dry run" mode.

I don't think any of Ron's modules support doing a dry run, so you've been seeing a strict Modifies/Doesn't-Modify dichotomy. For development and testing of modues, and for processes that might be a bit 'scary' to run on your project (e.g. Merge duplicates) it is helpful to be able to see what it will do before actually committing to it. (It is like Preview in Bulk Edit.)

Actually, maybe the term 'preview' would be clearer than 'dry run'...

@bbryson
Copy link
Author

bbryson commented Oct 12, 2022

Yes, I really like your proposal, especially with the "switchable option", so you can still have "dry run" or "preview" for other kinds of modules. If you did all that you propose here, that would help immensely!

cdfarrow added a commit that referenced this issue Apr 20, 2023
Provide a new flag (simplifiedRunOps) that removes the dry-run/preview buttons. The messages are tailored to this mode.
Also, doesn't warn about changes if none of the modules selected can make changes.
@cdfarrow
Copy link
Owner

Fixed for 2.2.2.
Added FTConfig.simplifiedRunOps, which when set to True, hides the Dry-run/Preview buttons and menu items. All Run actions behave as "Run Modify". This option operates independent of FTConfig.warnOnModify.

Also, if warnOnModify is True, then it now doesn't display the Are you sure? dialog if the module or modules don't make changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants