fix: remove footer navigation hints
This commit is contained in:
@@ -311,12 +311,6 @@ export function renderFooterKeymaps(
|
|||||||
const editor = getAskContextBindings(config, "editor");
|
const editor = getAskContextBindings(config, "editor");
|
||||||
const noteEditor = getAskContextBindings(config, "noteEditor");
|
const noteEditor = getAskContextBindings(config, "noteEditor");
|
||||||
const bindings = getAskKeyBindings(config);
|
const bindings = getAskKeyBindings(config);
|
||||||
const optionNavigationLabel =
|
|
||||||
`${main.previousOption.label}${main.nextOption.label}`.replaceAll(
|
|
||||||
" / ",
|
|
||||||
""
|
|
||||||
);
|
|
||||||
const tabNavigationLabel = "⇆";
|
|
||||||
const noteNavigationLabel = `${main.optionNote.label}/${main.questionNote.label}`;
|
const noteNavigationLabel = `${main.optionNote.label}/${main.questionNote.label}`;
|
||||||
const hintsByContext: Record<FooterKeymapContext, readonly string[]> = {
|
const hintsByContext: Record<FooterKeymapContext, readonly string[]> = {
|
||||||
input: [
|
input: [
|
||||||
@@ -331,14 +325,11 @@ export function renderFooterKeymaps(
|
|||||||
],
|
],
|
||||||
submit: [
|
submit: [
|
||||||
footerHint(bindings.numberShortcut, "hotkeys"),
|
footerHint(bindings.numberShortcut, "hotkeys"),
|
||||||
footerHint(main.previousOption, "select", optionNavigationLabel),
|
|
||||||
footerHint(main.confirm, "confirm"),
|
footerHint(main.confirm, "confirm"),
|
||||||
footerHint(main.cancel, "cancel"),
|
footerHint(main.cancel, "cancel"),
|
||||||
footerHint(global.settings, "settings"),
|
footerHint(global.settings, "settings"),
|
||||||
],
|
],
|
||||||
multi: [
|
multi: [
|
||||||
footerHint(main.nextTab, "tab", tabNavigationLabel),
|
|
||||||
footerHint(main.previousOption, "select", optionNavigationLabel),
|
|
||||||
footerHint(main.toggle, "toggle"),
|
footerHint(main.toggle, "toggle"),
|
||||||
footerHint(
|
footerHint(
|
||||||
main.changeQuestionType,
|
main.changeQuestionType,
|
||||||
@@ -351,8 +342,6 @@ export function renderFooterKeymaps(
|
|||||||
footerHint(global.settings, "settings"),
|
footerHint(global.settings, "settings"),
|
||||||
],
|
],
|
||||||
default: [
|
default: [
|
||||||
footerHint(main.nextTab, "tab", tabNavigationLabel),
|
|
||||||
footerHint(main.previousOption, "select", optionNavigationLabel),
|
|
||||||
footerHint(
|
footerHint(
|
||||||
main.changeQuestionType,
|
main.changeQuestionType,
|
||||||
"question type",
|
"question type",
|
||||||
|
|||||||
@@ -254,8 +254,6 @@ test("footer keeps earlier hint chunk on the first wrapped line", () => {
|
|||||||
editor: mockEditor(),
|
editor: mockEditor(),
|
||||||
});
|
});
|
||||||
|
|
||||||
assert.equal(lines.at(-7), " ⇆ tab · ↑↓ select");
|
|
||||||
assert.equal(lines.at(-6), "t question type");
|
|
||||||
assert.deepEqual(lines.slice(-5, -1), [
|
assert.deepEqual(lines.slice(-5, -1), [
|
||||||
"Enter confirm",
|
"Enter confirm",
|
||||||
"N/Shift+N note",
|
"N/Shift+N note",
|
||||||
|
|||||||
Reference in New Issue
Block a user