Resolve "Promote Issue/MR templates"
What does this MR do?
Are there points in the code the reviewer needs to double check?
It promotes Issue Templates through a drop-down window below the link. So on the new issue page, you will now have a dropdown instead of the direct link if all rules for showing promotions are fulfilled. The basic rules of how and what to show for promotions were already established & extensively reviewed here : gitlab-org/gitlab-ee!2540 This MR is following and applying the same patterns here.
Why was this MR needed?
To promote our awesome EE features to all the people who don't have them yet.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #2977 (closed)
Merge request reports
Activity
assigned to @timzallmann
@hazelyang + @mydigitalself : Here we go
- Its automatically aligning to the left (making it align to the actual word would get quite hard)
added frontend label
changed milestone to %10.0
Thanks @timzallmann !
A few comments:
- I noticed that the
line-height
of the button and the padding are different from our general buttons. Can you make them consistent? - Is it possible that the width of the content text is shorter than the current one? so it would not so close to
X
icon? - On my screen,
Read more
is in the next line, so it looks a little weird that it doesn't align to the left. Can we fix it?
- I noticed that the
@hazelyang: Thanks , done! Again the dropdown styles were bleeding through!
@hazelyang Here you go :
@iamphill Another one, tried to incorporate already the stuff we found before
assigned to @iamphill
- Resolved by Tim Zallmann
- Resolved by Tim Zallmann
- Resolved by Tim Zallmann
assigned to @timzallmann
- Good question about the templates, i also found no check in code (also not previous code). @mydigitalself has for sure more insight.
- I aligned it
- Also another one for @mydigitalself (Currently we don't show the use a template line in edit mode)
assigned to @iamphill
- Resolved by Tim Zallmann
assigned to @timzallmann
assigned to @iamphill
assigned to @timzallmann
added 632 commits
- 9ce01c7b...dd72822b - 626 commits from branch
master
- e8d3f756 - Implemented Issue Template Promotion + Spec
- c96a7263 - Fixed Trailing Whitespace
- 933917cd - Adapted based on UX Review Input
- a90eac99 - Adapted margin on the right
- cce06054 - Fixed it to no js solution + css
- 850bacd9 - Changed padding/margin setup
Toggle commit list- 9ce01c7b...dd72822b - 626 commits from branch
assigned to @iamphill
enabled an automatic merge when the pipeline for 850bacd9 succeeds
mentioned in commit 509bcaaf
1 .help-block 2 = _('Add') 3 = link_to 'description templates', 'javascript:void(0);', id: 'promotion-issue-template-link', data: {toggle: 'dropdown'} 4 = _('to help your contributors communicate effectively!') @timzallmann apologies for the late feedback.
It would be great if this string was externalized with a namespace for context and interpolation so that the sentence can be translated as a whole.
It should probably look something like:
- promo_link = link_to 'description templates', 'javascript:void(0);', id: 'promotion-issue-template-link', data: {toggle: 'dropdown'} = (s_(IssuesTemplatePromotion|Add %{description_templates} to help your contributors communicate effectively!') % { description_templates: promo_link }).html_safe
Thanks!
30 30 merge request from being merged before it's ready. 31 31 32 32 - if no_issuable_templates && can?(current_user, :push_code, issuable.project) 33 %p.help-block 34 Add 35 = link_to 'description templates', help_page_path('user/project/description_templates'), tabindex: -1 36 to help your contributors communicate effectively! 33 - if show_promotions? 34 = render 'shared/promotions/promote_issue_templates' 35 - else 36 %p.help-block 37 Add @timzallmann it would be great if this was externalized too.
Edited by James Ramsay