gitlab-org--gitlab-foss/app/assets/javascripts
Fatih Acet 88fa5916ff Merge branch '22343-honor-user-fixed-layout-pref' into 'master'
Ensure the 'fixed layout' preference is honored whenever possible

## What does this MR do?

Currently, when viewing any Merge Request the user's fixed-layout preference is overridden if they have set "Side-by-Side" view as their preference when viewing diffs.  This makes sense if they are currently viewing a diff, but this is confusing when their layout preference is overridden while they are on another tab (i.e. "Discussion" or "Builds").

This MR moves all responsibility for overriding the fixed layout from the Ruby page layout helper into frontend JavaScript where it is only applied when needed.

## Are there points in the code the reviewer needs to double check?

Check that nothing broke for users which have their layout preference set to "Fluid" as well as those which have it set to "Fixed".  I've already done this but double checking is always good idea 😄.

## Screenshots (if relevant)

![side-by-side-toggle-fixed](/uploads/033dc73e70b73da5692b75606733c938/side-by-side-toggle-fixed.gif)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Closes #22343 

## Other Notes

As @lbennett noted in #22343, this is something of a band-aid.  It fixed most of the issue, but we still need to have a discussion about whether or not is acceptable to override user layout preferences for "Side-by-Side" views in general.  At least this MR limits the scope of this behavior to a single tab within an MR or merge conflict page.

