e.preventDefault()} onClick={clear}>
void, clear: () => void,
switch (e.which) {
case 40: // e.code: ArrowDown
if (hits) {
- setIndex((idx) => {
+ setIndex(idx => {
if (idx + 1 < hits.length) {
return idx + 1;
}
@@ -189,7 +189,7 @@ const useKeyBoardNavigation = (gotoDetailSearch: () => void, clear: () => void,
break;
case 38: // e.code: ArrowUp
if (hits) {
- setIndex((idx) => {
+ setIndex(idx => {
if (idx > 0) {
return idx - 1;
}
@@ -219,7 +219,7 @@ const useKeyBoardNavigation = (gotoDetailSearch: () => void, clear: () => void,
return {
onKeyDown,
- index,
+ index
};
};
@@ -278,7 +278,7 @@ const useShowResultsOnFocus = () => {
},
onKeyPress: () => setShowResults(true),
onFocus: () => setShowResults(true),
- hideResults: () => setShowResults(false),
+ hideResults: () => setShowResults(false)
};
};
@@ -303,11 +303,12 @@ const useSearchParams = () => {
return {
searchType,
- initialQuery,
+ initialQuery
};
};
const OmniSearch: FC = () => {
+ const [t] = useTranslation("commons");
const { searchType, initialQuery } = useSearchParams();
const [query, setQuery] = useState(initialQuery);
const debouncedQuery = useDebounce(query, 250);
@@ -334,7 +335,7 @@ const OmniSearch: FC = () => {
{showHelp ?
: null}
@@ -342,13 +343,15 @@ const OmniSearch: FC = () => {
setQuery(e.target.value)}
+ placeholder={t("search.placeholder")}
+ onChange={e => setQuery(e.target.value)}
onKeyDown={onKeyDown}
value={query}
role="combobox"
aria-autocomplete="list"
data-omnisearch="true"
+ aria-expanded={query.length > 2}
+ aria-label={t("search.ariaLabel")}
{...handlers}
/>
{isLoading ? null : (
@@ -357,7 +360,7 @@ const OmniSearch: FC = () => {
)}
-
e.preventDefault()}>
+ e.preventDefault()}>
{error ? (
diff --git a/scm-ui/ui-webapp/src/repos/components/list/RepositoryGroupEntry.tsx b/scm-ui/ui-webapp/src/repos/components/list/RepositoryGroupEntry.tsx
index 63e234da4e..6464327fdf 100644
--- a/scm-ui/ui-webapp/src/repos/components/list/RepositoryGroupEntry.tsx
+++ b/scm-ui/ui-webapp/src/repos/components/list/RepositoryGroupEntry.tsx
@@ -35,7 +35,7 @@ const RepositoryGroupEntry: FC = ({ group }) => {
const [t] = useTranslation("namespaces");
const settingsLink = group.namespace?._links?.permissions && (
-
+
);
diff --git a/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx b/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx
index a91656bc58..e3a3ed6089 100644
--- a/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx
+++ b/scm-ui/ui-webapp/src/repos/sources/components/FileIcon.tsx
@@ -33,13 +33,11 @@ type Props = {
const FileIcon: FC = ({ file }) => {
const [t] = useTranslation("repos");
if (file.subRepository) {
- return (
-
- );
+ return ;
} else if (file.directory) {
- return ;
+ return ;
}
- return ;
+ return ;
};
export default FileIcon;
diff --git a/scm-ui/ui-webapp/src/users/components/table/UserRow.tsx b/scm-ui/ui-webapp/src/users/components/table/UserRow.tsx
index 060200f490..4d5fce2ae3 100644
--- a/scm-ui/ui-webapp/src/users/components/table/UserRow.tsx
+++ b/scm-ui/ui-webapp/src/users/components/table/UserRow.tsx
@@ -55,9 +55,7 @@ class UserRow extends React.Component {
{iconType} {this.renderLink(to, user.name)}
{this.renderLink(to, user.displayName)} |
-
- {user.mail}
- |
+ {user.mail ? {user.mail} : null} |
);
}