diff options
author | Rémy Coutable <remy@rymai.me> | 2016-10-03 14:18:02 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-10-03 14:18:02 +0000 |
commit | c4a061a23e6a379fde8b2d8ecda6d124b22164c6 (patch) | |
tree | d432f0553e7f8a4cd1f58cbcafdb3c1afc04081a /lib | |
parent | dfb9cab828a11cf00522734d11c2472e8b540b5c (diff) | |
parent | 4a23d7f49150c9292f643b6f1c4fdb3494868de7 (diff) | |
download | gitlab-ce-c4a061a23e6a379fde8b2d8ecda6d124b22164c6.tar.gz |
Merge branch '22466-task-list-fork' into 'master'
Resolve "Task List Checkbox Alignment"
## What does this MR do?
Replace the unmaintained `task_list` gem with the `deckar01-task_list` fork
## Are there points in the code the reviewer needs to double check?
- I had to pin some dependencies in the fork to support `ruby < 2.2`, which added new version restrictions for 2 existing modules.
- I triggered a build after I removed the patch to show the test passed with the new gem, then I removed the test, because this behavior is tested in the gem's repo now.
## Why was this MR needed?
- The `task_list` patch was added with a comment that said it should be removed when merged upstream, but the repo got archived, so an upstream patch requires a fork.
- #22470 can't be patched without warnings due to the way `task_list` uses Ruby constants.
- There are additional outstanding `task_list` bugs that can be fixed once we switch to a fork.
## What are the relevant issue numbers?
- #22466
- #22470
- !6487
See merge request !6625
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/task_list_filter.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/banzai/filter/task_list_filter.rb b/lib/banzai/filter/task_list_filter.rb index 4efbcaf5c7f..9fa5f589f3e 100644 --- a/lib/banzai/filter/task_list_filter.rb +++ b/lib/banzai/filter/task_list_filter.rb @@ -2,29 +2,7 @@ require 'task_list/filter' module Banzai module Filter - # Work around a bug in the default TaskList::Filter that adds a `task-list` - # class to every list element, regardless of whether or not it contains a - # task list. - # - # This is a (hopefully) temporary fix, pending a new release of the - # task_list gem. - # - # See https://github.com/github/task_list/pull/60 - module ClassNamesFilter - def add_css_class(node, *new_class_names) - if new_class_names.include?('task-list') - # Don't add class to all lists - return - elsif new_class_names.include?('task-list-item') - super(node.parent, 'task-list') - end - - super(node, *new_class_names) - end - end - class TaskListFilter < TaskList::Filter - prepend ClassNamesFilter end end end |