general UI enhancements for DX projects

Issue #1203 resolved
George Doenlen created an issue

The experience when working with a DX project really needs some work, it's not very intuitive where you would authorize a devhub (this was so confusing that I had to authorize manually via the CLI and then IC magically picked it up) or create a scratch org. These seem to be mixed all together within the connection category? These really need to be different things and more clear when creating a new project.

There's also appears to be no way to create a scratch org from a project-scratch-def.json file. IMO this is an essential feature since files like these are tracked in repo's and passed around to developers.

Comments (13)

  1. George Doenlen reporter

    I would also add that the UI for creating scratch orgs seems to be missing values under features (ProcessBuilder, Workflow for me currently). So this makes it so I can't create a scratch org via the ui to match my definition file.

  2. Scott Wells repo owner

    Hi, George. Thanks for filing. There are planned improvements here, but at least one of the key things you mention is currently possible from within the IDE. In the second screen shown here:

    http://www.illuminatedcloud.com/home/salesforcedx

    you can click on the file browser icon beside Org Name and it will allow you to select a project-scratch-def.json file and will auto-populate the dialog with its contents. It will also prompt you to save the configuration from that screen as a project-scratch-def.json file when you click OK to create the scratch org. The one notable omission in that behavior is support for the new org preferences format which will be coming soon. Having said that, this does enable team sharing of scratch org definitions via version control, and a large number of IC users are doing just that successfully.

    As for dev hubs, you're correct that right now IC doesn't include the ability to auth into a dev hub. That will also be coming soon, along with general OAuth support enabled via the SFDX CLI.

  3. George Doenlen reporter

    Thanks Scott, I always appreciate your work.

    I still can't create an org because of missing features. Is there anyway to choose an existing scratch org?

    Capture.PNG

  4. Scott Wells repo owner

    That just looks like a bug, George, and one that needs to be fixed. Have you found any other such missing features? I always try to catch up with the latest features in each release as they come out based on the release notes, but it appears perhaps I missed one...or perhaps this is a Spring '19 feature?

    I can issue a patch with the missing features, but not likely until tomorrow morning. In the interim you'd need to create this org from outside of the IDE, and then I'll make it so that you can create/manage it from within the IDE as soon as I can.

  5. George Doenlen reporter

    I don't believe ProcessBuilder or Workflow is a Spring 19 feature, I've been using them since before the pre-release of Spring 19. I know that not all features/settings are listed under the docs page for definition files. I have a decent amount of settings that aren't listed. I can link my definition file, but I'm not sure how much it would really help.

    I'm not sure if you want to stick strictly to enums for when someone chooses a file directly, but maybe you should just hand off the path to the file to the cli and let it handle the error handling of the file? Using sfdx force:org:create -f path/to/file.json --json should respond with proper errors in stderr or stdout, depending on the sfdx version, if its not correct. (I do this for a gui I'm working on).

    Thanks for all the help Scott!

  6. Scott Wells repo owner

    Yeah, I was thinking the same thing. The enums do provide some additional validation, but if they're not correct/up-to-date, it cripples the feature. I'll take a look at how I might make that more flexible.

    The CLI is definitely the final arbiter of what works and what doesn't. IC runs every sfdx command with --json for an API-style integration. In this case the "dry run" validation is getting in the way so that it never makes it to the CLI for the final pass.

    Let me see what I can do as part of this bug fix, and of course as part of adding support for new-style features flags.

  7. Scott Wells repo owner

    Thanks again for bringing this to my attention, George. I have no idea how I somehow got so behind on the feature updates. Obviously there are some in there now that are parameterized and would never work as an enum alone, e.g., AddCustomApps, AddCustomTabs, etc. I'll definitely need to rework this a bit very shortly. For the moment I've added the missing ones that aren't parameterized so that they'll be available. That obviously includes ProcessBuilder as well as a few others. I'll get that into the next build minimally with the rework to handle the parameterized ones and to be more forgiving for new/missing ones than it is now.

  8. Scott Wells repo owner

    Hi, Thomas. Yes, I will be adding support for scratch org settings soon...perhaps over the weekend...we'll see how things shake out. I will retain support for org preferences since they'll be deprecated but not removed, but both will be available.

  9. Scott Wells repo owner

    Partial fix delivered in 2.0.5.0 and 1.8.4.5. The missing simple feature flags have been added. In the next build I'll include support for the parameterized feature flags and, either in that build or one VERY soon after, I'll include support for org settings.

  10. Scott Wells repo owner

    1.8.4.6 and 2.0.5.1 released with support for parameterized features and scratch org settings (as well as org preferences).

  11. Christopher Matos

    @RoseSilverSoftware could you add something to make it more clear that the user is able to open a project scratch def file? I found the UI for creating a scratch org to be confusing in that respect, since the open file dialog is next to Org Name. I'd like to see it as its own line under a label such as "Project Scratch Definition File"

  12. Scott Wells repo owner

    FYI, I made some UX updates to the new scratch org dialog a bit back. It should be much more obvious now that you can load an existing scratch org def, and it no longer forces you to save a scratch org def.

  13. Log in to comment