Explore: Create menu for short link button (#77336)

* WIP first pass

* Change to toolbarbutton/buttonselect pattern

* Move to two toolbarbuttons with dropdown

* Justify text to the right of icons

* Fix betterer

* Fix styling and tests

* Add to docs

* Perist last clicked, add translations

* move styling to core component

* use label for tooltip, let parser combine panes in multiple params

* Explore: Panes encoding suggestions (#78210)

panes encoding suggestions

* WIP-add menu groups

* Get group actions working

* add icons and non-local last selected state

* Fix translations after merge

* Add categories to translation, tweak the verbiage

* Fix translation extraction

* Fix tests

* fix translation conflict

* Log if time is absolute

---------

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
Kristina
2023-12-12 09:55:03 -06:00
committed by GitHub
parent 117ecf0403
commit bc8ad7b6e5
13 changed files with 244 additions and 25 deletions

View File

@@ -342,10 +342,14 @@ export function getIntervals(range: TimeRange, lowLimit?: string, resolution?: n
}
export const copyStringToClipboard = (string: string) => {
const el = document.createElement('textarea');
el.value = string;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(string);
} else {
const el = document.createElement('textarea');
el.value = string;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
}
};