mirror of
https://github.com/grafana/grafana.git
synced 2024-12-30 10:47:30 -06:00
Navigation: more command palette tweaks (#62286)
* update placeholder text, only create search keybindings if topNavCommandPalette is disabled * make search input wider
This commit is contained in:
parent
305209f4be
commit
1ef7cfda3f
@ -79,7 +79,7 @@ const getStyles = (theme: GrafanaTheme2) => ({
|
||||
justifyContent: 'space-between',
|
||||
|
||||
[theme.breakpoints.up('sm')]: {
|
||||
gridTemplateColumns: '1.5fr minmax(200px, 1fr) 1.5fr', // search should not be smaller than 200px
|
||||
gridTemplateColumns: '1.5fr minmax(240px, 1fr) 1.5fr', // search should not be smaller than 240px
|
||||
display: 'grid',
|
||||
|
||||
justifyContent: 'flex-start',
|
||||
|
@ -36,7 +36,7 @@ export function TopSearchBarCommandPaletteTrigger() {
|
||||
<ToolbarButton
|
||||
iconOnly
|
||||
icon="search"
|
||||
aria-label={t('nav.search.placeholder', 'Search Grafana')}
|
||||
aria-label={t('nav.search.placeholderCommandPalette', 'Search or jump to...')}
|
||||
onClick={onOpenSearch}
|
||||
/>
|
||||
);
|
||||
@ -65,7 +65,7 @@ function PretendTextInput({ onClick }: PretendTextInputProps) {
|
||||
</div>
|
||||
|
||||
<button className={styles.fakeInput} onClick={onClick}>
|
||||
{t('nav.search.placeholder', 'Search Grafana')}
|
||||
{t('nav.search.placeholderCommandPalette', 'Search or jump to...')}
|
||||
</button>
|
||||
|
||||
<div className={styles.suffix}>
|
||||
|
@ -39,9 +39,11 @@ export class KeybindingSrv {
|
||||
this.bind('g a', this.openAlerting);
|
||||
this.bind('g p', this.goToProfile);
|
||||
this.bind('g e', this.goToExplore);
|
||||
this.bind('s o', this.openSearch);
|
||||
if (!config.featureToggles.topNavCommandPalette) {
|
||||
this.bind('s o', this.openSearch);
|
||||
this.bind('f', this.openSearch);
|
||||
}
|
||||
this.bind('t a', this.makeAbsoluteTime);
|
||||
this.bind('f', this.openSearch);
|
||||
this.bind('esc', this.exit);
|
||||
this.bindGlobalEsc();
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ export const CommandPalette = () => {
|
||||
<div className={styles.searchContainer}>
|
||||
{isFetchingDashboardResults ? <Spinner className={styles.spinner} /> : <Icon name="search" size="md" />}
|
||||
<KBarSearch
|
||||
defaultPlaceholder={t('command-palette.search-box.placeholder', 'Search Grafana')}
|
||||
defaultPlaceholder={t('command-palette.search-box.placeholder', 'Search or jump to...')}
|
||||
className={styles.search}
|
||||
/>
|
||||
</div>
|
||||
|
@ -292,7 +292,8 @@
|
||||
"title": "Szenen"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Grafana durchsuchen"
|
||||
"placeholder": "Grafana durchsuchen",
|
||||
"placeholderCommandPalette": ""
|
||||
},
|
||||
"search-dashboards": {
|
||||
"title": "Dashboards durchsuchen"
|
||||
|
@ -292,7 +292,8 @@
|
||||
"title": "Scenes"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Search Grafana"
|
||||
"placeholder": "Search Grafana",
|
||||
"placeholderCommandPalette": "Search or jump to..."
|
||||
},
|
||||
"search-dashboards": {
|
||||
"title": "Search dashboards"
|
||||
|
@ -292,7 +292,8 @@
|
||||
"title": "Escenas"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Buscar Grafana"
|
||||
"placeholder": "Buscar Grafana",
|
||||
"placeholderCommandPalette": ""
|
||||
},
|
||||
"search-dashboards": {
|
||||
"title": "Buscar paneles de control"
|
||||
|
@ -292,7 +292,8 @@
|
||||
"title": "Scènes"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Rechercher dans Grafana"
|
||||
"placeholder": "Rechercher dans Grafana",
|
||||
"placeholderCommandPalette": ""
|
||||
},
|
||||
"search-dashboards": {
|
||||
"title": "Rechercher dans les tableaux de bord"
|
||||
|
@ -292,7 +292,8 @@
|
||||
"title": "Ŝčęʼnęş"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "Ŝęäřčĥ Ğřäƒäʼnä"
|
||||
"placeholder": "Ŝęäřčĥ Ğřäƒäʼnä",
|
||||
"placeholderCommandPalette": "Ŝęäřčĥ őř ĵūmp ŧő..."
|
||||
},
|
||||
"search-dashboards": {
|
||||
"title": "Ŝęäřčĥ đäşĥþőäřđş"
|
||||
|
@ -292,7 +292,8 @@
|
||||
"title": "场景"
|
||||
},
|
||||
"search": {
|
||||
"placeholder": "搜索 Grafana"
|
||||
"placeholder": "搜索 Grafana",
|
||||
"placeholderCommandPalette": ""
|
||||
},
|
||||
"search-dashboards": {
|
||||
"title": ""
|
||||
|
Loading…
Reference in New Issue
Block a user