ferdium / ferdium-app

All your services in one place, built by the community
https://ferdium.org
Apache License 2.0
2.94k stars 176 forks source link

Unwanted 'undefined' command shortcut shown in service tooltip #1210

Closed Alphrag closed 1 year ago

Alphrag commented 1 year ago

Avoid duplicates

Ferdium Version

6.2.3-nightly.15

What Operating System are you using?

Ubuntu

Operating System Version

Ubuntu 20.04

What arch are you using?

x64

Last Known Working Ferdium version

6.3.0-nightly.12

Expected Behavior

When hovering over a service in the sidebar, its name appears together with a command shortcut if there is a valid one.

Actual Behavior

If the service index is higher that 10 in your sidebar (e.g. facebook is the 11th service on my workspace), then only the name of the service should appear in the tooltip. Instead, "undefined" appears after the name as if it were a valid command shortcut (e.g. it appears as facebook undefined as shown in the screenshot below).

This problem has been introduced in #1201 and happens in the sidebar, but not in the menu.

Steps to reproduce

  1. Add at least 11 services.
  2. Hover over the 11th one.
  3. See that the tooltip shows <name> undefined

Debug link

No response

Screenshots

Screenshot from 2023-05-31 14-39-32

Additional information

In my opinion, these lines: https://github.com/vraravam/ferdium-app/blob/e9fec82e1e93dd3f52d7ddc38fea0355cce0ec68/src/components/services/tabs/TabItem.tsx#L362-L365 should write the accelerator only if it does not return undefined. @vraravam what do you think?

vraravam commented 1 year ago

im taking this up