Skip to content

Commit 65d7073

Browse files
committed
Set descriptive document titles
Squash commits of branch feature/show_title: - Set descriptive document titles
1 parent cc6a329 commit 65d7073

File tree

5 files changed

+1369
-2596
lines changed

5 files changed

+1369
-2596
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222
}
2323

2424
scmPlugin {
25-
scmVersion = "3.0.0"
25+
scmVersion = "3.7.0"
2626
displayName = "Author Mapping"
2727
description = "Lookup and transform usernames to the real names stored in the scm-manager user database or in a mapping table"
2828
author = "Cloudogu GmbH"

gradle/changelog/show_title.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- type: added
2+
description: Descriptive document titles

package.json

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,69 @@
11
{
2-
"name": "@scm-manager/scm-authormapping-plugin",
3-
"private": true,
4-
"version": "3.0.1-SNAPSHOT",
5-
"license": "AGPL-3.0-only",
6-
"main": "./src/main/js/index.ts",
7-
"scripts": {
8-
"build": "plugin-scripts build",
9-
"watch": "plugin-scripts watch",
10-
"postinstall": "plugin-scripts postinstall"
11-
},
12-
"dependencies": {
13-
"@scm-manager/ui-plugins": "3.0.0",
14-
"@scm-manager/ui-components": "3.0.0",
15-
"@scm-manager/ui-extensions": "3.0.0",
16-
"classnames": "^2.2.6",
17-
"query-string": "6.14.1",
18-
"react": "17",
19-
"react-i18next": "11",
20-
"react-redux": "^5.0.7",
21-
"react-router-dom": "^5.3.1",
22-
"redux": "^4.0.0",
23-
"styled-components": "^5.3.5",
24-
"react-hook-form": "^7.5.1",
25-
"react-dom": "17",
26-
"react-router": "^5.3.1",
27-
"@scm-manager/ui-api": "3.0.0",
28-
"@scm-manager/ui-forms": "3.0.0",
29-
"@scm-manager/ui-buttons": "3.0.0",
30-
"@scm-manager/ui-overlays": "3.0.0",
31-
"@scm-manager/ui-layout": "3.0.0",
32-
"react-query": "^3.25.1"
33-
},
34-
"babel": {
35-
"presets": [
36-
"@scm-manager/babel-preset"
37-
]
38-
},
39-
"jest": {
40-
"preset": "@scm-manager/jest-preset"
41-
},
42-
"prettier": "@scm-manager/prettier-config",
43-
"eslintConfig": {
44-
"extends": "@scm-manager/eslint-config"
45-
},
46-
"devDependencies": {
47-
"@scm-manager/babel-preset": "^2.13.1",
48-
"@scm-manager/eslint-config": "^2.17.0",
49-
"@scm-manager/jest-preset": "^2.13.0",
50-
"@scm-manager/prettier-config": "^2.10.1",
51-
"@scm-manager/tsconfig": "^2.13.0",
52-
"@scm-manager/ui-scripts": "^2.47.0",
53-
"@scm-manager/ui-tests": "3.0.0",
54-
"@scm-manager/ui-types": "3.0.0",
55-
"@types/classnames": "^2.2.9",
56-
"@types/enzyme": "^3.10.3",
57-
"@types/fetch-mock": "^7.3.1",
58-
"@types/i18next": "^13.0.0",
59-
"@types/jest": "^24.0.19",
60-
"@types/query-string": "5",
61-
"@types/react": "^17.0.1",
62-
"@types/react-redux": "5.0.7",
63-
"@types/react-router-dom": "^5.3.3",
64-
"@types/styled-components": "^5.1.25",
65-
"jest": "^24.9.0",
66-
"@scm-manager/plugin-scripts": "^1.2.2"
67-
}
2+
"name": "@scm-manager/scm-authormapping-plugin",
3+
"private": true,
4+
"version": "3.0.1-SNAPSHOT",
5+
"license": "AGPL-3.0-only",
6+
"main": "./src/main/js/index.ts",
7+
"scripts": {
8+
"build": "plugin-scripts build",
9+
"watch": "plugin-scripts watch",
10+
"postinstall": "plugin-scripts postinstall"
11+
},
12+
"dependencies": {
13+
"@scm-manager/ui-plugins": "3.7.0",
14+
"@scm-manager/ui-components": "3.7.0",
15+
"@scm-manager/ui-extensions": "3.7.0",
16+
"classnames": "^2.3.1",
17+
"query-string": "6.14.1",
18+
"react": "^17.0.1",
19+
"react-i18next": "11",
20+
"react-redux": "^5.0.7",
21+
"react-router-dom": "^5.3.1",
22+
"redux": "^4.0.0",
23+
"styled-components": "^5.3.5",
24+
"react-hook-form": "^7.33.1",
25+
"react-dom": "^17.0.1",
26+
"react-router": "^5.3.1",
27+
"@scm-manager/ui-api": "3.7.0",
28+
"@scm-manager/ui-forms": "3.7.0",
29+
"@scm-manager/ui-buttons": "3.7.0",
30+
"@scm-manager/ui-overlays": "3.7.0",
31+
"@scm-manager/ui-layout": "3.7.0",
32+
"react-query": "^3.39.2",
33+
"@scm-manager/ui-core": "3.7.0"
34+
},
35+
"babel": {
36+
"presets": [
37+
"@scm-manager/babel-preset"
38+
]
39+
},
40+
"jest": {
41+
"preset": "@scm-manager/jest-preset"
42+
},
43+
"prettier": "@scm-manager/prettier-config",
44+
"eslintConfig": {
45+
"extends": "@scm-manager/eslint-config"
46+
},
47+
"devDependencies": {
48+
"@scm-manager/babel-preset": "^2.13.1",
49+
"@scm-manager/eslint-config": "^2.17.0",
50+
"@scm-manager/jest-preset": "^2.14.1",
51+
"@scm-manager/prettier-config": "^2.12.0",
52+
"@scm-manager/tsconfig": "^2.13.0",
53+
"@scm-manager/ui-scripts": "^2.47.0",
54+
"@scm-manager/ui-tests": "3.7.0",
55+
"@scm-manager/ui-types": "3.7.0",
56+
"@types/classnames": "^2.3.1",
57+
"@types/enzyme": "^3.10.18",
58+
"@types/fetch-mock": "^7.3.1",
59+
"@types/i18next": "^13.0.0",
60+
"@types/jest": "^26.0.24",
61+
"@types/query-string": "5",
62+
"@types/react": "^17.0.1",
63+
"@types/react-redux": "5.0.7",
64+
"@types/react-router-dom": "^5.3.3",
65+
"@types/styled-components": "^5.1.25",
66+
"jest": "^26.6.3",
67+
"@scm-manager/plugin-scripts": "^1.6.1"
68+
}
6869
}

src/main/js/ConfigurationContainer.tsx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,27 @@
1515
*/
1616

1717
import React from "react";
18-
import { withTranslation, WithTranslation } from "react-i18next";
19-
import { Configuration, Subtitle } from "@scm-manager/ui-components";
18+
import { useTranslation } from "react-i18next";
19+
import { Configuration } from "@scm-manager/ui-components";
20+
import { Subtitle, useDocumentTitleForRepository } from "@scm-manager/ui-core";
21+
import { Repository } from "@scm-manager/ui-types";
2022
import AuthorMappingConfigurationForm from "./AuthorMappingConfigurationForm";
2123

22-
type Props = WithTranslation & {
24+
type Props = {
2325
link: string;
26+
repository: Repository;
2427
};
2528

26-
class ConfigurationContainer extends React.Component<Props> {
27-
render() {
28-
const { link, t } = this.props;
29-
return (
30-
<>
31-
<Subtitle subtitle={t("scm-authormapping-plugin.config.title")} />
32-
<Configuration link={link} render={props => <AuthorMappingConfigurationForm {...props} />} />
33-
</>
34-
);
35-
}
36-
}
29+
const ConfigurationContainer: React.FC<Props> = ({ link, repository }) => {
30+
const { t } = useTranslation("plugins");
31+
useDocumentTitleForRepository(repository, t("scm-authormapping-plugin.config.title"));
3732

38-
export default withTranslation("plugins")(ConfigurationContainer);
33+
return (
34+
<>
35+
<Subtitle>{t("scm-authormapping-plugin.config.title")}</Subtitle>
36+
<Configuration link={link} render={props => <AuthorMappingConfigurationForm {...props} />} />
37+
</>
38+
);
39+
};
40+
41+
export default ConfigurationContainer;

0 commit comments

Comments
 (0)