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

SRO: Add traces to sheets #2562

Merged
merged 6 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 6 additions & 2 deletions libs/pando/ui-sheet/src/components/DocumentDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CardBackgroundColor } from '@genshin-optimizer/common/ui'
import { CardThemed } from '@genshin-optimizer/common/ui'
import { evalIfFunc } from '@genshin-optimizer/common/util'
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'
import { Box, Collapse } from '@mui/material'
import { Box, Collapse, Typography } from '@mui/material'
import { useContext, useState } from 'react'
import { CalcContext, TagContext } from '../context'
import type { Document, FieldsDocument, TextDocument } from '../types'
Expand Down Expand Up @@ -68,7 +68,11 @@ function TextSectionDisplay({ textDocument }: { textDocument: TextDocument }) {
const calculator = useContext(CalcContext)
const tag = useContext(TagContext)
if (!calculator) return null
return <div>{evalIfFunc(textDocument.text, calculator.withTag(tag))}</div>
return (
<Typography>
{evalIfFunc(textDocument.text, calculator.withTag(tag))}
</Typography>
)
}
function TextSectionDisplayCollapse({
textDocument,
Expand Down
9 changes: 7 additions & 2 deletions libs/pando/ui-sheet/src/components/FieldDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ export function TextFieldDisplay({
return (
<Box
width="100%"
sx={{ display: 'flex', justifyContent: 'space-between', gap: 1 }}
sx={{
display: 'flex',
justifyContent: 'space-between',
gap: 1,
py: 0.25,
}}
component={component}
>
<Typography color={`${variant}.main`}>
Expand All @@ -78,7 +83,7 @@ export function TagFieldDisplay({
field,
component = ListItem,
emphasize,
showZero = false,
showZero = process.env.NODE_ENV === 'development',
frzyc marked this conversation as resolved.
Show resolved Hide resolved
}: {
field: TagField
component?: React.ElementType
Expand Down
2 changes: 1 addition & 1 deletion libs/pando/ui-sheet/src/types/sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ReactNode } from 'react'
import type { Document } from './document'

export type UISheetElement = {
img: string | StaticImageData
img?: string | StaticImageData
title: ReactNode
subtitle?: ReactNode
documents: Document[]
Expand Down
21 changes: 21 additions & 0 deletions libs/sr/dm-localization/assets/locales/chs/charSheet_gen.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions libs/sr/dm-localization/assets/locales/chs/sheet_gen.json

This file was deleted.

8 changes: 0 additions & 8 deletions libs/sr/dm-localization/assets/locales/chs/slotKey_gen.json

This file was deleted.

21 changes: 21 additions & 0 deletions libs/sr/dm-localization/assets/locales/cht/charSheet_gen.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions libs/sr/dm-localization/assets/locales/cht/sheet_gen.json

This file was deleted.

8 changes: 0 additions & 8 deletions libs/sr/dm-localization/assets/locales/cht/slotKey_gen.json

This file was deleted.

21 changes: 21 additions & 0 deletions libs/sr/dm-localization/assets/locales/de/charSheet_gen.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions libs/sr/dm-localization/assets/locales/de/sheet_gen.json

This file was deleted.

8 changes: 0 additions & 8 deletions libs/sr/dm-localization/assets/locales/de/slotKey_gen.json

This file was deleted.

21 changes: 21 additions & 0 deletions libs/sr/dm-localization/assets/locales/en/charSheet_gen.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 0 additions & 38 deletions libs/sr/dm-localization/assets/locales/en/sheet_gen.json

This file was deleted.

Loading
Loading