Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI tablet issues #1177

Closed
wants to merge 2 commits into from
Closed
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
19 changes: 10 additions & 9 deletions src/components/EmailDetail/EmailDetailStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ export const DraftHeaderControls = styled.div`
`

export const EmailOptionsContainer = styled.div<IEmailDetail>`
position: relative;
min-height: 200px;
padding: 30px;
left: ${({ tabbedView }) => (tabbedView ? '0' : '75px')};
width: 140px;
margin-right: var(--spacing-3);
margin-left: var(--spacing-2);
`

export const EmailOptionsPlaceholder = styled.div`
Expand Down Expand Up @@ -117,6 +117,7 @@ export const DetailBase = styled.div`
`

export const OverviewContainer = styled.div`
width: 100%;
display: flex;
flex-direction: column;
margin-left: auto;
Expand All @@ -139,16 +140,16 @@ export const CardFullWidth = styled.div`
`

export const EmailDetailContainer = styled.div<IEmailDetail>`
width: ${({ tabbedView }) => (tabbedView ? '100%' : '100vw')};
min-width: ${({ tabbedView }) => (tabbedView ? '665px' : '300px')};
max-width: min(100vw - 340px, 860px);
/* padding-bottom: 320px; */
width: 100%;
margin-bottom: 20px;
overflow: scroll;
scrollbar-width: none;
transition: all 0.2s ease-in-out;
left: ${({ tabbedView }) => (tabbedView ? '0' : '75px')};
position: relative;
margin-left: var(--spacing-3);
@media only screen and (min-width: ${breakPoint.xl}) {
width: 100vw;
max-width: min(100vw - 340px, 860px);
}

&::-webkit-scrollbar {
display: none; /* for Chrome, Safari, and Opera */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import handleEmailLink from 'utils/handleEmailLink'
import openLinkInNewTab from 'utils/openLinkInNewTab'
import sanitizeAndParseHtmlContent from 'utils/sanitizeAndParseHtmlContent'

import Wrapper from './EmailDetailBodyStyles'
import { Wrapper, ShadowStyles } from './EmailDetailBodyStyles'

interface IEmailDetailBody {
threadDetailBody: any
Expand Down Expand Up @@ -75,7 +75,9 @@ const ShadowBody = ({

return (
<root.div ref={callbackRef}>
{sanitizeAndParseHtmlContent(bodyState.emailHTML)}
<ShadowStyles>
{sanitizeAndParseHtmlContent(bodyState.emailHTML)}
</ShadowStyles>
</root.div>
)
}
Expand Down Expand Up @@ -133,7 +135,10 @@ const EmailDetailBody = ({
key={`${item.filename + itemIdx}`}
src={`data:${item.mimeType};base64,${item.decodedB64}`}
alt={item?.filename ?? 'embedded image'}
style={{ maxWidth: '100%', borderRadius: '5px' }}
style={{
maxWidth: '100%',
borderRadius: '5px',
}}
/>
)
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import styled from 'styled-components'

const Wrapper = styled.div`
import { breakPoint } from 'constants/themeConstants'

export const Wrapper = styled.div`
display: flex;
justify-content: center;
`

export default Wrapper
export const ShadowStyles = styled.div`
* {
@media only screen and (max-width: ${breakPoint.xl}) {
max-width: 100% !important;
width: auto !important;
box-sizing: border-box !important;
}
}
`
13 changes: 10 additions & 3 deletions src/styles/globalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ export const GlobalStyle = createGlobalStyle`
}

html {
box-sizing: border-box;
font-size: 16px;
}
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

*, *:before, *:after {
-webkit-box-sizing: inherit;
-moz-box-sizing: inherit;
box-sizing: inherit;
}

body {
-webkit-font-smoothing: antialiased !important;
Expand Down