Skip to content

Commit

Permalink
Merge pull request #5209 from alexgibson/bug-1405076-revert-quantum-l…
Browse files Browse the repository at this point in the history
…anding-page

[bug 1405076] Revert Firefox Quantum home page design
  • Loading branch information
Schalk Neethling committed Oct 17, 2017
2 parents 40ed985 + e8f6f04 commit 0f6a678
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 1,268 deletions.
170 changes: 0 additions & 170 deletions bedrock/firefox/templates/firefox/firefox-quantum.html

This file was deleted.

28 changes: 0 additions & 28 deletions bedrock/firefox/tests/test_views.py
Expand Up @@ -808,34 +808,6 @@ def test_get_context_data_one_star(self):
self.assertFalse('donate_stars_url' in ctx)


@override_settings(DEV=False)
@patch('bedrock.firefox.views.l10n_utils.render')
class TestFirefoxFeatures(TestCase):
@patch.object(views, 'lang_file_is_active', lambda *x: True)
@patch('bedrock.firefox.views.switch', Mock(return_value=True))
def test_new_firefox_page_loads_with_active_switch(self, render_mock):
view = views.FirefoxHubView()
view.request = RequestFactory().get('/firefox/')
view.request.locale = 'en-US'
eq_(view.get_template_names(), ['firefox/firefox-quantum.html'])

@patch.object(views, 'lang_file_is_active', lambda *x: True)
@patch('bedrock.firefox.views.switch', Mock(return_value=False))
def test_firefox_hub_page_loads_with_inactive_switch(self, render_mock):
view = views.FirefoxHubView()
view.request = RequestFactory().get('/firefox/')
view.request.locale = 'en-US'
eq_(view.get_template_names(), ['firefox/hub/home.html'])

@patch.object(views, 'lang_file_is_active', lambda *x: False)
@patch('bedrock.firefox.views.switch', Mock(return_value=True))
def test_firefox_hub_page_loads_with_inactive_locale(self, render_mock):
view = views.FirefoxHubView()
view.request = RequestFactory().get('/firefox/')
view.request.locale = 'fr'
eq_(view.get_template_names(), ['firefox/hub/home.html'])


@override_settings(DEV=False)
@patch('bedrock.firefox.views.l10n_utils.render')
class TestSyncPage(TestCase):
Expand Down
12 changes: 1 addition & 11 deletions bedrock/firefox/views.py
Expand Up @@ -753,17 +753,7 @@ class FirefoxHubView(BlogPostsView):
blog_posts_template_variable = 'articles'
blog_slugs = 'firefox'
blog_tags = ['home']

def get_template_names(self):
locale = l10n_utils.get_locale(self.request)

if switch('firefox-57-release') and lang_file_is_active(
'firefox/firefox-quantum', locale):
template_name = 'firefox/firefox-quantum.html'
else:
template_name = 'firefox/hub/home.html'

return [template_name]
template_name = 'firefox/hub/home.html'


def FirefoxProductDeveloperView(request):
Expand Down
16 changes: 0 additions & 16 deletions bedrock/settings/static_media.py
Expand Up @@ -576,12 +576,6 @@
),
'output_filename': 'css/firefox-quantum-bundle.css',
},
'firefox-quantum-landing': {
'source_filenames': (
'css/firefox/quantum-landing.scss',
),
'output_filename': 'css/firefox_quantum_landing-bundle.css',
},
'firefox_releases_index': {
'source_filenames': (
'css/base/menu-resp.less',
Expand Down Expand Up @@ -1394,16 +1388,6 @@
),
'output_filename': 'js/firefox-quantum-bundle.js',
},
'firefox-quantum-landing': {
'source_filenames': (
'js/libs/jquery.cycle2.min.js',
'js/libs/jquery.waypoints.min.js',
'js/libs/jquery.waypoints-sticky.min.js',
'js/hubs/sub-nav.js',
'js/firefox/quantum-landing.js',
),
'output_filename': 'js/firefox_quantum_landing-bundle.js',
},
'firefox_interest_dashboard': {
'source_filenames': (
'js/base/mozilla-accordion.js',
Expand Down
44 changes: 0 additions & 44 deletions media/css/firefox/components/_buttons.scss

This file was deleted.

0 comments on commit 0f6a678

Please sign in to comment.