OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.13k stars 3.3k forks source link

[Bug] Toolbar and hotkeys bugs #3927

Closed sedghi closed 5 months ago

sedghi commented 8 months ago

Describe the Bug

There seem to be various bugs that are related to the toolbar, and hotkeys.

Basically the requirements are

There should be 3 types of tools/icons that we support in the toolbar: Toggles, Actions, Tools

There are bugs regarding toggles states and nested menu behaviour which I will explain next.

Toggles

CleanShot 2024-02-11 at 22 56 25

Current Bugs for Toggles:

pretty sure this bug is in setToolActive in the commandsModule

Fixed in https://github.com/OHIF/Viewers/pull/3961


Nested Menu wrong behaviour for actions

Fixed in https://github.com/OHIF/Viewers/pull/3961

Nested Menu wrong behaviour for toggles

Fixed in https://github.com/OHIF/Viewers/pull/3961


Hotkeys

Hotkeys are not connected to the toolbar

Easy case

Harder case

What would happen if there is a active tool in the nested menu, and the hotkey for another nested icon is clicked?


Minor Details

Dropdowns should not hide the primary tool

CleanShot 2024-02-11 at 23 01 06

If you click on any item on the dropdown it correctly moves to the top but it get disappeared from the dropdown for some reason which is weird.

Fixed in https://github.com/OHIF/Viewers/pull/3961

Steps to Reproduce

s

The current behavior

s

The expected behavior

Toggle Improvements

Separate State from Interaction: Ensure that toggling a feature only changes its on/off state, not other tool interactions. Configurable Defaults: Add startup settings so users can preset which toggles should open in an "on" state by default.


Nested Menu Logic

Action vs. Tool Prioritization: Nested actions should not override active tools unless clearly intended by the user. Clicking a tool in a nested menu should both execute it and prioritize it visually.


Visual & Hotkey Alignment

Update Highlighting: When a hotkey changes the active tool, the toolbar visuals must change in tandem.

OS

s

Node version

s

Browser

s

jenny-hm-lee commented 8 months ago

@sedghi , I don't follow above exactly. It seems like this work is trying to address this bug (#3911 ) also. I have assigned someone to look at #3911 internally. Please let me know if there is overlap.

sedghi commented 8 months ago

I don't see an overlap

sedghi commented 8 months ago

@wayfarer3130 Do you have anything in progress to solve some of these by any chance that Ibrahim can take over?

sedghi commented 5 months ago

We just release the OHIF 3.8, you can find more details here https://ohif.org/release-notes/3p8/ If you still encounter this issue in 3.8, please re-open this.