Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit ff85e58

Browse files
authored
Merge pull request #54 from DeskproApps/feature/sc-182672/-space-deprecation-1
[Feat] Add Deprecation Notice (SC-182672)
2 parents 0a9b286 + 4816c57 commit ff85e58

4 files changed

Lines changed: 22 additions & 138 deletions

File tree

manifest.json

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "View your Jetbrains Space issues from Deskpro and link them to tickets you are working on",
55
"appStoreUrl": "https://www.deskpro.com/product-embed/apps/jetbrain-space",
66
"version": "1.0.9",
7+
"isDeprecated": true,
78
"scope": "agent",
89
"isSingleInstall": false,
910
"hasDevMode": true,
@@ -17,71 +18,6 @@
1718
}
1819
},
1920
"settings": {
20-
"space_url": {
21-
"title": "Space Instance URL",
22-
"description": "Enter the URL of your Space instance, or \"https://<my_company>.jetbrains.space\"",
23-
"validationPattern": "^https?:\\/\\/.+\\..+\\w$",
24-
"type": "string",
25-
"isRequired": true,
26-
"isBackendOnly": false,
27-
"order": 10
28-
},
29-
"client_id": {
30-
"title": "Client ID",
31-
"type": "string",
32-
"isRequired": true,
33-
"isBackendOnly": false,
34-
"order": 20
35-
},
36-
"client_secret": {
37-
"title": "Client Secret",
38-
"type": "string",
39-
"isRequired": true,
40-
"isBackendOnly": true,
41-
"order": 30
42-
},
43-
"callback_url": {
44-
"title": "Callback URL",
45-
"type": "app_embedded",
46-
"options": { "entrypoint": "#/admin/callback" },
47-
"isRequired": false,
48-
"isBackendOnly": true,
49-
"order": 40
50-
},
51-
"add_comment_when_linking": {
52-
"title": "Leave a comment on the issue in Space when it is linked to a ticket in Deskpro",
53-
"description": "",
54-
"type": "boolean",
55-
"default": true,
56-
"isRequired": false,
57-
"isBackendOnly": false,
58-
"order": 50
59-
},
60-
"default_comment_on_ticket_reply": {
61-
"title": "Ticket reply as comment",
62-
"description": "Enable option to add Deskpro replies as task comments when a Space issue is linked to a Deskpro ticket",
63-
"type": "boolean",
64-
"isRequired": false,
65-
"isBackendOnly": false,
66-
"order": 60
67-
},
68-
"default_comment_on_ticket_note": {
69-
"title": "Ticket note as comment",
70-
"description": "Enable option to add Deskpro notes as task comments when a Space issue is linked to a Deskpro ticket",
71-
"type": "boolean",
72-
"isRequired": false,
73-
"isBackendOnly": false,
74-
"order": 70
75-
},
76-
"add_deskpro_tag": {
77-
"title": "Add \"Deskpro\" tag when creating or linking Issue",
78-
"description": "Automatically adding a tag to indicate in Space that the issue is currently linked to a Deskpro ticket",
79-
"type": "boolean",
80-
"default": true,
81-
"isRequired": false,
82-
"isBackendOnly": false,
83-
"order": 80
84-
}
8521
},
8622
"proxy": {
8723
"whitelist": [

src/App.tsx

Lines changed: 3 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,8 @@
1-
import { Routes, Route, useNavigate } from "react-router-dom";
2-
import { useDebouncedCallback } from "use-debounce";
3-
import { match } from "ts-pattern";
4-
import {
5-
LoadingSpinner,
6-
useDeskproElements,
7-
useDeskproAppClient,
8-
useDeskproAppEvents,
9-
} from "@deskpro/app-sdk";
10-
import { useLogout, useUnlinkIssue } from "./hooks";
11-
import {
12-
isUnlinkPayload,
13-
isNavigatePayload,
14-
} from "./utils";
15-
import {
16-
HomePage,
17-
LoginPage,
18-
ViewIssuePage,
19-
EditIssuePage,
20-
LinkIssuesPage,
21-
LoadingAppPage,
22-
CreateIssuePage,
23-
AdminCallbackPage,
24-
CreateIssueCommentPage,
25-
} from "./pages";
26-
import type { FC } from "react";
27-
import type { EventPayload } from "./types";
28-
29-
const App: FC = () => {
30-
const navigate = useNavigate();
31-
const { client } = useDeskproAppClient();
32-
const { logout, isLoading: isLoadingLogout } = useLogout();
33-
const { unlink, isLoading: isLoadingUnlink } = useUnlinkIssue();
34-
const isLoading = [isLoadingLogout, isLoadingUnlink].some((isLoading) => isLoading);
35-
36-
useDeskproElements(({ registerElement }) => {
37-
registerElement("refresh", { type: "refresh_button" });
38-
});
39-
40-
const debounceElementEvent = useDebouncedCallback((_, __, payload: EventPayload) => {
41-
return match(payload.type)
42-
.with("changePage", () => isNavigatePayload(payload) && navigate(payload.path))
43-
.with("logout", logout)
44-
.with("unlink", () => isUnlinkPayload(payload) && unlink(payload.issue))
45-
.run();
46-
}, 500);
47-
48-
useDeskproAppEvents({
49-
onShow: () => {
50-
client && setTimeout(() => client.resize(), 200);
51-
},
52-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
53-
// @ts-ignore
54-
onElementEvent: debounceElementEvent,
55-
}, [client]);
56-
57-
if (!client || isLoading) {
58-
return (
59-
<LoadingSpinner />
60-
);
61-
}
1+
import DeprecationNotice from "./components/DeprecationNotice";
622

3+
export function App(){
634
return (
64-
<Routes>
65-
<Route path="/admin/callback" element={<AdminCallbackPage />} />
66-
<Route path="/login" element={<LoginPage />} />
67-
<Route path="/home" element={<HomePage />} />
68-
<Route path="/issues/link" element={<LinkIssuesPage />} />
69-
<Route path="/issues/view/:issueId" element={<ViewIssuePage />} />
70-
<Route path="/issues/create" element={<CreateIssuePage />} />
71-
<Route path="/issues/edit/:issueId" element={<EditIssuePage />} />
72-
<Route path="/issues/:issueId/comments/new" element={<CreateIssueCommentPage />} />
73-
<Route index element={<LoadingAppPage />} />
74-
</Routes>
5+
<DeprecationNotice/>
756
);
767
};
778

78-
export { App };
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Link } from "@deskpro/app-sdk";
2+
import { P1, Stack } from "@deskpro/deskpro-ui";
3+
4+
export default function DeprecationNotice(): JSX.Element {
5+
6+
return (
7+
<Stack vertical padding={12} gap={20}>
8+
<P1>
9+
Jetbrains have announced the decision to deprecate Space: <Link style={{textDecoration: "underline"}} target="_blank" href={"https://blog.jetbrains.com/space/2024/05/27/the-future-of-space/"}>The Future of Space</Link>.
10+
</P1>
11+
<P1>
12+
Ask your admin to uninstall this app from your help desk as it will no longer
13+
be supported by Deskpro.
14+
</P1>
15+
</Stack>
16+
)
17+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./DeprecationNotice"

0 commit comments

Comments
 (0)