Merge lp://qastaging/~gz/launchpad/root_blog_feature_flag_939055 into lp://qastaging/launchpad

Proposed by Martin Packman
Status: Merged
Approved by: Martin Packman
Approved revision: no longer in the source branch.
Merged at revision: 15805
Proposed branch: lp://qastaging/~gz/launchpad/root_blog_feature_flag_939055
Merge into: lp://qastaging/launchpad
Diff against target: 194 lines (+90/-8)
5 files modified
lib/lp/app/browser/root.py (+9/-0)
lib/lp/app/browser/tests/test_launchpadroot.py (+64/-0)
lib/lp/app/stories/launchpad-root/front-pages.txt (+4/-2)
lib/lp/app/templates/root-index.pt (+7/-6)
lib/lp/services/features/flags.py (+6/-0)
To merge this branch: bzr merge lp://qastaging/~gz/launchpad/root_blog_feature_flag_939055
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+119399@code.qastaging.launchpad.net

Description of the change

Only display posts from the launchpad blog on the main page when the new app.root_blog.enabled feature is set. The aim is to easy the datacentre migration by having the option of toggling off the lookup when blog.launchpad.net needs to taken down.

This is something of an abuse of the feature flags... feature, but Robert suggested it as the easiest method in the bug.

To prevent gaping whitespace in the left column, the logic for whether or not to display the launchpad introduction is adapted from always being off for logged in users to being on regardless if the blog isn't being shown.

The tests added are not exhaustive as they're expensive at this level, but should cover the details we care about.

= LOC =

I have some credit to burn...

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/app/browser/root.py
  lib/lp/app/browser/tests/test_launchpadroot.py
  lib/lp/app/templates/root-index.pt
  lib/lp/services/features/flags.py

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

The branch looks good.

The boolean expression in show_whatslaunchpad is sufficiently complex
that a comment giving the prose translation (as well as the motivation
for including the "what is" section when the blog is disabled) would be
a good idea.

review: Approve (code)
Revision history for this message
Martin Packman (gz) wrote :

Added explanation to the docstring on that suggestion, also suppressed a few of the links shown when logged in that are duplicated from the intro if that's being displayed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.