See merge request !6422
2016-10-04 11:58:15 +00:00
..
behaviors Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
blob Combine requestFileSuccess arguments into opts 2016-10-03 12:16:02 -04:00
blob_edit Review changes 2016-10-01 00:01:47 +03:00
boards Fixed issue boards loading issues on large screens 2016-09-13 11:27:16 +01:00
commit Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
diff_notes Pass the full project path for resolve buttons 2016-09-21 10:07:24 +01:00
extensions Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
graphs Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
lib Merge branch 'issue-boards-filter-label-spaces' into 'master' 2016-09-26 21:35:11 +00:00
network Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
profile Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
snippet Don't use global variables. 2016-08-18 21:48:11 +01:00
templates Combine requestFileSuccess arguments into opts 2016-10-03 12:16:02 -04:00
u2f Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
users Replace contributions calendar timezone payload with dates 2016-09-16 14:38:59 -05:00
abuse_reports.js.es6 Update abuse_reports.js.es6 with prettier window.gl assignment 2016-08-24 11:25:06 +00:00
activities.js Remove redundant js-timeago-pending from user activity log 2016-08-31 11:20:48 -05:00
admin.js
api.js Stop putting private tokens in Gon 2016-09-19 12:27:37 +01:00
application.js make sure split-view diff discussions are made visible by "toggle comments" button 2016-09-29 13:41:27 +03:00
aside.js
autosave.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
awards_handler.js Added @zeivs changes to fix awards search, including CHANGELOG where he is credited 2016-09-27 00:16:39 +03:00
breakpoints.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
broadcast_message.js
build.js Now anchors to the top or bottom of the build trace with the correct offset 2016-09-09 21:22:18 +01:00
build_artifacts.js
build_variables.js.es6 add feature test 2016-09-06 14:42:43 +02:00
commit.js
commits.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
compare.js
compare_autocomplete.js Changed compare dropdowns to dropdowns with isolated search input 2016-09-27 20:37:13 +01:00
confirm_danger_modal.js
copy_to_clipboard.js Fix tooltip for Copy to clipboard button. 2016-09-29 21:48:11 -05:00
create_label.js.es6 Removed underscorejs from create label class 2016-08-17 17:17:39 +01:00
cycle-analytics.js.es6 Set cookie path for cycle analytics cookie. 2016-09-23 15:07:54 +03:00
diff.js ensure the 'fixed layout' preference is honored whenever possible 2016-09-20 00:51:00 -05:00
dispatcher.js Merge remote-tracking branch 'origin/master' into 21170-cycle-analytics 2016-09-20 14:48:13 +05:30
dropzone_input.js
due_date_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
files_comment_button.js Added unfold test to parallel and added 'diff discussion' context 2016-08-23 20:45:29 +01:00
flash.js
gfm_auto_complete.js.es6 Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
gl_dropdown.js Added checks for field before field.length and removed unneeded fieldName 2016-09-20 23:00:37 +01:00
gl_form.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
group_avatar.js
groups.js
groups_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
importer_status.js fix indent in JS file 2016-09-20 12:10:35 +02:00
issuable.js.es6 Intercept issues search form submit to preserve filters. 2016-09-22 11:19:18 +02:00
issuable_context.js
issuable_form.js Move to project dropdown with infinite scroll for better performance 2016-08-18 15:31:51 +02:00
issue.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
issue_status_select.js
issues-bulk-assignment.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
LabelManager.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
labels.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
labels_select.js Send ajax request for label update only if they are changed (#19472 !5071) 2016-09-27 10:23:15 -05:00
layout_nav.js Doesnt run JS if active element doesnt exist 2016-09-16 13:52:06 +01:00
line_highlighter.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
logo.js Minor code refactor for inlining functions. 2016-08-30 08:02:29 +03:00
member_expiration_date.js Don’t add events in loop 2016-08-18 19:41:18 -05:00
merge_conflict_data_provider.js.es6 fix diff_view cookie path within merge conflict page 2016-09-20 00:51:00 -05:00
merge_conflict_resolver.js.es6 ensure the 'fixed layout' preference is honored whenever possible 2016-09-20 00:51:00 -05:00
merge_request.js ensure the 'fixed layout' preference is honored whenever possible 2016-09-20 00:51:00 -05:00
merge_request_tabs.js ensure the 'fixed layout' preference is honored whenever possible 2016-09-20 00:51:00 -05:00
merge_request_widget.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
merged_buttons.js
milestone.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
milestone_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
namespace_select.js
new_branch_form.js
new_commit_form.js
notes.js Changed props to use strings 2016-09-21 10:19:47 +01:00
notifications_dropdown.js
notifications_form.js
pager.js
pipeline.js.es6 Remove index from pipeline toggles 2016-08-17 16:44:25 -05:00
preview_markdown.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
project.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
project_avatar.js
project_find_file.js Fix find file navigation links 2016-09-09 14:30:54 -05:00
project_fork.js
project_import.js
project_members.js Add MemberExpirationDate JS helper 2016-08-18 14:14:22 +01:00
project_new.js Refactored code to rely less on IDs that could change 2016-09-02 14:51:36 +01:00
project_select.js
project_show.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
projects_list.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
protected_branch_access_dropdown.js.es6 Set default label if user unselects the option from dropdown 2016-08-21 00:21:32 -05:00
protected_branch_create.js.es6 Toggle dropdown disabled attribute 2016-08-21 00:20:57 -05:00
protected_branch_dropdown.js.es6 Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
protected_branch_edit.js.es6 Remove unused attributes 2016-09-22 12:58:11 -05:00
protected_branch_edit_list.js.es6
right_sidebar.js use gitlab global root url as canonical base url for all javascript set cookies (closes #20435) 2016-08-24 22:11:28 -05:00
search.js
search_autocomplete.js Merge branch 'cs-inline-js-search' into 'master' 2016-09-27 09:47:34 +00:00
shortcuts.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
shortcuts_blob.js
shortcuts_dashboard_navigation.js
shortcuts_find_file.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
shortcuts_issuable.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
shortcuts_navigation.js Added keyboard shortcut to navigate to issue boards 2016-09-15 18:20:36 -04:00
shortcuts_network.js
sidebar.js.es6 Fixes sidebar navigation. 2016-10-03 12:38:21 +03:00
single_file_diff.js Updated diff toggle targets and added icon 2016-09-03 20:24:31 +01:00
snippets_list.js.es6 Convert SnippetsList to ES6 2016-09-05 17:38:20 +01:00
star.js
subscription.js
subscription_select.js
syntax_highlight.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
todos.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
tree.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
user.js.es6 removed null return - renamed 'placeTop' to 'placeProfileAvatarsToTop' 2016-09-01 14:51:53 -06:00
user_tabs.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
users_select.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
wikis.js
zen_mode.js Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00