From 7cb2dd55ce43a61c49b5ce390312cb3327ec565f Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Thu, 24 Oct 2019 17:49:18 +0200 Subject: [PATCH] Fixes from review --- server/sonar-web/public/images/alm/azure.svg | 3 + .../sonar-web/public/images/alm/bitbucket.svg | 10 ++ server/sonar-web/public/images/alm/github.svg | 3 + .../src/main/js/app/styles/init/tables.css | 12 ++ .../AlmDefinitionFormField.tsx | 22 +-- .../pullRequestDecoration/AzureFormModal.tsx | 14 +- .../AzureTabRenderer.tsx | 6 +- .../pullRequestDecoration/AzureTable.tsx | 20 ++- .../BitbucketFormModal.tsx | 26 +-- .../BitbucketTabRenderer.tsx | 6 +- .../pullRequestDecoration/BitbucketTable.tsx | 24 ++- .../pullRequestDecoration/GithubFormModal.tsx | 29 +-- .../GithubTabRenderer.tsx | 6 +- .../pullRequestDecoration/GithubTable.tsx | 50 ++++-- .../PRDecorationTabs.tsx | 13 +- .../__tests__/AlmDefinitionFormField-test.tsx | 5 +- .../AlmDefinitionFormField-test.tsx.snap | 5 +- .../AzureFormModal-test.tsx.snap | 46 ++--- .../AzureTabRenderer-test.tsx.snap | 39 ++-- .../__snapshots__/AzureTable-test.tsx.snap | 25 ++- .../BitbucketFormModal-test.tsx.snap | 88 ++++------ .../BitbucketTabRenderer-test.tsx.snap | 39 ++-- .../BitbucketTable-test.tsx.snap | 30 ++-- .../GithubFormModal-test.tsx.snap | 114 ++++-------- .../GithubTabRenderer-test.tsx.snap | 39 ++-- .../__snapshots__/GithubTable-test.tsx.snap | 45 +++-- .../PRDecorationTabs-test.tsx.snap | 24 +-- .../PRDecorationBinding.tsx | 43 ++--- .../PRDecorationBindingRenderer.tsx | 62 +++++-- .../__tests__/PRDecorationBinding-test.tsx | 117 ++++++------ .../PRDecorationBindingRenderer-test.tsx | 9 +- .../PRDecorationBinding-test.tsx.snap | 2 - .../PRDecorationBindingRenderer-test.tsx.snap | 166 +++++++++++------- .../src/main/js/apps/settings/utils.ts | 7 - .../src/main/js/types/alm-settings.ts | 7 +- .../resources/org/sonar/l10n/core.properties | 36 ++-- 36 files changed, 639 insertions(+), 553 deletions(-) create mode 100644 server/sonar-web/public/images/alm/azure.svg create mode 100644 server/sonar-web/public/images/alm/bitbucket.svg create mode 100644 server/sonar-web/public/images/alm/github.svg diff --git a/server/sonar-web/public/images/alm/azure.svg b/server/sonar-web/public/images/alm/azure.svg new file mode 100644 index 00000000000..a4350954295 --- /dev/null +++ b/server/sonar-web/public/images/alm/azure.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/server/sonar-web/public/images/alm/bitbucket.svg b/server/sonar-web/public/images/alm/bitbucket.svg new file mode 100644 index 00000000000..984afdaa426 --- /dev/null +++ b/server/sonar-web/public/images/alm/bitbucket.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/server/sonar-web/public/images/alm/github.svg b/server/sonar-web/public/images/alm/github.svg new file mode 100644 index 00000000000..97c8f324e50 --- /dev/null +++ b/server/sonar-web/public/images/alm/github.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/server/sonar-web/src/main/js/app/styles/init/tables.css b/server/sonar-web/src/main/js/app/styles/init/tables.css index fc224d72663..a0bfecf7831 100644 --- a/server/sonar-web/src/main/js/app/styles/init/tables.css +++ b/server/sonar-web/src/main/js/app/styles/init/tables.css @@ -287,3 +287,15 @@ table.data.zebra.zebra-inversed > tbody > tr:nth-child(odd) { table#project-history tr > td { vertical-align: top; } + +table.fixed { + table-layout: fixed; +} + +table.fixed th.action-small { + width: 30px; +} + +table.fixed th.action { + width: 50px; +} diff --git a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecoration/AlmDefinitionFormField.tsx b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecoration/AlmDefinitionFormField.tsx index d462c0e829f..1e758a1671d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecoration/AlmDefinitionFormField.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/pullRequestDecoration/AlmDefinitionFormField.tsx @@ -24,48 +24,48 @@ import { AlmSettingsBinding } from '../../../../types/alm-settings'; export interface AlmDefinitionFormFieldProps { autoFocus?: boolean; - formData: B; - help: boolean; + help?: React.ReactNode; id: string; - isTextArea: boolean; - maxLength: number; + isTextArea?: boolean; + maxLength?: number; onFieldChange: (id: keyof B, value: string) => void; propKey: keyof B; + value: string; } export function AlmDefinitionFormField( props: AlmDefinitionFormFieldProps ) { - const { autoFocus, formData, help, id, isTextArea, maxLength, onFieldChange, propKey } = props; + const { autoFocus, help, id, isTextArea, maxLength, onFieldChange, propKey, value } = props; return (
{isTextArea ? (