Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3719753
D10714.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10714.diff
View Options
diff --git a/web/settings/relationship/user-list.css b/web/settings/relationship/user-list.css
--- a/web/settings/relationship/user-list.css
+++ b/web/settings/relationship/user-list.css
@@ -29,3 +29,9 @@
row-gap: 8px;
height: 625px;
}
+
+.emptyList {
+ text-align: center;
+ margin-top: 8px;
+ color: var(--text-background-tertiary-default);
+}
diff --git a/web/settings/relationship/user-list.react.js b/web/settings/relationship/user-list.react.js
--- a/web/settings/relationship/user-list.react.js
+++ b/web/settings/relationship/user-list.react.js
@@ -70,11 +70,24 @@
onMenuVisibilityChange={onMenuVisibilityChange}
/>
));
- }, [userRowComponent, usersWithENSNames, onMenuVisibilityChange]);
+ }, [usersWithENSNames, userRowComponent, onMenuVisibilityChange]);
+
+ const noResultsMessage = React.useMemo(() => {
+ if (searchText.length === 0 || usersWithENSNames.length > 0) {
+ return null;
+ }
+
+ return <div className={css.emptyList}>No results</div>;
+ }, [searchText.length, usersWithENSNames.length]);
const containerClasses = classNames(css.userListContainer, {
[css.noScroll]: isMenuVisible,
});
- return <div className={containerClasses}>{userRows}</div>;
+ return (
+ <div className={containerClasses}>
+ {userRows}
+ {noResultsMessage}
+ </div>
+ );
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 9, 11:52 AM (9 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2834316
Default Alt Text
D10714.diff (1 KB)
Attached To
Mode
D10714: [web] add feedback if user list is empty
Attached
Detach File
Event Timeline
Log In to Comment