FEATURE: Adds a pop up that shows a more detailed score for reviewables (#8035)

If you click a (?) icon beside the reviewable status a pop up will
appear with expanded informatio that explains how the reviewable got its
score, and how it compares to system thresholds.
This commit is contained in:
Robin Ward
2019-09-04 09:56:25 -06:00
committed by GitHub
parent e90636eadc
commit bde0ef865f
17 changed files with 287 additions and 2 deletions

View File

@ -1,4 +1,5 @@
# frozen_string_literal: true
require_dependency 'reviewable_explanation_serializer'
class ReviewablesController < ApplicationController
requires_login
@ -102,6 +103,17 @@ class ReviewablesController < ApplicationController
)
end
def explain
reviewable = find_reviewable
render_serialized(
{ reviewable: reviewable, scores: reviewable.explain_score },
ReviewableExplanationSerializer,
rest_serializer: true,
root: 'reviewable_explanation'
)
end
def show
reviewable = find_reviewable