Skip to content

draft: update showcase / optimizer / relic card dimensions #1041

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

Draft
wants to merge 1 commit into
base: beta
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion src/lib/characterPreview/CharacterPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function CharacterPreview(props: {
const finalStats = getShowcaseStats(character, displayRelics, showcaseMetadata)

return (
<Flex vertical style={{ width: 1068 }}>
<Flex vertical style={{ width: 1082 }}>
<RelicModal
selectedRelic={selectedRelic}
type='edit'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/characterPreview/ShowcaseCustomizationSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const ShowcaseCustomizationSidebar = forwardRef<ShowcaseCustomizationSidebarRef,
gap={16}
style={{
position: 'absolute',
marginLeft: 1085,
marginLeft: 1090,
width: 130,
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tabs/tabOptimizer/OptimizerBuildPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function OptimizerBuildPreview() {

return (
<div>
<Flex gap={5} id='optimizerBuildPreviewContainer' justify='space-between' style={{ paddingLeft: 1, paddingRight: 1 }}>
<Flex gap={6} id='optimizerBuildPreviewContainer' justify='space-between' style={{}}>
<RelicPreview setEditModalOpen={setEditModalOpen} setSelectedRelic={setSelectedRelic} relic={headRelic} score={headScore}/>
<RelicPreview setEditModalOpen={setEditModalOpen} setSelectedRelic={setSelectedRelic} relic={handsRelic} score={handsScore}/>
<RelicPreview setEditModalOpen={setEditModalOpen} setSelectedRelic={setSelectedRelic} relic={bodyRelic} score={bodyScore}/>
Expand Down
14 changes: 7 additions & 7 deletions src/lib/tabs/tabOptimizer/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@ function OptimizerControlsGroup(props: { isFullSize: boolean }) {
</Flex>

{!props.isFullSize
&& (
<Flex vertical gap={3} style={{ flex: 1, minWidth: 211 }}>
<HeaderText>{t('ComputeEngine')/* Compute engine */}</HeaderText>
<ComputeEngineSelect/>
<ProgressDisplay/>
</Flex>
)}
&& (
<Flex vertical gap={3} style={{ flex: 1, minWidth: 211 }}>
<HeaderText>{t('ComputeEngine')/* Compute engine */}</HeaderText>
<ComputeEngineSelect/>
<ProgressDisplay/>
</Flex>
)}
</Flex>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const defaultHiddenColumns = [
]

export const GRID_DIMENSIONS = {
WIDTH: 1227,
WIDTH: 1272,
HEIGHT: 600,
MIN_HEIGHT: 300,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const DIGITS_5 = 56
export const DIGITS_6 = 62

export const optimizerTabDefaultGap = 5
export const panelWidth = 211
export const panelWidth = 220
export const defaultPadding = 11

export const optimizerGridOptions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function FilterContainer(props: { children: ReactElement | ReactE
backdropFilter: 'blur(5px)',
border: '1px solid rgba(255, 255, 255, 0.10)',
WebkitBackdropFilter: 'blur(5px)',
width: 1227,
width: 1272,
}}
>
{props.children}
Expand Down
17 changes: 6 additions & 11 deletions src/lib/tabs/tabOptimizer/optimizerForm/layout/FormCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export const cardShadowNonInset = 'rgba(0, 0, 0, 0.25) 0px 0.0625em 0.0625em, rg
const defaultGap = 5

const smallWidth = panelWidth
const narrowWidth = 233
const mediumWidth = 373
const narrowWidth = 242
const mediumWidth = 390
const largeWidth = 1183

const dimsBySize: Record<string, number> = {
small: smallWidth,
narrow: 233,
narrow: narrowWidth,
medium: mediumWidth,
large: largeWidth,
}
Expand Down Expand Up @@ -44,17 +44,12 @@ export default function FormCard(props: {
}}
>
<Flex
vertical
style={{ width: width }}
gap={defaultGap}
justify={props.justify ?? undefined}
>
<Flex
vertical
style={{ width: width }}
gap={defaultGap}
justify={props.justify ?? undefined}
>
{props.children}
</Flex>
{props.children}
</Flex>
</Flex>
)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/tabs/tabRelics/RelicPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function RelicPreview(props: {
hoverable={source != ShowcaseSource.SHOWCASE_TAB && source != ShowcaseSource.BUILDS_MODAL}
onClick={cardClicked}
style={{
width: 200,
width: 207,
height: 280,
backgroundColor: showcaseTheme?.cardBackgroundColor,
borderColor: showcaseTheme?.cardBorderColor,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ export const Utils = {
const minDataLength = 1200000
const maxAttempts = isMobileOrSafari ? 9 : 3
const scale = 1.5
const w = 1068 * scale
const h = 856 * scale
const w = 1100 * scale
const h = 880 * scale

const options = {
pixelRatio: 1,
Expand Down