Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1536)

Issue 7179049: When adding a relation, the service menu is shown.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 2 months ago by bac
Modified:
11 years, 2 months ago
Reviewers:
bcsaller, mp+144389
Visibility:
Public.

Description

When adding a relation, the service menu is shown. If adding a relation using the 'Build Relation' action from the service menu on the originating service, the click on the target service produces two events. The dragend event is handled properly and sets up the relation. Then the click event calls serviceClick. Attempts to use the stopPropagation, stopEvent, and preventDefault methods on the d3.event did not produce the desired results. This work-around is pretty hacky but it does work. A more general solution should be found. Also, attempts to change the test 'must be able to add a relation from the service menu' to simulate the click events and ensure the service menu was not left displayed did not work. This branch is submitted as is in an attempt to finish the last card blocking the charm announcement. https://code.launchpad.net/~bac/juju-gui/1102640/+merge/144389 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : When adding a relation, the service menu is shown. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -10 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M app/views/topology/relation.js View 2 chunks +8 lines, -10 lines 0 comments Download
M app/views/topology/service.js View 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 4
bac
Please take a look.
11 years, 2 months ago (2013-01-22 20:31:53 UTC) #1
benji
Looks good. https://codereview.appspot.com/7179049/diff/1/app/views/topology/service.js File app/views/topology/service.js (right): https://codereview.appspot.com/7179049/diff/1/app/views/topology/service.js#newcode293 app/views/topology/service.js:293: //d3.event.sourceEvent.preventDefault(); Commented code accidentally left in.
11 years, 2 months ago (2013-01-22 21:08:18 UTC) #2
bcsaller
LGTM, an unfortunate but needed work-around for the time being. Thanks. Could you also add ...
11 years, 2 months ago (2013-01-22 21:09:29 UTC) #3
bac
11 years, 2 months ago (2013-01-22 21:16:36 UTC) #4
*** Submitted:

When adding a relation, the service menu is shown.

If adding a relation using the 'Build Relation' action from the service menu
on the originating service, the click on the target service produces two
events.  The dragend event is handled properly and sets up the relation.  Then
the click event calls serviceClick.

Attempts to use the stopPropagation, stopEvent, and preventDefault methods on
the d3.event did not produce the desired results.

This work-around is pretty hacky but it does work.  A more general solution
should be found.

Also, attempts to change the test 'must be able to add a relation from the
service menu' to simulate the click events and ensure the service menu was not
left displayed did not work.

This branch is submitted as is in an attempt to finish the last card blocking
the charm announcement.

R=bcsaller
CC=
https://codereview.appspot.com/7179049
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b