diff --git a/CHANGELOG b/CHANGELOG index 422c6f07b15..78d717a709f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,26 @@ Please view this file on the master branch, on stable branches it's out of date. -v 8.3.0 (unreleased) +v 8.4.0 (unreleased) + - Implement new UI for group page + - Implement search inside emoji picker + - Add API support for looking up a user by username (Stan Hu) + - Add project permissions to all project API endpoints (Stan Hu) + - Expose Git's version in the admin area + - Add "Frequently used" category to emoji picker + - Add CAS support (tduehr) + - Add link to merge request on build detail page. + +v 8.3.2 (unreleased) + - Enable "Add key" button when user fills in a proper key + +v 8.3.1 + - Fix Error 500 when global milestones have slashes (Stan Hu) + - Fix Error 500 when doing a search in dashboard before visiting any project (Stan Hu) + - Fix LDAP identity and user retrieval when special characters are used + - Move Sidekiq-cron configuration to gitlab.yml + - Enable forcing Two-Factor authentication sitewide, with optional grace period + +v 8.3.0 - Bump rack-attack to 4.3.1 for security fix (Stan Hu) - API support for starred projects for authorized user (Zeger-Jan van de Weg) - Add open_issues_count to project API (Stan Hu) @@ -8,6 +28,8 @@ v 8.3.0 (unreleased) - Add button to automatically merge a merge request when the build succeeds (Zeger-Jan van de Weg) - Provide better diagnostic message upon project creation errors (Stan Hu) - Bump devise to 3.5.3 to fix reset token expiring after account creation (Stan Hu) + - Remove api credentials from link to build_page + - Deprecate GitLabCiService making it to always be inactive - Bump gollum-lib to 4.1.0 (Stan Hu) - Fix broken group avatar upload under "New group" (Stan Hu) - Update project repositorize size and commit count during import:repos task (Stan Hu) @@ -19,8 +41,10 @@ v 8.3.0 (unreleased) - Fix 500 error when update group member permission - Trim leading and trailing whitespace of milestone and issueable titles (Jose Corcuera) - Recognize issue/MR/snippet/commit links as references + - Backport JIRA features from EE to CE - Add ignore whitespace change option to commit view - Fire update hook from GitLab + - Allow account unlock via email - Style warning about mentioning many people in a comment - Fix: sort milestones by due date once again (Greg Smethells) - Migrate all CI::Services and CI::WebHooks to Services and WebHooks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7ced7c57889..950824e35ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -358,7 +358,7 @@ available at [http://contributor-covenant.org/version/1/1/0/](http://contributor [core team]: https://about.gitlab.com/core-team/ [getting help page]: https://about.gitlab.com/getting-help/ [Codetriage]: http://www.codetriage.com/gitlabhq/gitlabhq -[up-for-grabs]: https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name=up+for+grabs +[up-for-grabs]: https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name=up-for-grabs [medium-up-for-grabs]: https://medium.com/@kentcdodds/first-timers-only-78281ea47455 [ce-tracker]: https://gitlab.com/gitlab-org/gitlab-ce/issues [ee-tracker]: https://gitlab.com/gitlab-org/gitlab-ee/issues diff --git a/Gemfile b/Gemfile index 76b4759499e..db54bf2f186 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,7 @@ gem 'devise-async', '~> 0.9.0' gem 'doorkeeper', '~> 2.2.0' gem 'omniauth', '~> 1.2.2' gem 'omniauth-bitbucket', '~> 0.0.2' +gem 'omniauth-cas3', '~> 1.1.2' gem 'omniauth-facebook', '~> 3.0.0' gem 'omniauth-github', '~> 1.1.1' gem 'omniauth-gitlab', '~> 1.0.0' @@ -101,6 +102,9 @@ gem 'wikicloth', '0.8.1' gem 'asciidoctor', '~> 1.5.2' gem 'rouge', '~> 1.10.1' +# See https://groups.google.com/forum/#!topic/ruby-security-ann/aSbgDiwb24s +gem 'nokogiri', '1.6.7.1' + # Diffs gem 'diffy', '~> 3.0.3' @@ -168,7 +172,7 @@ gem 'd3_rails', '~> 3.5.5' gem "cal-heatmap-rails", "~> 0.0.1" # underscore-rails -gem "underscore-rails", "~> 1.4.4" +gem "underscore-rails", "~> 1.8.0" # Sanitize user input gem "sanitize", '~> 2.0' @@ -186,7 +190,7 @@ gem 'mousetrap-rails', '~> 1.4.6' # Detect and convert string character encoding gem 'charlock_holmes', '~> 0.7.3' -gem "sass-rails", '~> 4.0.5' +gem "sass-rails", '~> 5.0.0' gem "coffee-rails", '~> 4.1.0' gem "uglifier", '~> 2.7.2' gem 'turbolinks', '~> 2.5.0' @@ -198,9 +202,9 @@ gem 'font-awesome-rails', '~> 4.2' gem 'gitlab_emoji', '~> 0.2.0' gem 'gon', '~> 6.0.1' gem 'jquery-atwho-rails', '~> 1.3.2' -gem 'jquery-rails', '~> 3.1.3' +gem 'jquery-rails', '~> 4.0.0' gem 'jquery-scrollto-rails', '~> 1.4.3' -gem 'jquery-ui-rails', '~> 4.2.1' +gem 'jquery-ui-rails', '~> 5.0.0' gem 'nprogress-rails', '~> 0.1.6.7' gem 'raphael-rails', '~> 2.1.2' gem 'request_store', '~> 1.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 88c7a6e3424..4f4b10c0fb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -372,15 +372,16 @@ GEM inflecto (0.0.2) ipaddress (0.8.0) jquery-atwho-rails (1.3.2) - jquery-rails (3.1.4) - railties (>= 3.0, < 5.0) + jquery-rails (4.0.5) + rails-dom-testing (~> 1.0) + railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-scrollto-rails (1.4.3) railties (> 3.1, < 5.0) jquery-turbolinks (2.1.0) railties (>= 3.1.0) turbolinks - jquery-ui-rails (4.2.1) + jquery-ui-rails (5.0.5) railties (>= 3.2.16) json (1.8.3) jwt (1.5.2) @@ -420,7 +421,7 @@ GEM grape newrelic_rpm newrelic_rpm (3.9.4.245) - nokogiri (1.6.7) + nokogiri (1.6.7.1) mini_portile2 (~> 2.0.0.rc2) nprogress-rails (0.1.6.7) oauth (0.4.7) @@ -439,6 +440,10 @@ GEM multi_json (~> 1.7) omniauth (~> 1.1) omniauth-oauth (~> 1.0) + omniauth-cas3 (1.1.3) + addressable (~> 2.3) + nokogiri (~> 1.6.6) + omniauth (~> 1.2) omniauth-facebook (3.0.0) omniauth-oauth2 (~> 1.2) omniauth-github (1.1.2) @@ -643,12 +648,13 @@ GEM safe_yaml (1.0.4) sanitize (2.1.0) nokogiri (>= 1.4.4) - sass (3.2.19) - sass-rails (4.0.5) + sass (3.4.20) + sass-rails (5.0.4) railties (>= 4.0.0, < 5.0) - sass (~> 3.2.2) - sprockets (~> 2.8, < 3.0) - sprockets-rails (~> 2.0) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) sawyer (0.6.0) addressable (~> 2.3.5) faraday (~> 0.8, < 0.10) @@ -763,7 +769,7 @@ GEM uglifier (2.7.2) execjs (>= 0.3.0) json (>= 1.8.0) - underscore-rails (1.4.4) + underscore-rails (1.8.3) unf (0.1.4) unf_ext unf_ext (0.0.7.1) @@ -874,10 +880,10 @@ DEPENDENCIES html-pipeline (~> 1.11.0) httparty (~> 0.13.3) jquery-atwho-rails (~> 1.3.2) - jquery-rails (~> 3.1.3) + jquery-rails (~> 4.0.0) jquery-scrollto-rails (~> 1.4.3) jquery-turbolinks (~> 2.1.0) - jquery-ui-rails (~> 4.2.1) + jquery-ui-rails (~> 5.0.0) kaminari (~> 0.16.3) letter_opener (~> 1.1.2) mail_room (~> 0.6.1) @@ -888,11 +894,13 @@ DEPENDENCIES net-ssh (~> 3.0.1) newrelic-grape newrelic_rpm (~> 3.9.4.245) + nokogiri (= 1.6.7.1) nprogress-rails (~> 0.1.6.7) oauth2 (~> 1.0.0) octokit (~> 3.7.0) omniauth (~> 1.2.2) omniauth-bitbucket (~> 0.0.2) + omniauth-cas3 (~> 1.1.2) omniauth-facebook (~> 3.0.0) omniauth-github (~> 1.1.1) omniauth-gitlab (~> 1.0.0) @@ -928,7 +936,7 @@ DEPENDENCIES rubocop (~> 0.35.0) ruby-fogbugz (~> 0.2.1) sanitize (~> 2.0) - sass-rails (~> 4.0.5) + sass-rails (~> 5.0.0) sdoc (~> 0.3.20) seed-fu (~> 2.3.5) select2-rails (~> 3.5.9) @@ -957,7 +965,7 @@ DEPENDENCIES tinder (~> 1.10.0) turbolinks (~> 2.5.0) uglifier (~> 2.7.2) - underscore-rails (~> 1.4.4) + underscore-rails (~> 1.8.0) unf (~> 0.1.4) unicorn (~> 4.8.2) unicorn-worker-killer (~> 0.4.2) diff --git a/VERSION b/VERSION index 8d0676ff07b..ce669730119 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.0.pre +8.4.0.pre diff --git a/app/assets/images/emoji.png b/app/assets/images/emoji.png new file mode 100644 index 00000000000..a8ad7b6eab6 Binary files /dev/null and b/app/assets/images/emoji.png differ diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 1539eba0faa..affab5bb030 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -5,7 +5,7 @@ # the compiled file. # #= require jquery -#= require jquery.ui.all +#= require jquery-ui #= require jquery_ujs #= require jquery.cookie #= require jquery.endless-scroll diff --git a/app/assets/javascripts/awards_handler.coffee b/app/assets/javascripts/awards_handler.coffee index 3ff9ba77dfc..04bf5cc7bb5 100644 --- a/app/assets/javascripts/awards_handler.coffee +++ b/app/assets/javascripts/awards_handler.coffee @@ -1,12 +1,28 @@ class @AwardsHandler constructor: (@post_emoji_url, @noteable_type, @noteable_id, @aliases) -> + $(".add-award").click (event)-> + event.stopPropagation() + event.preventDefault() + $(".emoji-menu").show() + + $("html").click -> + if !$(event.target).closest(".emoji-menu").length + if $(".emoji-menu").is(":visible") + $(".emoji-menu").hide() + + @renderFrequentlyUsedBlock() + @setupSearch() addAward: (emoji) -> emoji = @normilizeEmojiName(emoji) @postEmoji emoji, => @addAwardToEmojiBar(emoji) + + $(".emoji-menu").hide() - addAwardToEmojiBar: (emoji, custom_path = '') -> + addAwardToEmojiBar: (emoji) -> + @addEmojiToFrequentlyUsedList(emoji) + emoji = @normilizeEmojiName(emoji) if @exist(emoji) if @isActive(emoji) @@ -17,7 +33,7 @@ class @AwardsHandler counter.parent().addClass("active") @addMeToAuthorList(emoji) else - @createEmoji(emoji, custom_path) + @createEmoji(emoji) exist: (emoji) -> @findEmojiIcon(emoji).length > 0 @@ -54,35 +70,39 @@ class @AwardsHandler resetTooltip: (award) -> award.tooltip("destroy") - # "destroy" call is asynchronous, this is why we need to set timeout. + # "destroy" call is asynchronous and there is no appropriate callback on it, this is why we need to set timeout. setTimeout (-> award.tooltip() ), 200 - createEmoji: (emoji, custom_path) -> + createEmoji: (emoji) -> + emojiCssClass = @resolveNameToCssClass(emoji) + nodes = [] nodes.push("
") - nodes.push("
") - nodes.push(@getImage(emoji, custom_path)) + nodes.push("
") + nodes.push("
1
") nodes.push("
") - nodes.push("
1") - nodes.push("
") - $(".awards-controls").before(nodes.join("\n")) + emoji_node = $(nodes.join("\n")).insertBefore(".awards-controls").find(".emoji-icon").data("emoji", emoji) $(".award").tooltip() - getImage: (emoji, custom_path) -> - if custom_path - $("").attr({src: custom_path, width: 20, height: 20}).wrap("
").parent().html() - else - $("li[data-emoji='" + emoji + "']").html() + resolveNameToCssClass: (emoji) -> + emoji_icon = $(".emoji-menu-content [data-emoji='#{emoji}']") + if emoji_icon.length > 0 + unicodeName = emoji_icon.data("unicode-name") + else + # Find by alias + unicodeName = $(".emoji-menu-content [data-aliases*=':#{emoji}:']").data("unicode-name") + + "emoji-#{unicodeName}" postEmoji: (emoji, callback) -> $.post @post_emoji_url, { note: { - note: ":" + emoji + ":" + note: ":#{emoji}:" noteable_type: @noteable_type noteable_id: @noteable_id }},(data) -> @@ -90,7 +110,7 @@ class @AwardsHandler callback.call() findEmojiIcon: (emoji) -> - $(".icon[data-emoji='" + emoji + "']") + $(".award [data-emoji='#{emoji}']") scrollToAwards: -> $('body, html').animate({ @@ -99,3 +119,46 @@ class @AwardsHandler normilizeEmojiName: (emoji) -> @aliases[emoji] || emoji + + addEmojiToFrequentlyUsedList: (emoji) -> + frequently_used_emojis = @getFrequentlyUsedEmojis() + frequently_used_emojis.push(emoji) + $.cookie('frequently_used_emojis', frequently_used_emojis.join(","), { expires: 365 }) + + getFrequentlyUsedEmojis: -> + frequently_used_emojis = ($.cookie('frequently_used_emojis') || "").split(",") + + frequently_used_emojis = ["thumbsup", "thumbsdown"].concat(frequently_used_emojis) + + _.compact(_.uniq(frequently_used_emojis)) + + renderFrequentlyUsedBlock: -> + frequently_used_emojis = @getFrequentlyUsedEmojis() + + ul = $("