Skip to content

Commit

Permalink
change in-app help to online, rename variables, remove HelpDrawer
Browse files Browse the repository at this point in the history
  • Loading branch information
kswang1029 committed Sep 16, 2024
1 parent 10679c3 commit 0efbe07
Show file tree
Hide file tree
Showing 94 changed files with 166 additions and 2,882 deletions.
26 changes: 13 additions & 13 deletions docs_website/versioned_docs/version-4.1.0/api-typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23625,7 +23625,7 @@
},
{
"id": 2037,
"name": "helpType",
"name": "helpURL",
"kind": 1024,
"kindString": "Property",
"flags": {
Expand All @@ -23642,7 +23642,7 @@
"type": {
"type": "reference",
"id": 9828,
"name": "HelpType"
"name": "HelpURL"
}
},
{
Expand Down Expand Up @@ -75028,7 +75028,7 @@
},
{
"id": 9828,
"name": "HelpType",
"name": "HelpURL",
"kind": 8,
"kindString": "Enumeration",
"flags": {},
Expand Down Expand Up @@ -128072,7 +128072,7 @@
"type": {
"type": "reference",
"id": 9828,
"name": "HelpType"
"name": "HelpURL"
}
},
{
Expand Down Expand Up @@ -128156,14 +128156,14 @@
"parameters": [
{
"id": 9891,
"name": "helpType",
"name": "helpURL",
"kind": 32768,
"kindString": "Parameter",
"flags": {},
"type": {
"type": "reference",
"id": 9828,
"name": "HelpType"
"name": "HelpURL"
}
},
{
Expand Down Expand Up @@ -196845,7 +196845,7 @@
},
{
"id": 13536,
"name": "helpType",
"name": "helpURL",
"kind": 1024,
"kindString": "Property",
"flags": {
Expand All @@ -196865,22 +196865,22 @@
{
"type": "reference",
"id": 9828,
"name": "HelpType"
"name": "HelpURL"
},
{
"type": "array",
"elementType": {
"type": "reference",
"id": 9828,
"name": "HelpType"
"name": "HelpURL"
}
}
]
},
"implementationOf": {
"type": "reference",
"id": 13517,
"name": "DefaultWidgetConfig.helpType"
"name": "DefaultWidgetConfig.helpURL"
}
},
{
Expand Down Expand Up @@ -201376,7 +201376,7 @@
},
{
"id": 13517,
"name": "helpType",
"name": "helpURL",
"kind": 1024,
"kindString": "Property",
"flags": {
Expand All @@ -201396,14 +201396,14 @@
{
"type": "reference",
"id": 9828,
"name": "HelpType"
"name": "HelpURL"
},
{
"type": "array",
"elementType": {
"type": "reference",
"id": 9828,
"name": "HelpType"
"name": "HelpURL"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions src/components/Animator/AnimatorComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {action, makeObservable, observable} from "mobx";
import {observer} from "mobx-react";

import {SafeNumericInput} from "components/Shared";
import {AnimationMode, AnimatorStore, AppStore, DefaultWidgetConfig, HelpType, PlayMode, WidgetProps} from "stores";
import {AnimationMode, AnimatorStore, AppStore, DefaultWidgetConfig, HelpURL, PlayMode, WidgetProps} from "stores";

import "./AnimatorComponent.scss";

Expand All @@ -27,7 +27,7 @@ export class AnimatorComponent extends React.Component<WidgetProps> {
defaultHeight: 200,
title: "Animator",
isCloseable: true,
helpType: HelpType.ANIMATOR
helpURL: HelpURL.ANIMATOR
};
}

Expand Down
3 changes: 1 addition & 2 deletions src/components/App/UIControllerComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import {observer} from "mobx-react";

import {HelpDrawerComponent, RootMenuComponent, SplashScreenComponent} from "components";
import {RootMenuComponent, SplashScreenComponent} from "components";
import {
AboutDialogComponent,
CodeSnippetDialogComponent,
Expand Down Expand Up @@ -40,7 +40,6 @@ export class UIControllerComponent extends React.Component {
<CodeSnippetDialogComponent />
<AboutDialogComponent />
<ExternalPageDialogComponent />
<HelpDrawerComponent />
<StokesDialogComponent />
<TelemetryDialogComponent />
<SplashScreenComponent />
Expand Down
4 changes: 2 additions & 2 deletions src/components/CatalogOverlay/CatalogOverlayComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {observer} from "mobx-react";
import {ImageViewLayer} from "components";
import {ClearableNumericInputComponent, FilterableTableComponent, FilterableTableComponentProps} from "components/Shared";
import {AbstractCatalogProfileStore, CatalogOverlay, CatalogSystemType} from "models";
import {AppStore, CatalogOnlineQueryProfileStore, CatalogProfileStore, CatalogStore, CatalogUpdateMode, DefaultWidgetConfig, HelpType, PreferenceKeys, PreferenceStore, WidgetProps, WidgetsStore} from "stores";
import {AppStore, CatalogOnlineQueryProfileStore, CatalogProfileStore, CatalogStore, CatalogUpdateMode, DefaultWidgetConfig, HelpURL, PreferenceKeys, PreferenceStore, WidgetProps, WidgetsStore} from "stores";
import {RegionMode} from "stores/Frame";
import {CatalogPlotType, CatalogPlotWidgetStoreProps, CatalogSettingsTabs, CatalogWidgetStore} from "stores/Widgets";
import {ProcessedColumnData, toFixed} from "utilities";
Expand Down Expand Up @@ -59,7 +59,7 @@ export class CatalogOverlayComponent extends React.Component<WidgetProps> {
defaultHeight: 400,
title: "Catalog",
isCloseable: true,
helpType: HelpType.CATALOG_OVERLAY,
helpURL: HelpURL.CATALOG_OVERLAY,
componentId: "catalog-overlay-component"
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {observer} from "mobx-react";
import {CatalogOverlayComponent} from "components";
import {AutoColorPickerComponent, ClearableNumericInputComponent, ColormapComponent, SafeNumericInput, ScalingSelectComponent} from "components/Shared";
import {CatalogOverlay} from "models";
import {AppStore, CatalogOnlineQueryProfileStore, CatalogProfileStore, CatalogStore, DefaultWidgetConfig, HelpType, WidgetProps, WidgetsStore} from "stores";
import {AppStore, CatalogOnlineQueryProfileStore, CatalogProfileStore, CatalogStore, DefaultWidgetConfig, HelpURL, WidgetProps, WidgetsStore} from "stores";
import {CatalogOverlayShape, CatalogSettingsTabs, CatalogWidgetStore, ValueClip} from "stores/Widgets";
import {getColorForTheme, SWATCH_COLORS} from "utilities";

Expand Down Expand Up @@ -67,7 +67,7 @@ export class CatalogOverlayPlotSettingsPanelComponent extends React.Component<Wi
isCloseable: true,
parentId: "catalog-overlay",
parentType: "catalog-overlay",
helpType: [HelpType.CATALOG_SETTINGS_GOLBAL, HelpType.CATALOG_SETTINGS_OVERLAY, HelpType.CATALOG_SETTINGS_COLOR, HelpType.CATALOG_SETTINGS_SIZE, HelpType.CATALOG_SETTINGS_ORIENTATION]
helpURL: [HelpURL.CATALOG_SETTINGS_GOLBAL, HelpURL.CATALOG_SETTINGS_OVERLAY, HelpURL.CATALOG_SETTINGS_COLOR, HelpURL.CATALOG_SETTINGS_SIZE, HelpURL.CATALOG_SETTINGS_ORIENTATION]
};
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/CursorInfo/CursorInfoComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {observer} from "mobx-react";

import {SimpleTableComponent} from "components/Shared";
import {ImageType} from "models";
import {AppStore, DefaultWidgetConfig, HelpType, WidgetProps} from "stores";
import {AppStore, DefaultWidgetConfig, HelpURL, WidgetProps} from "stores";
import {FrameStore} from "stores/Frame";
import {formattedExponential, toFixed} from "utilities";

Expand All @@ -25,7 +25,7 @@ export class CursorInfoComponent extends React.Component<WidgetProps> {
defaultHeight: 180,
title: "Cursor Info",
isCloseable: true,
helpType: HelpType.CURSOR_INFO
helpURL: HelpURL.CURSOR_INFO
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {DraggableDialogComponent, TaskProgressDialogComponent} from "components/
import {LinePlotComponent, LinePlotComponentProps, SafeNumericInput, SCALING_POPOVER_PROPS} from "components/Shared";
import {CustomIcon} from "icons/CustomIcons";
import {Point2D} from "models";
import {AppStore, DialogId, HelpType} from "stores";
import {AppStore, DialogId, HelpURL} from "stores";
import {FrameStore} from "stores/Frame";
import {RenderConfigWidgetStore} from "stores/Widgets";
import {clamp, getColorForTheme, toExponential, toFixed} from "utilities";
Expand Down Expand Up @@ -293,7 +293,7 @@ export class ContourDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.CONTOUR}
helpURL={HelpURL.CONTOUR}
defaultWidth={ContourDialogComponent.DefaultWidth}
defaultHeight={ContourDialogComponent.DefaultHeight}
minWidth={ContourDialogComponent.MinWidth}
Expand Down Expand Up @@ -478,7 +478,7 @@ export class ContourDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.CONTOUR}
helpURL={HelpURL.CONTOUR}
defaultWidth={ContourDialogComponent.DefaultWidth}
defaultHeight={ContourDialogComponent.DefaultHeight}
minWidth={ContourDialogComponent.MinWidth}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {ResizeEnable, Rnd} from "react-rnd";
import {Button, Classes, Dialog, DialogProps} from "@blueprintjs/core";
import {observer} from "mobx-react";

import {AppStore, HelpStore, HelpType} from "stores";
import {AppStore, HelpStore, HelpURL} from "stores";

import "./DraggableDialogComponent.scss";

Expand All @@ -16,7 +16,7 @@ export class ResizableDialogComponentProps {
minWidth?: number;
minHeight?: number;
enableResizing: boolean;
helpType?: HelpType;
helpURL?: HelpURL;
onResizeStop?: (newWidth: number, newHeight: number) => void;
dialogId: string;
}
Expand All @@ -37,7 +37,7 @@ export class DraggableDialogComponent extends React.Component<ResizableDialogCom

// add help button in dialog header
const header = this.dd.current.getElementsByClassName(Classes.DIALOG_HEADER);
if (this.props.helpType && header?.length > 0 && this.dd.current.getElementsByClassName("help-button").length === 0) {
if (this.props.helpURL && header?.length > 0 && this.dd.current.getElementsByClassName("help-button").length === 0) {
const helpButton = <Button icon="help" minimal={true} onClick={this.onClickHelpButton} />;
const helpButtonDiv = document.createElement("div") as HTMLDivElement;
helpButtonDiv.setAttribute("class", "help-button");
Expand All @@ -62,8 +62,7 @@ export class DraggableDialogComponent extends React.Component<ResizableDialogCom
};

private onClickHelpButton = () => {
const centerX = this.rnd.draggable.state.x + this.rnd.resizable.size.width * 0.5;
HelpStore.Instance.showHelpDrawer(this.props.helpType, centerX);
HelpStore.Instance.openHelpURL(this.props.helpURL);
};

private onResizeStop = (e, direction, elementRef: HTMLDivElement) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {DraggableDialogComponent, TaskProgressDialogComponent} from "components/
import {FileInfoComponent, FileInfoType} from "components/FileInfo/FileInfoComponent";
import {AppToaster, ErrorToast, SimpleTableComponentProps} from "components/Shared";
import {ImageType} from "models";
import {AppStore, BrowserMode, CatalogProfileStore, DialogId, FileBrowserStore, FileFilteringType, HelpType, ISelectedFile, PreferenceKeys, PreferenceStore} from "stores";
import {AppStore, BrowserMode, CatalogProfileStore, DialogId, FileBrowserStore, FileFilteringType, HelpURL, ISelectedFile, PreferenceKeys, PreferenceStore} from "stores";
import {FrameStore} from "stores/Frame";

import {FileListTableComponent} from "./FileListTable/FileListTableComponent";
Expand Down Expand Up @@ -715,7 +715,7 @@ export class FileBrowserDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.FILE_BROWSER}
helpURL={HelpURL.FILE_BROWSER}
minWidth={FileBrowserDialogComponent.MinWidth}
minHeight={FileBrowserDialogComponent.MinHeight}
defaultWidth={FileBrowserDialogComponent.DefaultWidth}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {observer} from "mobx-react";

import {DraggableDialogComponent} from "components/Dialogs";
import {FileInfoComponent, FileInfoType} from "components/FileInfo/FileInfoComponent";
import {AppStore, DialogId, HelpType} from "stores";
import {AppStore, DialogId, HelpURL} from "stores";

import "./FileInfoDialogComponent.scss";

Expand Down Expand Up @@ -33,7 +33,7 @@ export class FileInfoDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.FILE_INFO}
helpURL={HelpURL.FILE_INFO}
defaultWidth={FileInfoDialogComponent.DefaultWidth}
defaultHeight={FileInfoDialogComponent.DefaultHeight}
minWidth={FileInfoDialogComponent.MinWidth}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {DraggableDialogComponent, TaskProgressDialogComponent} from "components/
import {ClearableNumericInputComponent, CoordinateComponent, CoordNumericInput, ImageCoordNumericInput, InputType, SafeNumericInput} from "components/Shared";
import {CustomIcon} from "icons/CustomIcons";
import {Point2D, WCSPoint2D} from "models";
import {AppStore, DialogId, HelpType} from "stores";
import {AppStore, DialogId, HelpURL} from "stores";
import {CoordinateMode} from "stores/Frame";
import {exportTxtFile, getTimestamp} from "utilities";

Expand Down Expand Up @@ -114,7 +114,7 @@ export class FittingDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.IMAGE_FITTING}
helpURL={HelpURL.IMAGE_FITTING}
minWidth={FittingDialogComponent.MinWidth}
minHeight={FittingDialogComponent.MinHeight}
defaultWidth={FittingDialogComponent.DefaultWidth}
Expand Down Expand Up @@ -167,7 +167,7 @@ export class FittingDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.IMAGE_FITTING}
helpURL={HelpURL.IMAGE_FITTING}
defaultWidth={FittingDialogComponent.DefaultWidth}
defaultHeight={FittingDialogComponent.DefaultHeight}
minWidth={FittingDialogComponent.MinWidth}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {observer} from "mobx-react";

import {DraggableDialogComponent} from "components/Dialogs";
import {PresetLayout} from "models";
import {AppStore, DialogId, HelpType} from "stores";
import {AppStore, DialogId, HelpURL} from "stores";

import "./SaveLayoutDialogComponent.scss";

Expand Down Expand Up @@ -92,7 +92,7 @@ export class SaveLayoutDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.SAVE_LAYOUT}
helpURL={HelpURL.SAVE_LAYOUT}
defaultWidth={SaveLayoutDialogComponent.DefaultWidth}
defaultHeight={SaveLayoutDialogComponent.DefaultHeight}
minWidth={SaveLayoutDialogComponent.MinWidth}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from "classnames";
import {observer} from "mobx-react";

import {DraggableDialogComponent} from "components/Dialogs";
import {AppStore, DialogId, HelpType} from "stores";
import {AppStore, DialogId, HelpURL} from "stores";

import {CatalogQueryComponent} from "./CatalogOnlineQueryComponent";
import {HipsQueryComponent} from "./HipsQueryComponent";
Expand Down Expand Up @@ -36,7 +36,7 @@ export const OnlineDataQueryDialogComponent = observer(() => {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.ONLINE_CATALOG_QUERY}
helpURL={HelpURL.ONLINE_CATALOG_QUERY}
defaultWidth={DEFAULT_WIDTH}
defaultHeight={DEFAULT_HEIGHT}
minWidth={MIN_WIDTH}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {DraggableDialogComponent} from "components/Dialogs";
import {AppToaster, AutoColorPickerComponent, ColormapComponent, ColorPickerComponent, PointShapeSelectComponent, SafeNumericInput, ScalingSelectComponent, SuccessToast} from "components/Shared";
import {CompressionQuality, CursorInfoVisibility, CursorPosition, Event, FileFilterMode, RegionCreationMode, SPECTRAL_MATCHING_TYPES, SPECTRAL_TYPE_STRING, Theme, TileCache, WCSMatching, WCSType, Zoom, ZoomPoint} from "models";
import {TelemetryMode} from "services";
import {AppStore, BeamType, DialogId, HelpType, PreferenceKeys, PreferenceStore} from "stores";
import {AppStore, BeamType, DialogId, HelpURL, PreferenceKeys, PreferenceStore} from "stores";
import {ContourGeneratorType, FrameScaling, RegionStore, RenderConfigStore} from "stores/Frame";
import {copyToClipboard, SWATCH_COLORS} from "utilities";

Expand Down Expand Up @@ -900,7 +900,7 @@ export class PreferenceDialogComponent extends React.Component {
return (
<DraggableDialogComponent
dialogProps={dialogProps}
helpType={HelpType.PREFERENCES}
helpURL={HelpURL.PREFERENCES}
minWidth={PreferenceDialogComponent.MinWidth}
minHeight={PreferenceDialogComponent.MinHeight}
defaultWidth={PreferenceDialogComponent.DefaultWidth}
Expand Down
Loading

0 comments on commit 0efbe07

Please sign in to comment.