mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user