Merge lp:~sinzui/launchpad/disable-gmaps-0 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 11470 | ||||
Proposed branch: | lp:~sinzui/launchpad/disable-gmaps-0 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
560 lines (+149/-111) 11 files modified
lib/lp/registry/browser/__init__.py (+18/-0) lib/lp/registry/browser/person.py (+4/-2) lib/lp/registry/browser/team.py (+3/-2) lib/lp/registry/browser/tests/mailinglist-views.txt (+0/-54) lib/lp/registry/browser/tests/person-views.txt (+5/-0) lib/lp/registry/browser/tests/team-views.txt (+5/-0) lib/lp/registry/stories/location/personlocation.txt (+28/-7) lib/lp/registry/stories/location/team-map.txt (+34/-5) lib/lp/registry/stories/person/xx-person-home.txt (+46/-40) lib/lp/registry/templates/person-portlet-map.pt (+4/-0) lib/lp/registry/templates/team-portlet-map.pt (+2/-1) |
||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/disable-gmaps-0 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Review via email: mp+33971@code.launchpad.net |
Description of the change
This is my branch to disable Google maps.
lp:~sinzui/launchpad/disable-gmaps-0
Diff size: 467
Launchpad bug:
https:/
Test command: ./bin/test -vv \
-t personlocation, -t team-map -t xx-person-home
Pre-
Target release: 10.09
Disable Google maps
-------------------
Launchpad users who have enabled maps are seeing a popup stating that "the
Google Maps API server rejected your request". Google recognises this as a
problem with their service:
http://
Launchpad users can avoid the message by unchecking the "[X] Display map"
checkbox. If this problem persists, we will consider removing maps from
Launchpad until the issue is addresses.
Rules
-----
The small maps shown on user and team pages is governed in the view by
self.
This value is set by person visibility and the user's choice to enable/disable
maps. We can add a third condition that we can control per environment to
enable maps.
* Add a switch to enable/disable Google maps
* The switch should be easy to re-enable in any environment--
Sounds like a feature-flag.
QA
--
* Visit your profile page.
* Verify maps are not displayed, but you can visit the page to
set your timezone..
Lint
----
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/lp/
* Added a test to verify the map is not shown when the gmap2 feature
flag is not on. Revised a test to enable gmap2 so the test could
continue verifying the maps users see.
* Fixed long lines and headers.
* lib/lp/
* Added a test to verify the map is not shown when the gmap2 feature
flag is not on. Revised a test to enable gmap2 so the test could
continue verifying the maps users see.
* Fixed long lines and headers.
* lib/lp/
* Removed team test from person story...the team has its own story.
* Fixed long lines and headers.
Implementation
--------------
* lib/lp/
* Added MapMixin that provides access to the rudimentary feature flag.
This method can be refactored to use the real feature when it is
ready.
* lib/lp/
* Use MapMixin in PersonIndexView.
* lib/lp/
* Use MapMixin in TeamMapView.
* lib/lp/
* Added an edit icon so that the user can always edit his timezone.
* Do not show the map if gmap2 is not enabled.
* lib/lp/
* Do not show the map if gmap2 is not enabled.
439 "view/gmap2_ enabled" >
440 +
441 + <tal:gmap2 condition=
Looks like 2 lines of VWS there which isn't really needed - one would be plenty in the template.
You have my ok to merge & CP; ec2 land will bitch about this, so I'm going to not mark this as 'production- change' , and request that you self-tag that, to make the automation work.