Skip to content

Commit 6b35546

Browse files
linter fix
1 parent b844be7 commit 6b35546

File tree

8 files changed

+44
-55
lines changed

8 files changed

+44
-55
lines changed

src/AppRouter.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ import { SearchParamToggleVisibility } from './components/Helper/FeatureToggleEx
1010
function AppRouter() {
1111
return (
1212
<>
13-
<SearchParamToggleVisibility shouldBeVisible={(params) => {
14-
if (params === undefined) return true;
15-
if (params.get('showHeaderBar') === null) return true;
16-
return params?.get('showHeaderBar') === "true"
17-
}}>
13+
<SearchParamToggleVisibility
14+
shouldBeVisible={(params) => {
15+
if (params === undefined) return true;
16+
if (params.get('showHeaderBar') === null) return true;
17+
return params?.get('showHeaderBar') === 'true';
18+
}}
19+
>
1820
<ShellBarComponent />
1921
</SearchParamToggleVisibility>
2022

src/components/Core/BetaButton.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
import { ButtonDomRef, Button, Icon, PopoverDomRef, Popover, Text } from "@ui5/webcomponents-react";
2-
import { useState, useRef, RefObject } from "react";
1+
import { ButtonDomRef, Button, Icon, PopoverDomRef, Popover, Text } from '@ui5/webcomponents-react';
2+
import { useState, useRef, RefObject } from 'react';
33
import styles from './ShellBar.module.css';
4-
import { useTranslation } from "react-i18next";
5-
import PopoverPlacement from "@ui5/webcomponents/dist/types/PopoverPlacement.js";
4+
import { useTranslation } from 'react-i18next';
5+
import PopoverPlacement from '@ui5/webcomponents/dist/types/PopoverPlacement.js';
66
import { ThemingParameters } from '@ui5/webcomponents-react-base';
77

8-
98
export function BetaButton() {
109
const [betaPopoverOpen, setBetaPopoverOpen] = useState(false);
1110
const betaButtonRef = useRef<ButtonDomRef>(null);
1211
const betaPopoverRef = useRef<PopoverDomRef>(null);
1312
const { t } = useTranslation();
1413

15-
1614
const onBetaClick = () => {
1715
if (betaButtonRef.current) {
1816
betaPopoverRef.current!.opener = betaButtonRef.current;
@@ -30,7 +28,7 @@ export function BetaButton() {
3028
<BetaPopover open={betaPopoverOpen} setOpen={setBetaPopoverOpen} popoverRef={betaPopoverRef} />
3129
</Button>
3230
</>
33-
)
31+
);
3432
}
3533

3634
const BetaPopover = ({
@@ -58,4 +56,3 @@ const BetaPopover = ({
5856
</Popover>
5957
);
6058
};
61-

src/components/Core/FeedbackButton.tsx

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
import { PopoverDomRef, Ui5CustomEvent, TextAreaDomRef, Button, ButtonDomRef, Popover, Form, FormGroup, FormItem, Label, Link, RatingIndicator, TextArea } from "@ui5/webcomponents-react";
2-
import { Dispatch, RefObject, SetStateAction, useRef, useState } from "react";
3-
import { useAuthOnboarding } from "../../spaces/onboarding/auth/AuthContextOnboarding";
4-
import { useTranslation } from "react-i18next";
5-
import { ButtonClickEventDetail } from "@ui5/webcomponents/dist/Button.js";
6-
import PopoverPlacement from "@ui5/webcomponents/dist/types/PopoverPlacement.js";
7-
import ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js";
1+
import {
2+
PopoverDomRef,
3+
Ui5CustomEvent,
4+
TextAreaDomRef,
5+
Button,
6+
ButtonDomRef,
7+
Popover,
8+
Form,
9+
FormGroup,
10+
FormItem,
11+
Label,
12+
Link,
13+
RatingIndicator,
14+
TextArea,
15+
} from '@ui5/webcomponents-react';
16+
import { Dispatch, RefObject, SetStateAction, useRef, useState } from 'react';
17+
import { useAuthOnboarding } from '../../spaces/onboarding/auth/AuthContextOnboarding';
18+
import { useTranslation } from 'react-i18next';
19+
import { ButtonClickEventDetail } from '@ui5/webcomponents/dist/Button.js';
20+
import PopoverPlacement from '@ui5/webcomponents/dist/types/PopoverPlacement.js';
21+
import ButtonDesign from '@ui5/webcomponents/dist/types/ButtonDesign.js';
822

923
type UI5RatingIndicatorElement = HTMLElement & { value: number };
1024

11-
1225
export function FeedbackButton() {
1326
const feedbackPopoverRef = useRef<PopoverDomRef>(null);
1427
const [feedbackMessage, setFeedbackMessage] = useState('');
@@ -51,14 +64,7 @@ export function FeedbackButton() {
5164

5265
return (
5366
<>
54-
<Button
55-
icon="feedback"
56-
tooltip="Feedback"
57-
onClick={onFeedbackClick}
58-
design={ButtonDesign.Transparent}
59-
>
60-
61-
</Button>
67+
<Button icon="feedback" tooltip="Feedback" design={ButtonDesign.Transparent} onClick={onFeedbackClick} />
6268
<FeedbackPopover
6369
open={feedbackPopoverOpen}
6470
setOpen={setFeedbackPopoverOpen}
@@ -71,7 +77,7 @@ export function FeedbackButton() {
7177
onFeedbackMessageChange={onFeedbackMessageChange}
7278
/>
7379
</>
74-
)
80+
);
7581
}
7682

7783
const FeedbackPopover = ({

src/components/Core/IntelligentBreadcrumbs.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,12 @@ export default function IntelligentBreadcrumbs() {
6161
);
6262
}
6363

64-
6564
export function BreadCrumbFeedbackHeader() {
6665
return (
67-
<FlexBox
68-
alignItems={FlexBoxAlignItems.Center}
69-
>
66+
<FlexBox alignItems={FlexBoxAlignItems.Center}>
7067
<IntelligentBreadcrumbs />
7168
<BetaButton />
7269
<FeedbackButton />
7370
</FlexBox>
74-
)
75-
}
71+
);
72+
}

src/components/Core/ShellBar.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,16 @@ import { useTranslation } from 'react-i18next';
1616
import { generateInitialsForEmail } from '../Helper/generateInitialsForEmail.ts';
1717
import styles from './ShellBar.module.css';
1818

19-
2019
export function ShellBarComponent() {
2120
const auth = useAuthOnboarding();
2221
const profilePopoverRef = useRef<PopoverDomRef>(null);
2322
const [profilePopoverOpen, setProfilePopoverOpen] = useState(false);
2423

25-
2624
const onProfileClick = (e: Ui5CustomEvent<ShellBarDomRef, ShellBarProfileClickEventDetail>) => {
2725
profilePopoverRef.current!.opener = e.detail.targetRef;
2826
setProfilePopoverOpen(!profilePopoverOpen);
2927
};
3028

31-
3229
useEffect(() => {
3330
const shellbar = document.querySelector('ui5-shellbar');
3431
const el = shellbar?.shadowRoot?.querySelector('.ui5-shellbar-overflow-container-left');
@@ -53,11 +50,9 @@ export function ShellBarComponent() {
5350
</div>
5451
}
5552
onProfileClick={onProfileClick}
56-
>
57-
</ShellBar>
53+
/>
5854

5955
<ProfilePopover open={profilePopoverOpen} setOpen={setProfilePopoverOpen} popoverRef={profilePopoverRef} />
60-
6156
</>
6257
);
6358
}
@@ -96,4 +91,3 @@ const ProfilePopover = ({
9691
</Popover>
9792
);
9893
};
99-

src/components/Helper/FeatureToggleExistance.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ interface FeatureToggleExistanceProps {
66
// A component that conditionally renders its children based on a flag in the URL search parameters.
77
// The flag and its handling logic must be set via the `shouldBeVisible` prop function.
88
export function SearchParamToggleVisibility({ shouldBeVisible, children }: FeatureToggleExistanceProps) {
9-
const searchParams = URL.parse(window.location.href)?.searchParams
9+
const searchParams = URL.parse(window.location.href)?.searchParams;
1010

11-
return (
12-
<>
13-
{shouldBeVisible(searchParams) && children}
14-
</>
15-
);
16-
17-
}
11+
return <>{shouldBeVisible(searchParams) && children}</>;
12+
}

src/spaces/onboarding/pages/ProjectPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function ProjectPage() {
5656
actionsBar={<ControlPlaneListToolbar projectName={projectName ?? ''} />}
5757
/>
5858
}
59-
//TODO: project chooser should be part of the breadcrumb section if possible?
59+
//TODO: project chooser should be part of the breadcrumb section if possible?
6060
>
6161
<ControlPlaneListAllWorkspaces projectName={projectName} workspaces={workspaces} />
6262
</ObjectPage>

src/views/ProjectList.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ export default function ProjectsListView() {
1313
titleArea={
1414
<ObjectPageTitle
1515
header={t('ProjectsListView.pageTitle')}
16-
breadcrumbs={
17-
<BreadCrumbFeedbackHeader />
18-
}
16+
breadcrumbs={<BreadCrumbFeedbackHeader />}
1917
actionsBar={<ProjectListToolbar />}
2018
/>
2119
}

0 commit comments

Comments
 (0)