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

Bug 1830046: Helm redirects based on the origin of the action #5254

Merged
merged 1 commit into from May 6, 2020

Conversation

rohitkrai03
Copy link
Contributor

@rohitkrai03 rohitkrai03 commented Apr 30, 2020

Fixes: https://issues.redhat.com/browse/ODC-3676

Analysis / Root cause: The helm action forms like upgrade or rollback were not designed to redirect based on context of the origin of the action.

Solution Description: Added origin context to helm actions which is then used by the forms to redirect to correct origin of that action.

This PR also includes small changes suggested by UX in final designs like the order and label of Helm actions. It also updates upgrade form description.

Screen shots / Gifs for design review:
cc: @openshift/team-devconsole-ux @parvathyvr

Rollback -
Rollback Redirects

Upgrade -
Upgrade Redirects

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Apr 30, 2020
@openshift-ci-robot
Copy link
Contributor

@rohitkrai03: This pull request references Bugzilla bug 1830046, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1830046: Helm redirects based on the origin of the action

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2020
@openshift-ci-robot
Copy link
Contributor

@rohitkrai03: This pull request references Bugzilla bug 1830046, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1830046: Helm redirects based on the origin of the action

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@rohitkrai03: This pull request references Bugzilla bug 1830046, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1830046: Helm redirects based on the origin of the action

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rohitkrai03
Copy link
Contributor Author

/cc @parvathyvr @beaumorley

Copy link

@parvathyvr parvathyvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM..Thanks!

@karthikjeeyar
Copy link
Contributor

verified locally and works fine.
/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: beaumorley, karthikjeeyar, parvathyvr, rohitkrai03

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit d0e9c45 into openshift:master May 6, 2020
@openshift-ci-robot
Copy link
Contributor

@rohitkrai03: All pull requests linked via external trackers have merged: openshift/console#5254. Bugzilla bug 1830046 has been moved to the MODIFIED state.

In response to this:

Bug 1830046: Helm redirects based on the origin of the action

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@christianvogt
Copy link
Contributor

I find this approach sort of interesting.
@rohitkrai03 why not have the action capture the current url so that we can return to any page and therefore have a reusable action that doesn't require it to be parameterized? If the page is hit directly instead of via action, the fallback could simply be the details page (or some other page).

@rohitkrai03
Copy link
Contributor Author

rohitkrai03 commented May 6, 2020

@christianvogt You mean instead of action caller explicitly sending origin context as a parameter, the action should figure out the current URL itself and send that to the form? Currently the default is helm list page for all actions but we can change that to details page.

@christianvogt
Copy link
Contributor

@rohitkrai03
Yes. Why don't we capture the current URL and send it to the form.
Or, similar to our form cancel buttons which goes back in history (except we need to add some measures in place so that going back in history only occurs in the same domain).

@rohitkrai03
Copy link
Contributor Author

@christianvogt I did think about using history.goBack() like cancel buttons on the form but not all of our actions would work properly with that approach. The install action for instance needs to explicitly go to topology with pre-selected nodes information in the URL. For that we'll have to have proper conditional use cases in the code anyway. That's why I decided to make it more strict and explicit where the action is predefined with origin context. We can probably do the current URL in actions approach with a few checks and conditions in place for things like redirecting to topology with pre-selected nodes in case of install and in case of upgrade if the redirect URL is topology.

@christianvogt
Copy link
Contributor

@rohitkrai03 we may need to revisit this later as we will want all actions to be contributed through extensions. We may still contribute separate actions for different views, but ideally the same action be used everywhere when possible.

@spadgett spadgett added this to the v4.5 milestone May 11, 2020
@rohitkrai03 rohitkrai03 deleted the helm-redirects branch July 24, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants