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
Uncheck tag in CI/CD dialog doesn't work #4683
Comments
@mkralik3 unchecking the tag in that dialog simply means that you do not wish to tag for that environment when the save button is clicked. It does not mean that the integration is removed from that environment. |
@dhirajsb I understand but my point is that it doesn't work in actual UI as described. I see two issues (bugs) here: 1. Uncheck tag: 2. Remove tag: |
Ah, so the way that dialog works is that checks all available environments as default, whether they had been checked before. |
So I believe you should be able to untag. That functionality exists. |
@gashcrumb if an environment doesn't have a tag at all, I believe you get an empty value in the map. Perhaps you can use that as a hint to not select that environment by default? |
Regarding the second use case 'Remove Tag', the behavior is as expected. After removing the tag from one, it's still available to other integrations in Syndesis. |
@dhirajsb - If after removing a tag from one integration, it should still show up for other integrations. The current UX is definitely confusing because the trigger action is the kebab menu for a single integration. We probably need to move this dialogue to a higher level. |
@dongniwang yeah, the single dialog is actually doing two things at the same time, managing environment names, and tagging. |
So now it's possible:
So for now, I suggest disabling checkbox in the UI dialog when it is already checked because it doesn't anything at this time. For users, it will be much clearer. |
Working on a solution for this right now after a call with @dhirajsb and @gaughan. Expecting to have updated design by EOD tomorrow. FYI - @heiko-braun @paoloantinori @gashcrumb @riccardo-forina @elvisisking Would someone has the capacity to work on the UI update once the design is ready? |
@dongniwang the behavior at present is also incorrect, because clicking remove should delete the tag across integrations. I have created a PR #4705 to fix it on the backend. |
@gashcrumb are you able to fix the UI issue I mention in the comment above? |
@gashcrumb wonder whether the UI should wait until user clicks save before calling DELETE on |
@dhirajsb think that's why there's the prompt, i.e. click 'remove', we prompt 'are you sure' and then delete. If we want to defer doing the actual delete until the user clicks save then yeah, we'd need to indicate that in the list in some fashion. I don't think though that it's worth further complicating the current dialog at this stage though given we've an improved design to implement that separates out the management. |
Just wanted to summarize the latest discussion here:
|
@gashcrumb I was wondering about deselecting the check box that removes the tag from the integration, not the |
@dhirajsb Ah, gotcha. You know rather than having a separate DELETE operation that the UI has to call, you could fix the current API to accept the updated set of tags that the UI posts when the user unchecks things. For example right now on master if I create two environments "foo" and "bar", when you click save the UI posts:
to
Why do we need a separate |
I adjusted the URL used to delete environment names, but I suggest removing the separate delete endpoint for disassociating tags from an integration and instead work with the tag list the UI posts to sort this issue. |
@gashcrumb Can we consider it done? |
@heiko-braun no, I think we need to update the backend API to work with the data that the UI is posting in this comment. Something kinda has to be done anyways as currently when that API is used it's creating duplicate tags in #4755 |
ok, thanks. Sounds like more work is needed by @dhirajsb |
@gashcrumb since this API is for external CI/CD processes as well, I want to keep it generic and fine grained. I will add a |
Yep, that works, so post should look like: |
yeah, just testing it locally on the PR, should be ready in a few |
@gashcrumb I was thinking that it would be more elegant and RESTy to use PATCH and PUT instead of a POST with an extra parameter. But then the UI might not be able to use that in a form since only GET and POST are allowed. Is that correct? |
UI is just doing an XHR request, not a form submit so it can use anything. But honestly, from the outside my assumption was that this is just a setter for the whole array. It seems weird that I need to tell the API to behave that way with an extra boolean. And yeah, whatever method you want to use just let me know, honestly our API isn't really all that rest-y anyways. Or if you want it's just a matter of updating this code to use the relevant method function ( |
Sorry, updating the existing argument to |
…s not in the request list, fixed remove endpoint in UI
…s not in the request list, fixed remove endpoint in UI
@gashcrumb fixed the endpoint, changed the method to PUT, and fixed the environment Remove operation |
@gashcrumb can you approve PR #4783 after reviewing the UI changes I made? |
…s not in the request list, fixed remove endpoint in UI
…s not in the request list, fixed remove endpoint in UI
This is a...
Description
I have some tag (e.g. myTag) in first integration. I check this tag on second integration and save the dialog. When I want to uncheck the tag from the second integration, it doesn't work. When I open CI/CD dialog after unchecking, the tag is still checked.
When I click on Remove, the tag is unchecked.
Step to reproduce:
The text was updated successfully, but these errors were encountered: