css: Remove support for legacy desktop app.

We haven't seen significant traffic from the legacy desktop app in
over a year, and users using it get a warning to upgrade since last
summer, so it's probably OK to stop providing special fonts for it.
This commit is contained in:
Tim Abbott 2018-05-01 09:40:32 -07:00
parent 19b228bca4
commit d92edb8ea5
3 changed files with 1 additions and 49 deletions

View File

@ -29,12 +29,8 @@
</style>
{% if nofontface %}
{# We can't use @font-face on qtwebkit, so use differently minified CSS #}
{% stylesheet 'app-fontcompat' %}
{% else %}
{% stylesheet 'app' %}
{% endif %}
{{ minified_js('app', csp_nonce)|safe }}
{{ render_bundle('translations', attrs='nonce="%s"' % (csp_nonce)) }}

View File

@ -243,7 +243,6 @@ def home_real(request: HttpRequest) -> HttpResponse:
context={'user_profile': user_profile,
'page_params': JSONEncoderForHTML().encode(page_params),
'csp_nonce': csp_nonce,
'nofontface': is_buggy_ua(request.META.get("HTTP_USER_AGENT", "Unspecified")),
'avatar_url': avatar_url(user_profile),
'show_debug':
settings.DEBUG and ('show_debug' in request.GET),
@ -265,13 +264,3 @@ def apps_view(request: HttpRequest, _: str) -> HttpResponse:
if settings.ZILENCER_ENABLED:
return render(request, 'zerver/apps.html')
return HttpResponseRedirect('https://zulipchat.com/apps/', status=301)
def is_buggy_ua(agent: str) -> bool:
"""Discrimiate CSS served to clients based on User Agent
Due to QTBUG-3467, @font-face is not supported in QtWebKit.
This may get fixed in the future, but for right now we can
just serve the more conservative CSS to all our desktop apps.
"""
return ("Zulip Desktop/" in agent or "ZulipDesktop/" in agent) and \
"Mac" not in agent

View File

@ -896,39 +896,6 @@ PIPELINE = {
),
'output_filename': 'min/landing.css'
},
# Two versions of the app CSS exist because of QTBUG-3467
'app-fontcompat': {
'source_filenames': (
'third/bootstrap-notify/css/bootstrap-notify.css',
'third/spectrum/spectrum.css',
'third/thirdparty-fonts.css',
'generated/icons/style.css',
'node_modules/flatpickr/dist/flatpickr.css',
'node_modules/flatpickr/dist/plugins/confirmDate/confirmDate.css',
'styles/components.css',
'styles/app_components.css',
'styles/zulip.css',
'styles/alerts.css',
'styles/settings.css',
'styles/subscriptions.css',
'styles/drafts.css',
'styles/input_pill.css',
'styles/informational-overlays.css',
'styles/compose.css',
'styles/reactions.css',
'styles/left-sidebar.css',
'styles/right-sidebar.css',
'styles/lightbox.css',
'styles/popovers.css',
'styles/pygments.css',
'styles/media.css',
'styles/typing_notifications.css',
'styles/hotspots.css',
'styles/night_mode.css',
# We don't want fonts.css on QtWebKit, so its omitted here
),
'output_filename': 'min/app-fontcompat.css'
},
'app': {
'source_filenames': (
'third/bootstrap-notify/css/bootstrap-notify.css',