Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3301059
D4612.id14947.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D4612.id14947.diff
View Options
diff --git a/web/chat/chat-thread-list.css b/web/chat/chat-thread-list.css
--- a/web/chat/chat-thread-list.css
+++ b/web/chat/chat-thread-list.css
@@ -240,46 +240,6 @@
overflow: auto;
}
-div.search {
- display: flex;
- background-color: #dddddd;
- border-radius: 5px;
- padding: 3px 5px;
- align-items: center;
-}
-svg.searchVector {
- fill: #aaaaaa;
- height: 22px;
- width: 22px;
- padding: 0 3px;
- margin-left: 8px;
-}
-div.search > input {
- color: black;
- padding: 0;
- border: none;
- background-color: #dddddd;
- font-weight: 600;
- font-size: 15px;
- flex-grow: 1;
- margin-left: 3px;
-}
-div.search > input:focus {
- outline: none;
-}
-svg.clearQuery {
- font-size: 15px;
- padding-bottom: 1px;
- padding-right: 2px;
- color: #aaaaaa;
-}
-svg.clearQuery:hover {
- font-size: 15px;
- padding-bottom: 1px;
- padding-right: 2px;
- color: white;
-}
-
div.spacer {
height: 6px;
}
diff --git a/web/modals/chat/sidebar-list-modal.react.js b/web/modals/chat/sidebar-list-modal.react.js
deleted file mode 100644
--- a/web/modals/chat/sidebar-list-modal.react.js
+++ /dev/null
@@ -1,96 +0,0 @@
-// @flow
-
-import { faTimesCircle } from '@fortawesome/free-solid-svg-icons';
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import classNames from 'classnames';
-import * as React from 'react';
-
-import { useSearchSidebars } from 'lib/hooks/search-sidebars';
-import type { ThreadInfo } from 'lib/types/thread-types';
-
-import chatThreadListCSS from '../../chat/chat-thread-list.css';
-import SidebarItem from '../../chat/sidebar-item.react';
-import globalCSS from '../../style.css';
-import { MagnifyingGlass } from '../../vectors.react';
-import Input from '../input.react';
-import { useModalContext } from '../modal-provider.react';
-import Modal from '../modal.react';
-
-type Props = {
- +threadInfo: ThreadInfo,
-};
-
-function SidebarListModal(props: Props): React.Node {
- const { threadInfo } = props;
- const {
- listData,
- searchState,
- clearQuery,
- onChangeSearchInputText,
- } = useSearchSidebars(threadInfo);
- const { popModal } = useModalContext();
-
- const sidebars = React.useMemo(
- () =>
- listData.map(item => (
- <div
- className={classNames(
- chatThreadListCSS.thread,
- chatThreadListCSS.sidebar,
- )}
- key={item.threadInfo.id}
- onClick={popModal}
- >
- <SidebarItem sidebarInfo={item} />
- </div>
- )),
- [popModal, listData],
- );
-
- let clearQueryButton = null;
- if (searchState.text) {
- clearQueryButton = (
- <a href="#" onClick={clearQuery}>
- <FontAwesomeIcon
- icon={faTimesCircle}
- className={chatThreadListCSS.clearQuery}
- />
- </a>
- );
- }
-
- const handleOnChangeSearchText = React.useCallback(
- (event: SyntheticEvent<HTMLInputElement>) => {
- const { value } = event.currentTarget;
- onChangeSearchInputText(value);
- },
- [onChangeSearchInputText],
- );
-
- return (
- <Modal name="Threads" onClose={popModal}>
- <div
- className={classNames(
- globalCSS['modal-body'],
- globalCSS['resized-modal-body'],
- )}
- >
- <div>
- <div className={chatThreadListCSS.search}>
- <MagnifyingGlass className={chatThreadListCSS.searchVector} />
- <Input
- type="text"
- placeholder="Search threads"
- value={searchState.text}
- onChange={handleOnChangeSearchText}
- />
- {clearQueryButton}
- </div>
- </div>
- <ul className={chatThreadListCSS.list}>{sidebars}</ul>
- </div>
- </Modal>
- );
-}
-
-export default SidebarListModal;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 11:39 PM (21 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535954
Default Alt Text
D4612.id14947.diff (3 KB)
Attached To
Mode
D4612: [web] Remove old `SidebarListModal` component
Attached
Detach File
Event Timeline
Log In to Comment