Merge lp:~jcsackett/launchpad/global-privacy-ribbon into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13614 |
Proposed branch: | lp:~jcsackett/launchpad/global-privacy-ribbon |
Merge into: | lp:launchpad |
Diff against target: |
381 lines (+118/-170) 7 files modified
lib/lp/app/javascript/privacy.js (+83/-91) lib/lp/app/templates/base-layout-macros.pt (+15/-10) lib/lp/bugs/javascript/bugtask_index.js (+13/-2) lib/lp/bugs/templates/bugcomment-index.pt (+0/-16) lib/lp/bugs/templates/bugtask-index.pt (+7/-18) lib/lp/code/templates/branch-index.pt (+0/-17) lib/lp/code/templates/branchmergeproposal-index.pt (+0/-16) |
To merge this branch: | bzr merge lp:~jcsackett/launchpad/global-privacy-ribbon |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+70327@code.launchpad.net |
Commit message
Moves the privacy ribbon template code into the base-layout, so that is now active and available on all private contexts.
Description of the change
Summary
=======
After doing a lot of work to add the privacy notification code to various templates, it became clear that it's better to lose a bit of flexability in order to have the notification automatically displayed for any private context.
To do this, the privacy notification code had to be moved to the base layout javascript macros, and the privacy notification functions had to be altered a bit to deal with being less flexible in their invocation.
Pre-implementation notes
=======
Initially proposed by William Grant. There were subsequent discussions on what exactly the tradeoffs would be with Curtis Hovey.
Implementation details
=======
lib/lp/
lib/lp/
-------
The base layout macros had the setup and display code added within a privacy feature flag. The javascript file was modified to remove the variable indicating whether or not the notification was enabled, as it's only in place at all if the feature flag is set. Some configuration was also removed, as the portlet-
lib/lp/
lib/lp/
lib/lp/
lib/lp/
-------
The templates have all had the individual setup and display calls removed.
Tests
=====
firefox lib/lp/
QA
==
Check all the various private contexts on Launchpad; with the flag set, they should be guarded by the new privacy notification. Without the flag, the ne new notification shouldn't appear. On public contexts, the notification should not display.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
134: Expected '!==' and instead saw '!='.
Lint will be cleaned before landing.
Thank you for this refactoring. I think this implementation is less prone to human error and certainly easier to maintain.