Make app configuration fields editable
Make the app configuration editable, field by field
We want to be able to edit each field in the app, except the version number! The fields should pass through the app validation, that is found in the App.js model. Find it here: js/models/App.js. If it doesn't pass it should show an error. Look at how we do it in the FormGroupComponent.jsx#L43 which is used by the NewAppModalComponent.jsx.
There should also be an edit button introduced to the UI, so the user is aware that they can edit the fields.
It should end up looking something like this:

+1
Any updates on this? (@ksmth) It would be a very nice feature, and I'm surprised that it's not already possible to edit an application in Marathon as you can add a application.. So if you were to add an application through the web ui you wouldn't be able to change it later as you don't have the json file definition.
It would be nice to just edit the JSON file directly from Marathon actually.
Hi @hermansc!
We are currently in the middle of making some core structural changes in the Marathon UI project. You can follow along here on process and priorities: https://waffle.io/mesosphere/marathon?label=gui
I can see that it is currently labelled Backlog, which means it is not included in current sprint.
@pierlo-upitup @aquamatthias What is the priority of this task?
@mlunoe @hermansc
Thanks for the suggestion, we are going to evaluate this task and hopefully plan it in our next sprint
:+1:
@aatumanova I personally think that the best solution in this case would be to reuse the New App modal dialog (as seen here https://github.com/mesosphere/marathon/issues/124#issuecomment-73951548 ) with the fields pre-populated, and let the user modify the values. This is especially convenient when take into account the new UI components that are going to be needed for the Docker configurations. Do you agree?
I think this makes sense! This is a familiar place for creating, and should therefore also be for changing/updating, configurations of an app.
I wonder if we should also consider a different approach here, closer to @mlunoe's initial idea.
What if we allowed editing the JSON app definition directly by means of an ace-editor textarea instead? The main benefit I see over pulling up the modal dialog is that advanced users can modify/add any supported field, even those that are not (yet) in the graphical form.
Please share your thoughts on this @air @mlunoe @philipnrmn
A JSON editor would be cool, and I would probably use it in preference to a form editor. I don't know how representative I am of our users though, so I'd be hesitant to offer it to the exclusion of a more constrained form.
I do think that in the long term we should avoid using the modal as an edit mode (although I agree it's a good first step). In-place edit is just a whole lot friendlier.
In-place edit is just a whole lot friendlier.
@philipnrmn you mean in-place as in "inside the form" or as a reference to @mlunoe's original idea (see top of issue)
I mean something similar to @mlunoe 's suggestion, yeah - click on a field from the read-only view and it becomes editable.
The problem I see with that approach is that
- it limits the user in what can be actually modified (can't add fields)
- we would need to come up with new UIs for key-value field definitions (think dropdowns, paired attributes, validation)
All in all I tend to favor the modal editor, or the JSON editor. In-place seems to create more problems than it solves, imho.
I agree that it introduces a lot of complexity and that in the short term the modal is the perfect fix.
It's just that I don't think that either the modal or the JSON editor are really intuitive because it forces the user to relocate the field they want to edit. In the long term I'd like to see us move towards something like in-place editing on each field.
We have discussed the ace-editor and I think that is still a very good idea, but it serves, as @philipnrmn implies, different users - i.e. advanced users. Take a look here: https://github.com/mesosphere/marathon/issues/124#issuecomment-42603211
The app creation flow should be a guided flow for new and unexperienced users, that is getting to know Marathon. Maybe I was a little fast going with the idea of taking the user back to the original form: Looking at solutions out there, for small textual edits, usually the edit-in-place pattern is used. Here are some examples:

Also see Twitters profile page (click edit).
I would say that for most quick edits the in-place-editing will be much more usable. And yes will need to keep this up-to-date as configuration grows and changes, however only selected items. And for the more advanced edits, the ace-editor will be a good consistent solution, imo.
Mmh, thanks for the input @mlunoe, however I am not really comfortable with the idea of having to deal with duplicate effort each time we need to add a new section to the modal form. Also as I said, it's not the simple input fields that scare me, but the complex duplicable rows/section-specific elements.
My final suggestion is we implement the editing via the same New App modal, and evaluate the advanced mode ace-editor as a "tab" in the modal, that could be used for both creation and editing of an app definition.
Summon @air @ashenden @aatumanova for a final go.
I am suggesting only having the simple non-complex fields as in-place-editing fields, only have the main flow covered in the app creation form, and for everything else defer to the ace-editor. In that way, for the most part we shouldn't have to make big changes, we handle the user experience gracefully, and if something should change it should only concern very limited fields, i.e. the ones that we select to display in the app creation form and the configuration fields
Oh thanks for the clarification @mlunoe – I think you are right then, that could be a nice compromise. :+1:
My points to that proposal:
- The idea of in place json editing is cool - but should be discussed in another issue and is no solution to this issue.
- The edit dialog should have exactly the same possibilities as the create dialog
- changing values
- adding/removing items (env variables etc.)
- Please keep in mind that every change to an application will effect in a new version and a restart of all tasks (deployment usually run for minutes or hours ).
- it must be possible to change several fields as one change
- there should be a clear "deploy" or "update" button, to make the effect crystal clear
Here are my thoughts, too.. :) It's a mix up of things already said here.
- JSON editing is cool, you will be able to do copy&paste of a complete configuration. But it's a completely different issue to me for advanced or power users. We should expose an own button or tab in the modal for this and develop this as another feature.
- We should reuse the AppModal for now, reachable by an edit button and have in mind all the things @aquamatthias said to make the effects clear. The reasons for this were said by @pierlo-upitup and @aquamatthias and I think the user knows the dialog already from the app creation process.
-
Good points @aquamatthias. I think we should go with the Twitter profile page model, i.e. have an edit/save button. This way we will only create one update per save, and not per edit.
-
Unlike @aldipower I think it is more user friendly to be able to edit in place. And yes I agree with @aquamatthias that the same selected fields should be exposed in the app creation form and here, however only the editable fields in the latter.
The argument for me to go against being taken back to the form is that this feels much more cumbersome, akin to being taken to back to the profile creation flow, as opposed to just enabling the user to change editable fields in place.
-
Finally, yes the ace-editor is a separate issue, but it affects the decision we make here. This is why it is being discussed and mentioned here. I do refer to the relevant issue further up, if we need to discuss an editor specific solution.