feat(ViewportActionBar and CinePlayer): Add new design for action bar and cine player (#3204)

* feat(ViewportActionBar): OHIF issue #3123 (#3186)

* feat(ViewportActionBar): OHIF issue #3123

- Renamed previous viewport action bar to be LegacyViewportActionBar
- Components LegacyViewportActionBar depends on also renamed: LegacyCinePlayer and LegacyPatientInfo
- New Viewport coded to specs in issue
- added React hook useResizeObserver
- added some tailwind classes

* Updated tailwind to 3.2.7.
Put external imports like React at the top of the import list.

* feat(CinePlayer and ViewportActionBar) (#3198)

* feat(CinePlayer and ViewportActionBar)
- OHIF issue 3123

- new look cine control implemented
- new custom blue color in tailwind config for various hover backgrounds in the cine control
- new icons added for cine

- Tooltip component now can be placed top (center) on hover
- Tooltip component border colour now consistent with specs

- fixed NPE in ViewportActionBar

- upgraded tailwind to 3.2.7 in platform/ui
- fixed issues in various button components brought by tailwind 3.2.7 where classes now need important flag

- fixed issue with InputRange component so that the tracked value property can change externally
- InputRange component can now optionally show its label

- added new measurement tracking state service to hydrate SR without prompting
- segmentation can also now be hydrated without prompting

* PR feedback:
- cine centralized to OHIFCornerstoneViewport
- introduced a type for the CinePlayer properties

* Addressed PR comments and concerns...

The DOM ref for the root component of the ViewportActionBar is now added to state
so that the various callbacks and ResizeObserver are updated with it.
The CinePlayer FPS slider tooltip was moved up so that its arrow does not
intersect the FPS text.
The hover area for the CinePlayer slider tooltip is now the FPS < > buttons and text.
The tracked measurements are now filtered to only include those of the active
viewport series when the tracked measurement navigation arrows are used.

* Addressed PR comments...

The update to tailwind 3.2.7 caused several look-and-feel, UI regressions,
so we are rolling back to 3.2.4.
This commit is contained in:
Joe Boccanfuso authored and GitHub committed 2023-02-28 15:57:19 -05:00
1 parent c9125a0c0a
commit 35d0787211
55 files changed
+1205 -513

No files matched your search

@@ -3,6 +3,8 @@ import React from 'react';
import arrowDown from './../../assets/icons/arrow-down.svg';
import arrowLeft from './../../assets/icons/arrow-left.svg';
import arrowLeftSmall from './../../assets/icons/arrow-left-small.svg';
import arrowRightSmall from './../../assets/icons/arrow-right-small.svg';
import calendar from './../../assets/icons/calendar.svg';
import cancel from './../../assets/icons/cancel.svg';
import clipboard from './../../assets/icons/clipboard.svg';
@@ -11,6 +13,8 @@ import dottedCircle from './../../assets/icons/dotted-circle.svg';
import circledCheckmark from './../../assets/icons/circled-checkmark.svg';
import chevronDown from './../../assets/icons/chevron-down.svg';
import chevronLeft from './../../assets/icons/chevron-left.svg';
import chevronNext from './../../assets/icons/chevron-next.svg';
import chevronPrev from './../../assets/icons/chevron-prev.svg';
import chevronRight from './../../assets/icons/chevron-right.svg';
import eyeVisible from './../../assets/icons/eye-visible.svg';
import eyeHidden from './../../assets/icons/eye-hidden.svg';
@@ -18,6 +22,7 @@ import exclamation from './../../assets/icons/exclamation.svg';
import externalLink from './../../assets/icons/external-link.svg';
import groupLayers from './../../assets/icons/group-layers.svg';
import info from './../../assets/icons/info.svg';
import infoAction from './../../assets/icons/info-action.svg';
import infoLink from './../../assets/icons/info-link.svg';
import launchArrow from './../../assets/icons/launch-arrow.svg';
import launchInfo from './../../assets/icons/launch-info.svg';
@@ -36,12 +41,19 @@ import settings from './../../assets/icons/settings.svg';
import sorting from './../../assets/icons/sorting.svg';
import sortingActiveDown from './../../assets/icons/sorting-active-down.svg';
import sortingActiveUp from './../../assets/icons/sorting-active-up.svg';
import statusAlert from './../../assets/icons/status-alert.svg';
import statusLocked from './../../assets/icons/status-locked.svg';
import statusTracked from './../../assets/icons/status-tracked.svg';
import statusUntracked from './../../assets/icons/status-untracked.svg';
import tracked from './../../assets/icons/tracked.svg';
import unlink from './../../assets/icons/unlink.svg';
import checkboxChecked from './../../assets/icons/checkbox-checked.svg';
import checkboxUnchecked from './../../assets/icons/checkbox-unchecked.svg';
import iconClose from './../../assets/icons/icon-close.svg';
import iconNextInactive from './../../assets/icons/icon-next-inactive.svg';
import iconNext from './../../assets/icons/icon-next.svg';
import iconPlay from './../../assets/icons/icon-play.svg';
import iconPause from './../../assets/icons/icon-pause.svg';
import iconPrevInactive from './../../assets/icons/icon-prev-inactive.svg';
import iconPrev from './../../assets/icons/icon-prev.svg';
import navigationPanelRightHide from './../../assets/icons/navigation-panel-right-hide.svg';
@@ -107,6 +119,9 @@ import oldStop from './../../assets/icons/old-stop.svg';
const ICONS = {
'arrow-down': arrowDown,
'arrow-left': arrowLeft,
'arrow-left-small': arrowLeftSmall,
'arrow-right-small': arrowRightSmall,
calendar: calendar,
cancel: cancel,
clipboard: clipboard,
@@ -115,12 +130,18 @@ const ICONS = {
'circled-checkmark': circledCheckmark,
'chevron-down': chevronDown,
'chevron-left': chevronLeft,
'chevron-next': chevronNext,
'chevron-prev': chevronPrev,
'chevron-right': chevronRight,
'eye-visible': eyeVisible,
'eye-hidden': eyeHidden,
'external-link': externalLink,
'group-layers': groupLayers,
info: info,
'icon-close': iconClose,
'icon-play': iconPlay,
'icon-pause': iconPause,
'info-action': infoAction,
'info-link': infoLink,
'arrow-left': arrowLeft,
'launch-arrow': launchArrow,
@@ -140,6 +161,10 @@ const ICONS = {
settings: settings,
'sorting-active-down': sortingActiveDown,
'sorting-active-up': sortingActiveUp,
'status-alert': statusAlert,
'status-locked': statusLocked,
'status-tracked': statusTracked,
'status-untracked': statusUntracked,
sorting: sorting,
tracked: tracked,
unlink: unlink,