Page MenuHomePhabricator

D7981.diff
No OneTemporary

D7981.diff

diff --git a/web/components/message-result.css b/web/components/message-result.css
--- a/web/components/message-result.css
+++ b/web/components/message-result.css
@@ -3,7 +3,7 @@
border: 1px solid var(--pin-message-modal-border-color);
border-radius: 7px;
max-height: 400px;
- margin: 16px 32px;
+ margin: 0 32px 16px 32px;
}
.messageDate {
diff --git a/web/modals/chat/message-results-modal.css b/web/modals/chat/message-results-modal.css
--- a/web/modals/chat/message-results-modal.css
+++ b/web/modals/chat/message-results-modal.css
@@ -1,6 +1,6 @@
hr.separator {
border: 0;
- margin: 20px 0;
+ margin: 20px 0 0 0;
width: 100%;
height: 2px;
border: none;
@@ -9,9 +9,16 @@
.messageResultsContainer {
overflow-y: scroll;
+ padding-bottom: 8px;
}
.loadingIndicator {
text-align: center;
- margin-bottom: 10px;
+}
+
+.topSpace {
+ height: 48px;
+ align-items: center;
+ justify-content: center;
+ display: flex;
}
diff --git a/web/modals/chat/message-results-modal.react.js b/web/modals/chat/message-results-modal.react.js
--- a/web/modals/chat/message-results-modal.react.js
+++ b/web/modals/chat/message-results-modal.react.js
@@ -134,6 +134,17 @@
);
const messageResultsToDisplay = React.useMemo(() => {
+ const items = modifiedItems.map(item => (
+ <MessageResult
+ key={item.messageInfo.id}
+ item={item}
+ threadInfo={threadInfo}
+ />
+ ));
+ return <>{items}</>;
+ }, [modifiedItems, threadInfo]);
+
+ const loadingIndicator = React.useMemo(() => {
if (loadingStatus === 'loading') {
return (
<div className={css.loadingIndicator}>
@@ -141,18 +152,13 @@
</div>
);
}
- return modifiedItems.map(item => (
- <MessageResult
- key={item.messageInfo.id}
- item={item}
- threadInfo={threadInfo}
- />
- ));
- }, [modifiedItems, threadInfo, loadingStatus]);
+ return null;
+ }, [loadingStatus]);
return (
<Modal name={modalName} onClose={popModal} size="large">
<hr className={css.separator} />
+ <div className={css.topSpace}>{loadingIndicator}</div>
<div className={css.messageResultsContainer}>
{messageResultsToDisplay}
</div>

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 12:11 PM (17 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2699943
Default Alt Text
D7981.diff (2 KB)

Event Timeline