Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Bug fixes may #5071

Merged
merged 5 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions src/components/composer/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ import styled, { css } from 'styled-components';
import theme from 'shared/theme';
import Icon from 'src/components/icon';
import { hexa, FlexRow, FlexCol, zIndex } from '../globals';
import { MAX_WIDTH, MEDIA_BREAK, TITLEBAR_HEIGHT } from 'src/components/layout';
import {
COL_GAP,
MAX_WIDTH,
MEDIA_BREAK,
TITLEBAR_HEIGHT,
NAVBAR_EXPANDED_WIDTH,
NAVBAR_WIDTH,
MIN_WIDTH_TO_EXPAND_NAVIGATION,
} from 'src/components/layout';

export const DropzoneWrapper = styled.div`
position: sticky;
Expand All @@ -30,13 +38,26 @@ export const DropImageOverlay = (props: {
};

export const Wrapper = styled.div`
grid-area: main;
display: flex;
justify-content: center;
z-index: 9995;
position: fixed;
max-width: ${MAX_WIDTH}px;
left: ${NAVBAR_WIDTH + COL_GAP}px;
width: 100%;
max-width: calc(100% - ${NAVBAR_WIDTH * 2}px);

@media (max-width: ${MEDIA_BREAK}px) {
height: calc(100vh - ${TITLEBAR_HEIGHT}px);
left: 0;
right: 0;
bottom: 0;
max-width: 100%;
}

@media (min-width: ${MIN_WIDTH_TO_EXPAND_NAVIGATION}px) {
left: ${NAVBAR_EXPANDED_WIDTH + COL_GAP}px;
max-width: calc(100% - ${NAVBAR_EXPANDED_WIDTH * 2}px);
}
`;

Expand Down
2 changes: 1 addition & 1 deletion src/components/entities/listItems/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const Channel = (props: Props) => {

return (
<ErrorBoundary>
<Link to={`/${channel.community.slug}/${channel.slug}`}>
<Link to={`/${channel.community.slug}/${channel.slug}?tab=posts`}>
<Row isActive={isActive}>
<Content>
{name && (
Expand Down
5 changes: 3 additions & 2 deletions src/components/message/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ class Message extends React.Component<Props, State> {
const searchObj = queryString.parse(location.search);
const { m = null } = searchObj;
const isSelected = m && m === selectedMessageId;

const isOptimistic =
message && typeof message.id === 'number' && message.id < 0;
return (
<ConditionalWrap
condition={!!isSelected}
Expand Down Expand Up @@ -298,7 +299,7 @@ class Message extends React.Component<Props, State> {
/>
)}

{!isEditing && (
{!isEditing && !isOptimistic && (
<ActionsContainer>
<Actions>
{canEditMessage && (
Expand Down
2 changes: 1 addition & 1 deletion src/views/thread/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export const StickyHeaderContent = styled.div`
display: flex;
padding: 12px 16px;
cursor: pointer;
max-width: 70%;
max-width: 560px;

@media (max-width: 728px) {
padding: 16px;
Expand Down