twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
15.79k stars 1.73k forks source link

After creating new record or clicking 'c', global redirect shortcuts don't work #6631

Open BOHEUS opened 1 month ago

BOHEUS commented 1 month ago

Scenario 1:

  1. Log in
  2. Create new record
  3. Try to go to other page using shortcuts listed in Search sub-tab

Scenario 2:

  1. Log in
  2. Click c on keyboard (new row at the top of the table appears like user would like to create new object)
  3. Try to go to other page using shortcuts listed in Search sub-tab Actual: No action, seems like cursor is still focused on table or row in table

Expected: User should be redirected to tab accordingly to pressed key combinations listed in Search

Nabhag8848 commented 2 weeks ago

@BOHEUS can't reproduce. Looks like already fixed, can be closed

https://github.com/user-attachments/assets/f3ce8cdb-327d-4c8c-91b9-af3131fb096c

BOHEUS commented 2 weeks ago

No, it's not fixed, I can still reproduce it, also, I didn't mention anything about going to Settings and creating a entirely new object. Not only that, you tried to reproduce only first scenario where I wrote 2 scenarios (maybe there are more ways to reproduce the bug but I didn't find more).

Here's proof the bug is still reproducible (even on demo)

Nabhag8848 commented 2 weeks ago

Thanks, you meant Create new object-record. Create new object was confusing to me.

Bonapara commented 2 weeks ago

@lucasbordeau linked to shortcuts

lucasbordeau commented 2 weeks ago

BOHEUS could you please update the issue by replacing object with record, it's very confusing otherwise as we make a clear distinction between an object (which relates to metadata) and a record, which relate to an instance in table or board.

We can create an object in settings We can create a record in table and board

BOHEUS commented 2 weeks ago

@lucasbordeau done

lucasbordeau commented 1 week ago

Thanks for the update.

I tried to reproduce by following your videos, sadly I couldn't reproduce.

Could you try finding the precise sequence of actions that creates this shortcut freeze ?

It could help to set DEBUG_HOTKEY_SCOPE to true in useScopedHotkeyCallback so you have logs that indicate what is the current hotkey scope when you press some keys.

BOHEUS commented 1 week ago

@lucasbordeau that's what I get when DEBUG_HOTKEY_SCOPE is set to true image For comparison, that's what I get when I can use shortcuts to jump between different tabs (messages in green) image

lucasbordeau commented 1 week ago

Are you sure that you have no soft focus left on any cell when trying to input those keys ?

Otherwise this would mean that even if we exit soft focus mode, the hotkey scope is still on soft focus mode, which would need to be fixed.

BOHEUS commented 1 week ago

I don't think I have soft focus on any cell after creating the record but how can I check it to make sure my statement is true?