Skip to content

Commit

Permalink
Remove responsive_layout feature flag
Browse files Browse the repository at this point in the history
Refs LA-489
flag=responsive_layout

We can merge this once the responsive_layout feature flag is turned on
for everyone in prod. It removes any code path that was only for if the
feature flag was off

Test plan:
* go to accounts/self/settings
* the feature flag for responsive_layout should not be there anymore
* resize your page to small
* it should show the mobile layout

Change-Id: I2428f6368aa13a271d07cfaef18c12fa2bff2f3e
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/220206
Tested-by: Service Cloud Jenkins <[email protected]>
Product-Review: Luis Oliveira <[email protected]>
Reviewed-by: Ed Schiebel <[email protected]>
QA-Review: Ed Schiebel <[email protected]>
  • Loading branch information
ryankshaw authored and Luis Oliveira committed Feb 22, 2022
1 parent 3afba87 commit 32846da
Show file tree
Hide file tree
Showing 20 changed files with 257 additions and 421 deletions.
6 changes: 0 additions & 6 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def js_env(hash = {}, overwrite = false)
files_domain: HostUrl.file_host(@domain_root_account || Account.default, request.host_with_port),
DOMAIN_ROOT_ACCOUNT_ID: @domain_root_account&.global_id,
k12: k12?,
use_responsive_layout: use_responsive_layout?,
use_rce_a11y_checker_notifications: @context.try(:feature_enabled?, :rce_a11y_checker_notifications),
help_link_name: help_link_name,
help_link_icon: help_link_icon,
Expand Down Expand Up @@ -418,11 +417,6 @@ def k12?
end
helper_method :k12?

def use_responsive_layout?
@domain_root_account&.feature_enabled?(:responsive_layout)
end
helper_method :use_responsive_layout?

def grading_periods?
!!@context.try(:grading_periods?)
end
Expand Down
3 changes: 1 addition & 2 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,9 @@ def direction(left_or_right)
end

def css_variant(opts = {})
variant = use_responsive_layout? ? "responsive_layout" : "new_styles"
use_high_contrast =
@current_user&.prefers_high_contrast? || opts[:force_high_contrast]
variant + (use_high_contrast ? "_high_contrast" : "_normal_contrast") +
"new_styles" + + (use_high_contrast ? "_high_contrast" : "_normal_contrast") +
(I18n.rtl? ? "_rtl" : "")
end

Expand Down
6 changes: 0 additions & 6 deletions app/stylesheets/base/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ body {
background: $ic-color-light;
font-weight: 300;

@if not $use_responsive_layout {
&:not(.is-inside-submission-frame):not(.embedded):not(.dashboard-is-planner) {
min-width: 768px;
}
}

&.no-headers, &.embedded {
#header, #topbar, #left-side, #breadcrumbs { display: none !important; }
.ic-app-nav-toggle-and-crumbs { display: none; }
Expand Down
21 changes: 6 additions & 15 deletions app/stylesheets/base/mixins/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,19 @@
}

@mixin desktop-only {
@if $use_responsive_layout {
@media (min-width: 768px) {
@content;
}
}
@else {
@media (min-width: 768px) {
@content;
}
}
@mixin mobile-only {
@if $use_responsive_layout {
@media (max-width: 767px) {
@content;
}
@media (max-width: 767px) {
@content;
}
}

@mixin lti-min-size {
@if $use_responsive_layout {
// 2 container paddings (same value) * 2 sides
@media (max-width: 320px + ($ic-sp * 4)) {
@content;
}
// 2 container paddings (same value) * 2 sides
@media (max-width: 320px + ($ic-sp * 4)) {
@content;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
*/

$use_high_contrast: true;
$use_responsive_layout: false;
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@
*/

$use_high_contrast: true;
$use_responsive_layout: false;
$direction: rtl;
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
*/

$use_high_contrast: false;
$use_responsive_layout: false;
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@
*/

$use_high_contrast: false;
$use_responsive_layout: false;
$direction: rtl;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 32846da

Please sign in to comment.