fix search logic and UI cosmetic fixes

pull/1893/head
audric 4 years ago
parent ce4a386f07
commit bfc805c9d4

@ -117,6 +117,7 @@
"redux": "4.0.1", "redux": "4.0.1",
"redux-logger": "3.0.6", "redux-logger": "3.0.6",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"redux-promise-middleware": "^6.1.2",
"reselect": "4.0.0", "reselect": "4.0.0",
"rimraf": "2.6.2", "rimraf": "2.6.2",
"sanitize.css": "^12.0.1", "sanitize.css": "^12.0.1",

@ -846,6 +846,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding-inline-end: 16px; padding-inline-end: 16px;
padding-bottom: 8px;
padding-inline-start: 16px; padding-inline-start: 16px;
align-items: center; align-items: center;

@ -254,6 +254,7 @@
background-color: $color-white-085; background-color: $color-white-085;
padding-inline-start: 8px; padding-inline-start: 8px;
padding-inline-end: 8px; padding-inline-end: 8px;
margin-inline-end: 8px;
} }
&-warning__icon { &-warning__icon {

@ -177,7 +177,7 @@ export const MessageContent = (props: Props) => {
handleImageError={handleImageError} handleImageError={handleImageError}
/> />
{hasContentAfterAttachmentAndQuote ? ( {hasContentAfterAttachmentAndQuote ? (
<Flex padding="7px"> <Flex padding="7px" container={true} flexDirection="column">
<MessagePreview messageId={props.messageId} handleImageError={handleImageError} /> <MessagePreview messageId={props.messageId} handleImageError={handleImageError} />
<MessageText messageId={props.messageId} /> <MessageText messageId={props.messageId} />
</Flex> </Flex>

@ -8,7 +8,6 @@ import {
getMessageContentWithStatusesSelectorProps, getMessageContentWithStatusesSelectorProps,
isMessageSelectionMode, isMessageSelectionMode,
} from '../../../state/selectors/conversations'; } from '../../../state/selectors/conversations';
import { Flex } from '../../basic/Flex';
import { MessageAuthorText } from './MessageAuthorText'; import { MessageAuthorText } from './MessageAuthorText';
import { MessageContent } from './MessageContent'; import { MessageContent } from './MessageContent';
import { MessageContextMenu } from './MessageContextMenu'; import { MessageContextMenu } from './MessageContextMenu';
@ -71,7 +70,7 @@ export const MessageContentWithStatuses = (props: Props) => {
onClick={onClickOnMessageOuterContainer} onClick={onClickOnMessageOuterContainer}
> >
<MessageStatus messageId={messageId} isCorrectSide={isIncoming} /> <MessageStatus messageId={messageId} isCorrectSide={isIncoming} />
<Flex container={true} flexDirection="column"> <div>
<MessageAuthorText messageId={messageId} /> <MessageAuthorText messageId={messageId} />
<MessageContent <MessageContent
@ -79,7 +78,7 @@ export const MessageContentWithStatuses = (props: Props) => {
isDetailView={isDetailView} isDetailView={isDetailView}
onQuoteClick={onQuoteClick} onQuoteClick={onQuoteClick}
/> />
</Flex> </div>
<MessageStatus messageId={messageId} isCorrectSide={!isIncoming} /> <MessageStatus messageId={messageId} isCorrectSide={!isIncoming} />
<MessageContextMenu messageId={messageId} contextMenuId={ctxMenuID} /> <MessageContextMenu messageId={messageId} contextMenuId={ctxMenuID} />
</div> </div>

@ -2,6 +2,8 @@ import { createLogger } from 'redux-logger';
import { configureStore } from '@reduxjs/toolkit'; import { configureStore } from '@reduxjs/toolkit';
import { rootReducer } from './reducer'; import { rootReducer } from './reducer';
import { persistReducer } from 'redux-persist'; import { persistReducer } from 'redux-persist';
// tslint:disable-next-line: match-default-export-name
import promiseMiddleware from 'redux-promise-middleware';
// tslint:disable-next-line: no-submodule-imports match-default-export-name // tslint:disable-next-line: no-submodule-imports match-default-export-name
import storage from 'redux-persist/lib/storage'; import storage from 'redux-persist/lib/storage';
@ -34,7 +36,7 @@ const persistedReducer = persistReducer(persistConfig, rootReducer);
// Exclude logger if we're in production mode // Exclude logger if we're in production mode
const disableLogging = true; //; env === 'production' || true; // ALWAYS TURNED OFF const disableLogging = true; //; env === 'production' || true; // ALWAYS TURNED OFF
const middlewareList = disableLogging ? [] : [logger]; const middlewareList = disableLogging ? [promiseMiddleware] : [logger, promiseMiddleware];
export const createStore = (initialState: any) => export const createStore = (initialState: any) =>
configureStore({ configureStore({

@ -61,7 +61,7 @@ export const actions = {
export function search(query: string, options: SearchOptions): SearchResultsKickoffActionType { export function search(query: string, options: SearchOptions): SearchResultsKickoffActionType {
return { return {
type: 'SEARCH_RESULTS', type: 'SEARCH_RESULTS',
payload: doSearch(query, options), payload: doSearch(query, options), // this uses redux-promise-middleware
}; };
} }

@ -7535,6 +7535,11 @@ redux-persist@^6.0.0:
resolved "https://registry.yarnpkg.com/redux-persist/-/redux-persist-6.0.0.tgz#b4d2972f9859597c130d40d4b146fecdab51b3a8" resolved "https://registry.yarnpkg.com/redux-persist/-/redux-persist-6.0.0.tgz#b4d2972f9859597c130d40d4b146fecdab51b3a8"
integrity sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ== integrity sha512-71LLMbUq2r02ng2We9S215LtPu3fY0KgaGE0k8WRgl6RkqxtGfl7HUozz1Dftwsb0D/5mZ8dwAaPbtnzfvbEwQ==
redux-promise-middleware@^6.1.2:
version "6.1.2"
resolved "https://registry.yarnpkg.com/redux-promise-middleware/-/redux-promise-middleware-6.1.2.tgz#1c14222686934be243cbb292e348ef7d5b20d6d2"
integrity sha512-ZqZu/nnSzGgwTtNbGoGVontpk7LjTOv0kigtt3CcgXI9gpq+8WlfXTXRZD0WTD5yaohRq0q2nYmJXSTjwXs83Q==
redux-thunk@^2.3.0: redux-thunk@^2.3.0:
version "2.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622" resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622"

Loading…
Cancel
Save