diff --git a/client/src/grid/octopusImagingOrderDisplay.tsx b/client/src/grid/octopusImagingOrderDisplay.tsx
index a860c046..b5d8a77a 100644
--- a/client/src/grid/octopusImagingOrderDisplay.tsx
+++ b/client/src/grid/octopusImagingOrderDisplay.tsx
@@ -5,7 +5,7 @@ import {
IMAGINE_REQUEST_TYPES,
IMAGING_REQUEST_ITEM_TYPE,
ImagingRequestType,
-} from "../../../shared/octopusImaging";
+} from "shared/octopusImaging";
import { agateSans } from "../../fontNormaliser";
import { useGlobalStateContext } from "../globalState";
import { space } from "@guardian/source-foundations";
@@ -22,39 +22,19 @@ export const OctopusImagingOrderDisplay = ({
return (
Imaging Order
- {isEditable && (
-
-
- {
- "Don't forget to provide some notes to help Imaging team to understand your request"
- }
-
-
- )}
-
Request Type:
{isEditable ? (
@@ -78,6 +58,16 @@ export const OctopusImagingOrderDisplay = ({
payload.requestType
)}
+
);
};
diff --git a/client/src/itemInputBox.tsx b/client/src/itemInputBox.tsx
index 620c9840..e04052e4 100644
--- a/client/src/itemInputBox.tsx
+++ b/client/src/itemInputBox.tsx
@@ -254,105 +254,124 @@ export const ItemInputBox = ({
- {maybeReplyingToElement}
-
- innerRef={(element) => (textAreaRef.current = element)}
- disabled={isSending}
- trigger={{
- "@": {
- dataProvider: addUnverifiedMention
- ? mentionsDataProvider
- : () => [],
- component: Suggestion,
- output: (userOrGroup) => ({
- key: isGroup(userOrGroup)
- ? userOrGroup.shorthand
- : userOrGroup.email,
- text: isGroup(userOrGroup)
- ? groupToMentionHandle(userOrGroup)
- : userToMentionHandle(userOrGroup),
- caretPosition: "next",
- }),
- allowWhitespace: true,
- },
- }}
- minChar={0}
- loadingComponent={LoadingSuggestions}
- placeholder="enter message here..."
- value={message}
- onFocus={({ target }) => resizeTextArea(target)}
- onChange={(event) => {
- resizeTextArea(event.target);
- setMessage(event.target.value);
- }}
- onKeyPress={
- sendItem &&
- ((event) => {
- event.stopPropagation();
- if (isHardReturn(event)) {
- const hasSomethingToSend =
- payloadToBeSent?.type === IMAGING_REQUEST_ITEM_TYPE
- ? message
- : message?.trim() || payloadToBeSent;
- if (!isAsGridPayloadLoading && hasSomethingToSend) {
- sendItem();
- }
- event.preventDefault();
- }
- })
- }
- onPaste={handlePaste}
- onItemSelected={({ item }) => addUnverifiedMention?.(item)}
- rows={1}
- css={css`
- box-sizing: border-box;
- background-color: transparent;
- border: none;
- vertical-align: middle;
- &:focus-visible {
- outline: none;
- }
- /* Firefox needs this hint to get the correct initial height.
- Chrome will sometimes show a scrollbar at 21px, so give it a .1px extra as a nudge not to add one */
- height: 21.1px;
- ${addUnverifiedMention ? "max-height: 74px;" : ""}
- ${agateSans.small({ lineHeight: "tight" })};
- resize: none;
- ${scrollbarsCss(palette.neutral[86])}
- `}
- boundariesElement={panelElement || undefined}
- />
- {isAsGridPayloadLoading && (
+ {payloadToBeSent?.type === IMAGING_REQUEST_ITEM_TYPE && (
-
- please wait a moment
+
+ You must provide some notes to help Imaging team to understand your
+ request
+
)}
- {payloadToBeSent && (
-
+ {maybeReplyingToElement}
+
+ innerRef={(element) => (textAreaRef.current = element)}
+ disabled={isSending}
+ trigger={{
+ "@": {
+ dataProvider: addUnverifiedMention
+ ? mentionsDataProvider
+ : () => [],
+ component: Suggestion,
+ output: (userOrGroup) => ({
+ key: isGroup(userOrGroup)
+ ? userOrGroup.shorthand
+ : userOrGroup.email,
+ text: isGroup(userOrGroup)
+ ? groupToMentionHandle(userOrGroup)
+ : userToMentionHandle(userOrGroup),
+ caretPosition: "next",
+ }),
+ allowWhitespace: true,
+ },
+ }}
+ minChar={0}
+ loadingComponent={LoadingSuggestions}
+ placeholder="enter message here..."
+ value={message}
+ onFocus={({ target }) => resizeTextArea(target)}
+ onChange={(event) => {
+ resizeTextArea(event.target);
+ setMessage(event.target.value);
+ }}
+ onKeyPress={
+ sendItem &&
+ ((event) => {
+ event.stopPropagation();
+ if (isHardReturn(event)) {
+ const hasSomethingToSend =
+ payloadToBeSent?.type === IMAGING_REQUEST_ITEM_TYPE
+ ? message
+ : message?.trim() || payloadToBeSent;
+ if (!isAsGridPayloadLoading && hasSomethingToSend) {
+ sendItem();
+ }
+ event.preventDefault();
+ }
+ })
+ }
+ onPaste={handlePaste}
+ onItemSelected={({ item }) => addUnverifiedMention?.(item)}
+ rows={1}
css={css`
- margin: 0 ${space[1]}px;
+ box-sizing: border-box;
+ background-color: transparent;
+ border: none;
+ vertical-align: middle;
+ &:focus-visible {
+ outline: none;
+ }
+ /* Firefox needs this hint to get the correct initial height.
+ Chrome will sometimes show a scrollbar at 21px, so give it a .1px extra as a nudge not to add one */
+ height: 21.1px;
+ ${addUnverifiedMention ? "max-height: 74px;" : ""}
+ ${agateSans.small({ lineHeight: "tight" })};
+ resize: none;
+ ${scrollbarsCss(palette.neutral[86])}
`}
- >
-
-
- )}
+ boundariesElement={panelElement || undefined}
+ />
+ {isAsGridPayloadLoading && (
+
+
+ please wait a moment
+
+ )}
+ {payloadToBeSent && (
+
+ )}
+
);
};