Set clearLogs accelerator for log-rendering plugins
Summary: Sets a default key binding of `ctrl+l` to clear the screen within built-in Flipper plugins which display a log view. Motivation: A small quality of life improvement for developers used to the default "clear screen" binding. This makes our log-rendering plugins consistent with other native apps such as terminals, Chrome DevTools, and many others. Reviewed By: mweststrate Differential Revision: D37782638 fbshipit-source-id: 0a85b930faaa0e9468d5391f15092aad7b6057ee
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c01df31459
commit
e7591b2a81
@@ -190,6 +190,7 @@ test.skip('It generates the correct files for client plugin', async () => {
|
||||
handler: async () => {
|
||||
data.set({});
|
||||
},
|
||||
accelerator: 'ctrl+l',
|
||||
});
|
||||
|
||||
return {data};
|
||||
@@ -388,6 +389,7 @@ test.skip('It generates the correct files for device plugin', async () => {
|
||||
handler: async () => {
|
||||
data.set([]);
|
||||
},
|
||||
accelerator: 'ctrl+l',
|
||||
});
|
||||
|
||||
return {data};
|
||||
|
||||
@@ -23,6 +23,7 @@ export function devicePlugin(client: DevicePluginClient) {
|
||||
handler: async () => {
|
||||
data.set([]);
|
||||
},
|
||||
accelerator: 'ctrl+l',
|
||||
});
|
||||
|
||||
return {data};
|
||||
|
||||
@@ -26,6 +26,7 @@ export function plugin(client: PluginClient<Events, {}>) {
|
||||
handler: async () => {
|
||||
data.set({});
|
||||
},
|
||||
accelerator: 'ctrl+l',
|
||||
});
|
||||
|
||||
return {data};
|
||||
|
||||
@@ -139,6 +139,7 @@ export function devicePlugin(client: DevicePluginClient) {
|
||||
{
|
||||
action: 'clear',
|
||||
handler: clearLogs,
|
||||
accelerator: 'ctrl+l',
|
||||
},
|
||||
{
|
||||
action: 'createPaste',
|
||||
|
||||
@@ -148,6 +148,7 @@ export function plugin(client: PluginClient<Events, Methods>) {
|
||||
client.addMenuEntry({
|
||||
action: 'clear',
|
||||
handler: clearLogs,
|
||||
accelerator: 'ctrl+l',
|
||||
});
|
||||
|
||||
client.onConnect(() => {
|
||||
|
||||
Reference in New Issue
Block a user