Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast forward button in notebook toolbar has tooltip " and " #11898

Closed
JasonWeill opened this issue Jan 18, 2022 · 2 comments · Fixed by #13939
Closed

Fast forward button in notebook toolbar has tooltip " and " #11898

JasonWeill opened this issue Jan 18, 2022 · 2 comments · Fixed by #13939

Comments

@JasonWeill
Copy link
Contributor

JasonWeill commented Jan 18, 2022

The fast-forward button in the notebook toolbar has the wrong tooltip.

Description

The ⏩ (fast forward) button in the notebook toolbar should have a tooltip that reads, in English, "Restart Kernel and Run All Cells …". This button was introduced in #8024.

Instead, this button has the tooltip " and " (with a space before and after the word) with no additional content. You can verify this by inspecting the element in your browser.

Screen Shot 2022-01-18 at 3 33 30 PM

If you hover over a disabled fast-forward button, the tooltip is complete and present.

Reproduce

Open a notebook using JupyterLab (tip of master branch). Hover over the ⏩ button on the toolbar.

Expected behavior

A complete, comprehensible tooltip appears.

Context

  • Operating System and version: macOS 11.6.2 (Big Sur)
  • Browser and version: Firefox 91.4.1esr (64-bit), Chrome 97.0.4692.71 (Official Build) (x86_64)
  • JupyterLab version: 4.0.0a19
@JasonWeill JasonWeill added bug pkg:mainmenu status:Needs Triage Applied to new issues that need triage labels Jan 18, 2022
@krassowski
Copy link
Member

It sounds like related to "semantic commands" rewrite in #11386. It might have something to do with concatenateTexts (below)?

function concatenateTexts(
attribute: 'label' | 'caption'
): string | CommandRegistry.CommandFunc<string> | undefined {
return () => {
const texts = reduceAttribute(attribute);
switch (texts.length) {
case 0:
return defaultValues.label ?? '';
case 1:
return texts[0];
default: {
const hasEllipsis = texts.some(l => /…$/.test(l));
const main = texts
.slice(undefined, -1)
.map(l => l.replace(/…$/, ''))
.join(', ');
const end = texts.slice(-1)[0] + (hasEllipsis ? '…' : '');
return trans.__('%1 and %2', main, end);
}
}
};
}

@krassowski krassowski added pkg:application and removed status:Needs Triage Applied to new issues that need triage labels Jan 19, 2022
@krassowski krassowski added this to the 4.0 milestone Jan 22, 2022
@JasonWeill
Copy link
Contributor Author

Still shows up in tip-of-master

@JasonWeill JasonWeill modified the milestones: 4.0.0, 4.1.0 Feb 1, 2023
@fcollonval fcollonval modified the milestones: 4.1.0, 4.0.0 Feb 2, 2023
@JasonWeill JasonWeill self-assigned this Feb 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants