Commit e636e3fe authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'jira-connect-app-style-cleanup' into 'master'

Improve Jira Connect app styling and translations

See merge request gitlab-org/gitlab!53441
parents 91f6d0b0 9e6988f9
...@@ -60,15 +60,15 @@ export default { ...@@ -60,15 +60,15 @@ export default {
<template> <template>
<div> <div>
<gl-alert v-if="errorMessage" class="gl-mb-6" variant="danger" :dismissible="false"> <gl-alert v-if="errorMessage" class="gl-mb-7" variant="danger" :dismissible="false">
{{ errorMessage }} {{ errorMessage }}
</gl-alert> </gl-alert>
<h2>{{ s__('JiraService|GitLab for Jira Configuration') }}</h2> <h2 class="gl-text-center">{{ s__('JiraService|GitLab for Jira Configuration') }}</h2>
<div <div
v-if="showNewUI" v-if="showNewUI"
class="gl-display-flex gl-justify-content-space-between gl-my-7 gl-pb-4 gl-border-b-solid gl-border-b-1 gl-border-b-gray-200" class="jira-connect-app-body gl-display-flex gl-justify-content-space-between gl-my-7 gl-pb-4 gl-border-b-solid gl-border-b-1 gl-border-b-gray-200"
> >
<h5 class="gl-align-self-center gl-mb-0" data-testid="new-jira-connect-ui-heading"> <h5 class="gl-align-self-center gl-mb-0" data-testid="new-jira-connect-ui-heading">
{{ s__('Integrations|Linked namespaces') }} {{ s__('Integrations|Linked namespaces') }}
......
...@@ -77,6 +77,7 @@ export async function initJiraConnect() { ...@@ -77,6 +77,7 @@ export async function initJiraConnect() {
Vue.use(GlFeatureFlagsPlugin); Vue.use(GlFeatureFlagsPlugin);
const { groupsPath, subscriptionsPath, usersPath } = el.dataset; const { groupsPath, subscriptionsPath, usersPath } = el.dataset;
AP.sizeToParent();
return new Vue({ return new Vue({
el, el,
......
...@@ -20,36 +20,23 @@ ...@@ -20,36 +20,23 @@
@import '@gitlab/ui/src/components/base/tooltip/tooltip'; @import '@gitlab/ui/src/components/base/tooltip/tooltip';
$atlaskit-border-color: #dfe1e6; $atlaskit-border-color: #dfe1e6;
$header-height: 40px;
.ac-content { .subscription-form {
margin: 20px; .field-group-input {
display: flex;
.subscription-form { padding-top: $gl-padding-4;
margin-bottom: 20px;
.field-group-input {
display: flex;
padding-top: $gl-padding-4;
.ak-button { .ak-button {
align-items: center; align-items: center;
height: auto; height: auto;
margin-left: $btn-margin-5; margin-left: $btn-margin-5;
}
} }
} }
} }
$header-height: 40px;
.jira-connect-header { .jira-connect-header {
border-bottom: 1px solid $gray-100;
display: flex;
align-items: center;
justify-content: center;
min-height: $header-height; min-height: $header-height;
padding-left: 16px;
padding-right: 16px;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
...@@ -57,7 +44,6 @@ $header-height: 40px; ...@@ -57,7 +44,6 @@ $header-height: 40px;
} }
.jira-connect-user { .jira-connect-user {
font-size: $gl-font-size;
position: fixed; position: fixed;
top: 10px; top: 10px;
right: 20px; right: 20px;
...@@ -65,20 +51,17 @@ $header-height: 40px; ...@@ -65,20 +51,17 @@ $header-height: 40px;
.jira-connect-app { .jira-connect-app {
margin-top: $header-height; margin-top: $header-height;
height: calc(100% - #{$header-height});
max-width: 1000px;
}
.jira-connect-app-body {
max-width: 600px; max-width: 600px;
min-height: 95vh;
padding-top: 48px;
padding-left: 16px;
padding-right: 16px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
text-align: center;
}
.gl-mt-5 {
margin-top: 16px;
} }
// for external_link buttons
svg { svg {
fill: currentColor; fill: currentColor;
...@@ -115,12 +98,3 @@ svg { ...@@ -115,12 +98,3 @@ svg {
} }
} }
} }
.empty-subscriptions {
color: $gray-900;
}
.browser-limitations-notice {
font-size: $gl-font-size;
margin-top: 32px;
}
%header.jira-connect-header %header.jira-connect-header.gl-display-flex.gl-align-items-center.gl-justify-content-center.gl-px-5.gl-border-b-solid.gl-border-b-gray-100.gl-border-b-1.gl-bg-white
= brand_header_logo = link_to brand_header_logo, Gitlab.config.gitlab.url, target: '_blank', rel: 'noopener noreferrer'
.jira-connect-user .jira-connect-user.gl-font-base
- if current_user - if current_user
- user_link = link_to(current_user.to_reference, jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in') - user_link = link_to(current_user.to_reference, jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in')
= _('Signed in to GitLab as %{user_link}').html_safe % { user_link: user_link } = _('Signed in to GitLab as %{user_link}').html_safe % { user_link: user_link }
- elsif @subscriptions.present? - elsif @subscriptions.present?
= link_to _('Sign in to GitLab'), jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in' = link_to _('Sign in to GitLab'), jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in'
.jira-connect-app %main.jira-connect-app.gl-px-5.gl-pt-7.gl-mx-auto
- if current_user.blank? && @subscriptions.empty? - if current_user.blank? && @subscriptions.empty?
%h2= s_('JiraService|GitLab for Jira Configuration') .jira-connect-app-body.gl-text-center
%p= s_('JiraService|Sign in to GitLab.com to get started.') %h2= s_('JiraService|GitLab for Jira Configuration')
%p= s_('JiraService|Sign in to GitLab.com to get started.')
.gl-mt-7 .gl-mt-7
- sign_in_button_class = new_jira_connect_ui? ? 'btn gl-button btn-confirm' : 'ak-button ak-button__appearance-primary' - sign_in_button_class = new_jira_connect_ui? ? 'btn gl-button btn-confirm' : 'ak-button ak-button__appearance-primary'
= external_link _('Sign in to GitLab'), jira_connect_users_path, class: "#{sign_in_button_class} js-jira-connect-sign-in" = external_link _('Sign in to GitLab'), jira_connect_users_path, class: "#{sign_in_button_class} js-jira-connect-sign-in"
.gl-mt-7 .gl-mt-7
%p Note: this integration only works with accounts on GitLab.com (SaaS). %p= s_('Integrations|Note: this integration only works with accounts on GitLab.com (SaaS).')
- else - else
.js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) } .js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) }
- unless new_jira_connect_ui? .jira-connect-app-body
%form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path } - unless new_jira_connect_ui?
.ak-field-group %form#add-subscription-form.subscription-form.gl-mb-5{ action: jira_connect_subscriptions_path }
%label .ak-field-group
GitLab namespace %label= _('GitLab namespace')
.ak-field-group.field-group-input .ak-field-group.field-group-input
%input#namespace-input.ak-field-text{ type: 'text', required: true, placeholder: 'e.g. "MyCompany" or "MyCompany/GroupName"' } %input#namespace-input.ak-field-text{ type: 'text', required: true, placeholder: 'e.g. "MyCompany" or "MyCompany/GroupName"' }
%button.ak-button.ak-button__appearance-primary{ type: 'submit' } %button.ak-button.ak-button__appearance-primary{ type: 'submit' }
Link namespace to Jira = s_('Integrations|Link namespace to Jira')
- if @subscriptions.present? - if @subscriptions.present?
%table.subscriptions.gl-w-full %table.subscriptions.gl-w-full
%thead %thead
%tr
%th Namespace
%th Added
%th
%tbody
- @subscriptions.each do |subscription|
%tr %tr
%td= subscription.namespace.full_path %th= _('Namespace')
%td= subscription.created_at %th= _('Added')
%td= link_to 'Remove', jira_connect_subscription_path(subscription), class: 'js-jira-connect-remove-subscription' %th
- else %tbody
%h4.empty-subscriptions - @subscriptions.each do |subscription|
No linked namespaces %tr
%p= s_('Integrations|Namespaces are your GitLab groups and subgroups that will be linked to this Jira instance.') %td= subscription.namespace.full_path
%td= subscription.created_at
%td= link_to _('Remove'), jira_connect_subscription_path(subscription), class: 'js-jira-connect-remove-subscription'
- else
.gl-text-center
%h4= s_('Integrations|No linked namespaces')
%p= s_('Integrations|Namespaces are your GitLab groups and subgroups that will be linked to this Jira instance.')
%p.browser-limitations-notice %p.jira-connect-app-body.gl-mt-7.gl-font-base.gl-text-center
%strong Browser limitations: %strong= s_('Integrations|Browser limitations')
Adding a namespace currently works only in browsers that allow cross‑site cookies. Please make sure to use - firefox_link_url = 'https://www.mozilla.org/en-US/firefox/'
%a{ href: 'https://www.mozilla.org/en-US/firefox/', target: '_blank', rel: 'noopener noreferrer' } Firefox - firefox_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: firefox_link_url }
or enable cross‑site cookies in your browser when adding a namespace. = s_('Integrations|Adding a namespace currently works only in browsers that allow cross‑site cookies. Please make sure to use %{firefox_link_start}Firefox%{firefox_link_end} or enable cross‑site cookies in your browser when adding a namespace.').html_safe % { firefox_link_start: firefox_link_start, firefox_link_end: '</a>'.html_safe }
= link_to _('Learn more'), 'https://gitlab.com/gitlab-org/gitlab/-/issues/284211', target: '_blank', rel: 'noopener noreferrer' = link_to _('Learn more'), 'https://gitlab.com/gitlab-org/gitlab/-/issues/284211', target: '_blank', rel: 'noopener noreferrer'
= webpack_bundle_tag 'performance_bar' if performance_bar_enabled? = webpack_bundle_tag 'performance_bar' if performance_bar_enabled?
......
...@@ -12,5 +12,4 @@ ...@@ -12,5 +12,4 @@
= Gon::Base.render_data(nonce: content_security_policy_nonce) = Gon::Base.render_data(nonce: content_security_policy_nonce)
= yield :head = yield :head
%body %body
.ac-content = yield
= yield
---
title: Improve Jira connect app styling and i18n
merge_request: 53441
author:
type: changed
...@@ -13756,6 +13756,9 @@ msgstr "" ...@@ -13756,6 +13756,9 @@ msgstr ""
msgid "GitLab metadata URL" msgid "GitLab metadata URL"
msgstr "" msgstr ""
msgid "GitLab namespace"
msgstr ""
msgid "GitLab project export" msgid "GitLab project export"
msgstr "" msgstr ""
...@@ -16051,12 +16054,18 @@ msgstr "" ...@@ -16051,12 +16054,18 @@ msgstr ""
msgid "Integrations|Add namespace" msgid "Integrations|Add namespace"
msgstr "" msgstr ""
msgid "Integrations|Adding a namespace currently works only in browsers that allow cross‑site cookies. Please make sure to use %{firefox_link_start}Firefox%{firefox_link_end} or enable cross‑site cookies in your browser when adding a namespace."
msgstr ""
msgid "Integrations|All details" msgid "Integrations|All details"
msgstr "" msgstr ""
msgid "Integrations|All projects inheriting these settings will also be reset." msgid "Integrations|All projects inheriting these settings will also be reset."
msgstr "" msgstr ""
msgid "Integrations|Browser limitations"
msgstr ""
msgid "Integrations|Comment detail:" msgid "Integrations|Comment detail:"
msgstr "" msgstr ""
...@@ -16096,6 +16105,9 @@ msgstr "" ...@@ -16096,6 +16105,9 @@ msgstr ""
msgid "Integrations|Issues created in Jira are shown here once you have created the issues in project setup in Jira." msgid "Integrations|Issues created in Jira are shown here once you have created the issues in project setup in Jira."
msgstr "" msgstr ""
msgid "Integrations|Link namespace to Jira"
msgstr ""
msgid "Integrations|Link namespaces" msgid "Integrations|Link namespaces"
msgstr "" msgstr ""
...@@ -16108,6 +16120,12 @@ msgstr "" ...@@ -16108,6 +16120,12 @@ msgstr ""
msgid "Integrations|No available namespaces." msgid "Integrations|No available namespaces."
msgstr "" msgstr ""
msgid "Integrations|No linked namespaces"
msgstr ""
msgid "Integrations|Note: this integration only works with accounts on GitLab.com (SaaS)."
msgstr ""
msgid "Integrations|Projects using custom settings will not be affected." msgid "Integrations|Projects using custom settings will not be affected."
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment