Skip to content

Commit 058c4dc

Browse files
committed
Update IDE Plugin launcher styles and wording
1 parent 9aec6d8 commit 058c4dc

File tree

4 files changed

+47
-10
lines changed

4 files changed

+47
-10
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "digma-ui",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "Digma UI",
55
"main": "dist/index.js",
66
"scripts": {

src/components/IdeLauncher/index.tsx

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ const getURLQueryParams = (url: string) => {
3333
export const IdeLauncher = () => {
3434
const theme = useTheme();
3535
const themeKind = getThemeKind(theme);
36+
const params = getURLQueryParams(window.location.search);
37+
const { environmentName, spanDisplayName } = params;
38+
const action = params["plugin.action"];
3639
const [selectItems, setSelectItems] = useState<SelectItem[]>();
3740
const isMobile = ["Android", "iPhone", "iPad"].some((x) =>
3841
window.navigator.userAgent.includes(x)
@@ -170,7 +173,7 @@ export const IdeLauncher = () => {
170173
</s.Title>
171174
<s.Description>
172175
Please check that IDE is running and click the{" "}
173-
<s.ButtonName>Try again</s.ButtonName> button below.
176+
<s.EmphasizedText>Try again</s.EmphasizedText> button below.
174177
</s.Description>
175178
</s.TextContainer>
176179
<NewButton
@@ -194,20 +197,54 @@ export const IdeLauncher = () => {
194197
<s.Title>Failed to find IDEs with Digma plugin running</s.Title>
195198
<s.Description>
196199
Please open the IDE with Digma plugin installed, check its
197-
settings and click the <s.ButtonName>Refresh</s.ButtonName> button
198-
below.
200+
settings and click the{" "}
201+
<s.EmphasizedText>Refresh</s.EmphasizedText> button below.
199202
</s.Description>
200203
</s.TextContainer>
201204
<NewButton label={"Refresh"} onClick={handleRefreshButtonClick} />
202205
</>
203206
);
204207
}
205208

209+
if (selectItems.length === 1) {
210+
return (
211+
<>
212+
<s.TextContainer>
213+
<s.Title>Opening the IDE...</s.Title>
214+
<s.Description>
215+
Your IDE client is opening automatically; you can close this tab.
216+
</s.Description>
217+
</s.TextContainer>
218+
<s.SelectContainer>
219+
<Select
220+
placeholder={selectedItem?.label ?? "Select IDE Project"}
221+
items={selectItems}
222+
onChange={(value) => {
223+
void handleSelectChange(value);
224+
}}
225+
/>
226+
</s.SelectContainer>
227+
</>
228+
);
229+
}
230+
206231
if (selectItems.length > 0) {
207232
return (
208233
<>
209234
<s.TextContainer>
210-
<s.Title>Select the IDE project to view issues in Digma</s.Title>
235+
{action === "OpenReport" ? (
236+
<s.Title>
237+
Select the IDE project to view Metrics report in Digma
238+
</s.Title>
239+
) : (
240+
<s.Title>
241+
Select the IDE project to view{" "}
242+
{spanDisplayName && <>{spanDisplayName} </>}
243+
issues{" "}
244+
{environmentName && <>for {environmentName} environment </>}
245+
in Digma
246+
</s.Title>
247+
)}
211248
<s.Description>
212249
Please select the IDE project you&apos;d like to open.
213250
</s.Description>

src/components/IdeLauncher/styles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const TextContainer = styled.div`
3838
flex-direction: column;
3939
align-items: center;
4040
gap: 24px;
41-
max-width: 820px;
41+
max-width: 1100px;
4242
text-align: center;
4343
`;
4444

@@ -63,12 +63,12 @@ export const Description = styled.p`
6363
}
6464
`;
6565

66-
export const ButtonName = styled.span`
66+
export const EmphasizedText = styled.span`
6767
color: ${({ theme }) => theme.colors.v3.text.primary};
6868
`;
6969

7070
export const SelectContainer = styled.div`
71-
width: 228px;
71+
width: 320px;
7272
`;
7373

7474
export const Footer = styled.footer`

0 commit comments

Comments
 (0)