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 1809797: In-Context No Application Fix #4615

Conversation

andrewballantyne
Copy link
Contributor

@andrewballantyne andrewballantyne commented Mar 3, 2020

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

Analysis / Root cause:
The issue was that when an application is provided while doing in-context it set the application selector in the secondary masthead. However, if you didn't pass an application the logic didn't assume "no application" it failed to load up an in-context scenario and just defaulted to the normal flow of the add-screen.

Solution Description:
Specify specifically we want a no-application. This is unique path because there is no "no application" in the secondary masthead's application selector.

Screen shots / Gifs for design review:
cc @openshift/team-devconsole-ux
in-context_no-application

in-context_same-application

in-context_new-application

Unit test coverage report:
No change

Test setup:

  • Have a single app in your project
  • Drag the in-context connector off that application and drop it in an application or on the blank canvas

Trying to create a Knative Service as the target of an in-context action will cause this bug: https://issues.redhat.com/browse/ODC-3237

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

/kind bug

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 3, 2020
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dev-console Related to dev-console labels Mar 3, 2020
@andrewballantyne andrewballantyne changed the title In-Context No Application Fix Bug 1809797: In-Context No Application Fix Mar 3, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Mar 3, 2020
@openshift-ci-robot
Copy link
Contributor

@andrewballantyne: This pull request references Bugzilla bug 1809797, 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 1809797: In-Context No Application Fix

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.

@andrewballantyne
Copy link
Contributor Author

/cherry-pick release-4.4

@openshift-cherrypick-robot

@andrewballantyne: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.4

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
Copy link
Contributor

@andrewballantyne: This pull request references Bugzilla bug 1809797, 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 1809797: In-Context No Application Fix

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.

@andrewballantyne
Copy link
Contributor Author

/retest

@serenamarie125
Copy link
Contributor

@parvathyvr please review!

@parvathyvr
Copy link

@parvathyvr please review!
LGTM

Copy link
Contributor

@sahil143 sahil143 left a comment

Choose a reason for hiding this comment

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

@andrewballantyne This is not consistent with the dev catalog. If you right-click on graph and go to import from git you have context of Unaasigned but if you go to dev-catalog there is no application context. Any resource created through the builder image gets one of the selected application.

Screenshot from 2020-03-04 16-52-45

Previously, We decided to not have any context on graph right click. That's why dev-catalog and database option wasn't removed from there.

Copy link
Contributor

@sahil143 sahil143 left a comment

Choose a reason for hiding this comment

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

Similarly, while creating operator-backed , resource might have application by default.
Example Jaeger
Screenshot from 2020-03-04 16-56-24

@sahil143
Copy link
Contributor

sahil143 commented Mar 4, 2020

@andrewballantyne Pressing enter on the form redirects to the topology page. Notice that the Create button is disabled on the form and none of the field is filled.

Steps:

  1. Select Application from the application dropdown
  2. Drag connector on the graph and select any of the flow from the context menu
  3. Once on the form. Press enter. Notice It redirects you to the topology page.

DI-context

@andrewballantyne
Copy link
Contributor Author

@andrewballantyne Pressing enter on the form redirects to the topology page. Notice that the Create button is disabled on the form and none of the field is filled.

Steps:

  1. Select Application from the application dropdown
  2. Drag connector on the graph and select any of the flow from the context menu
  3. Once on the form. Press enter. Notice It redirects you to the topology page.

DI-context

Interesting... is this pre-existing? I'll check out and test once I get a moment.

@sahil143
Copy link
Contributor

sahil143 commented Mar 4, 2020

nit: I just want to confirm If this is correct. We have application selected in the disabled application dropdown and Unassigned filled in the Application(Unassigned is from In-context). Are we prioritizing Url Param over the application selected from the application dropdown?
Screenshot from 2020-03-04 21-26-34

@sahil143
Copy link
Contributor

sahil143 commented Mar 4, 2020

Interesting... is this pre-existing? I'll check out and test once I get a moment.

I tried on master as well. Not able to reproduce it on master. The only difference I see is that Application input field was not available on the form, Once we selected an application from the application dropdown.

@andrewballantyne
Copy link
Contributor Author

nit: I just want to confirm If this is correct. We have application selected in the disabled application dropdown and Unassigned filled in the Application(Unassigned is from In-context). Are we prioritizing Url Param over the application selected from the application dropdown?

I think it makes sense to prioritize the URL param... as how would one ever be able to do anything but deploy in the application they are selected on. The UX in the Topology would need to prevent them from dropping outside of their application in order to respect it.

Alternatively, I could reset it back to "all applications" for the life of the form (the logic when going from one application to another does retain the old one on completion).

@christianvogt
Copy link
Contributor

my mistake... added approval to wrong issue

@andrewballantyne
Copy link
Contributor Author

andrewballantyne commented Mar 4, 2020

Interesting... is this pre-existing? I'll check out and test once I get a moment.

I tried on master as well. Not able to reproduce it on master. The only difference I see is that Application input field was not available on the form, Once we selected an application from the application dropdown.

Interesting... I think this is pushing the "tab focus" to the Topology nav-bar item. If I modify the dom node and add "debugger" as the onclick... it triggers. Must be because of the additional action I am doing in the form that is pushing the context around.

I can reproduce this on master. I suspect you couldn't because you swapped branches, and webhook kicked and your page refreshed. This giving you an instance were you didn't click on Topology navbar item (this the focus not being left behind on it). Refreshing appears to get this same unreproducible result.

@sahil143
Copy link
Contributor

sahil143 commented Mar 4, 2020

Interesting... I think this is pushing the "tab focus" to the Topology nav-bar item. If I modify the dom node and add "debugger" as the onclick... it triggers. Must be because of the additional action I am doing in the form that is pushing the context around.

I can reproduce this on master. I suspect you couldn't because you swapped branches, and webhook kicked and your page refreshed. This giving you an instance were you didn't click on Topology navbar item (this the focus not being left behind on it). Refreshing appears to get this same unreproducible result.

@andrewballantyne Yes, I can reproduce it on master as well. Thanks 🙂

Copy link
Contributor

@sahil143 sahil143 left a comment

Choose a reason for hiding this comment

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

/lgtm

Verified locally, Works as expected.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, sahil143

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

@andrewballantyne
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 22df2d4 into openshift:master Mar 4, 2020
@openshift-ci-robot
Copy link
Contributor

@andrewballantyne: All pull requests linked via external trackers have merged. Bugzilla bug 1809797 has been moved to the MODIFIED state.

In response to this:

Bug 1809797: In-Context No Application Fix

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-cherrypick-robot

@andrewballantyne: #4615 failed to apply on top of branch "release-4.4":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	frontend/packages/dev-console/src/utils/application-utils.ts
Falling back to patching base and 3-way merge...
Auto-merging frontend/packages/dev-console/src/utils/application-utils.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/utils/application-utils.ts
Patch failed at 0001 In-Context No Application Fix

In response to this:

/cherry-pick release-4.4

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.

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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants