Skip to content

Commit

Permalink
(chore) Add docstrings and remove dead code from workspace (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandones authored Jul 3, 2024
1 parent dad1df6 commit f71125c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/framework/esm-framework/docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ ___

#### Defined in

[packages/framework/esm-globals/src/types.ts:388](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L388)
[packages/framework/esm-globals/src/types.ts:403](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L403)

___

Expand All @@ -594,7 +594,7 @@ Basically, this is the same as the app routes, with each routes definition keyed

#### Defined in

[packages/framework/esm-globals/src/types.ts:379](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L379)
[packages/framework/esm-globals/src/types.ts:394](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L394)

___

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#### Defined in

[packages/framework/esm-globals/src/types.ts:372](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L372)
[packages/framework/esm-globals/src/types.ts:387](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L387)

___

Expand All @@ -28,7 +28,7 @@ ___

#### Defined in

[packages/framework/esm-globals/src/types.ts:370](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L370)
[packages/framework/esm-globals/src/types.ts:385](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L385)

___

Expand All @@ -38,4 +38,4 @@ ___

#### Defined in

[packages/framework/esm-globals/src/types.ts:371](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L371)
[packages/framework/esm-globals/src/types.ts:386](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L386)
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A list of backend modules necessary for this frontend module and the correspondi

#### Defined in

[packages/framework/esm-globals/src/types.ts:332](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L332)
[packages/framework/esm-globals/src/types.ts:347](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L347)

___

Expand All @@ -38,7 +38,7 @@ An array of all extensions supported by this frontend module. Extensions can be

#### Defined in

[packages/framework/esm-globals/src/types.ts:358](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L358)
[packages/framework/esm-globals/src/types.ts:373](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L373)

___

Expand All @@ -50,7 +50,7 @@ An array of all modals supported by this frontend module. Modals can be launched

#### Defined in

[packages/framework/esm-globals/src/types.ts:362](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L362)
[packages/framework/esm-globals/src/types.ts:377](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L377)

___

Expand All @@ -68,7 +68,7 @@ The name of the backend dependency and either the required version or an object

#### Defined in

[packages/framework/esm-globals/src/types.ts:336](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L336)
[packages/framework/esm-globals/src/types.ts:351](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L351)

___

Expand All @@ -80,7 +80,7 @@ An array of all pages supported by this frontend module. Pages are automatically

#### Defined in

[packages/framework/esm-globals/src/types.ts:354](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L354)
[packages/framework/esm-globals/src/types.ts:369](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L369)

___

Expand All @@ -92,7 +92,7 @@ The version of this frontend module.

#### Defined in

[packages/framework/esm-globals/src/types.ts:328](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L328)
[packages/framework/esm-globals/src/types.ts:343](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L343)

___

Expand All @@ -104,4 +104,4 @@ An array of all workspaces supported by this frontend module. Workspaces can be

#### Defined in

[packages/framework/esm-globals/src/types.ts:366](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L366)
[packages/framework/esm-globals/src/types.ts:381](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L381)
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

#### Defined in

[packages/framework/esm-globals/src/types.ts:382](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L382)
[packages/framework/esm-globals/src/types.ts:397](https://github.com/openmrs/openmrs-esm-core/blob/main/packages/framework/esm-globals/src/types.ts#L397)
15 changes: 15 additions & 0 deletions packages/framework/esm-globals/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,23 @@ export type WorkspaceDefinition = {
type: string;
canHide?: boolean;
canMaximize?: boolean;
/**
* Controls the width of the workspace. The default is "narrow" and this should only be
* changed to "wider" if the workspace itself has internal navigation, like the form editor.
* The width "extra-wide" is for workspaces that contain their own sidebar.
*/
width?: 'narrow' | 'wider' | 'extra-wide';
/**
* Controls whether the workspace has its own sidebar. If true, the sidebar will be displayed when the workspace is open.
*/
hasOwnSidebar?: boolean;
/**
* Sidebars have icons that representing workspaces. The sidebar family is the name of the
* sidebar that should contain the icon for this workspace. This is generally only needed if
* `hasOwnSidebar` is true, in which case this is the name of that sidebar. If multiple
* workspaces have `hasOwnSidebar` set to true and the same family name, then the sidebar
* within the workspace area will have icons for each of those workspaces.
*/
sidebarFamily?: string;
preferredWindowSize?: WorkspaceWindowState;
} & (
Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function WorkspaceNotification({ contextKey }: WorkspaceNotificationProps
const isValidContextKey = regex.test(window.location.pathname);
if (!isValidContextKey) {
reportError(
`WorkspaceOverlay or WorkspaceWindow has provided an invalid context key: "${contextKey}". The context key must be part of the URL path, with no initial or trailing slash.`,
`WorkspaceContainer has provided an invalid context key: "${contextKey}". The context key must be part of the URL path, with no initial or trailing slash.`,
);
}
}, []);
Expand Down

0 comments on commit f71125c

Please sign in to comment.