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

Artifact Upgrade Probability Calculator (dev-mode only) #1209

Merged
merged 57 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b3e41c6
Please dont go into master please please
tooflesswulf Jun 10, 2023
083ca9f
fast eval matches
tooflesswulf Jun 11, 2023
682c51b
fast eval w/ 4th sub working!
tooflesswulf Jun 11, 2023
e27ebde
golf?
tooflesswulf Jun 11, 2023
22ade5e
:)
tooflesswulf Jun 11, 2023
ec945c5
slowEval working :)
tooflesswulf Jun 12, 2023
db45f4c
big ass comment
tooflesswulf Jun 14, 2023
60063e7
integrate new class (I think)
tooflesswulf Jun 24, 2023
a982481
strip out old code
tooflesswulf Jun 24, 2023
d90284c
delet old code
tooflesswulf Jun 24, 2023
dbfb86b
explain some magic numbers
tooflesswulf Jun 24, 2023
853cb77
sigma is so scuffed lmao
tooflesswulf Jun 24, 2023
40a6d5c
format differentiate
tooflesswulf Jun 24, 2023
94d4682
Merge branch 'master' into upopt
tooflesswulf Jun 24, 2023
2533f88
fix (?) import errors
tooflesswulf Jun 29, 2023
b8e1ed8
Merge branch 'master' into upopt
tooflesswulf Jun 29, 2023
1bdd1b1
Merge branch 'master' into upopt
frzyc Jul 2, 2023
e3cfdb2
fix and refactor code
frzyc Jul 2, 2023
cdebb8c
finish implementing calcExact
tooflesswulf Jul 2, 2023
0353bc5
update page layout
frzyc Jul 3, 2023
7a824fe
fix wacky percents
tooflesswulf Jul 3, 2023
9703477
clicking button calls calcExact (UI doesnt update tho)
tooflesswulf Jul 4, 2023
f44840b
fix rendering, annotate bug
frzyc Jul 4, 2023
a242032
unify visualization for exact & approximation. Theres a bug w/ calcEx…
tooflesswulf Jul 4, 2023
0b45471
fix lint
tooflesswulf Jul 4, 2023
d49d01f
fix 4thExact
tooflesswulf Jul 4, 2023
1e32f7a
close the opening histogram :)
tooflesswulf Jul 4, 2023
3e57c84
fix type
tooflesswulf Jul 4, 2023
8e0ffdd
Merge branch 'master' into upopt
frzyc Jul 6, 2023
c743663
Merge branch 'master' into upopt
frzyc Jul 12, 2023
87bdc91
Merge branch 'master' into upopt
frzyc Jul 13, 2023
52af8c2
bugfix: calcExact index
tooflesswulf Jul 14, 2023
b7293b0
fix exactConstrained; change text & color for exact.
tooflesswulf Jul 14, 2023
6e3969d
make exact & est colors more similar
tooflesswulf Jul 14, 2023
21d7e11
lint/format?
tooflesswulf Jul 14, 2023
e5de8c7
lazy load exact graph, show equipped
frzyc Jul 14, 2023
dfa9593
Merge branch 'master' into upopt
nguyentvan7 Jul 14, 2023
faaf0ee
bugfix: graph left of red line disappears
tooflesswulf Jul 14, 2023
1ed4d58
bugfix on bugfix: last "fix" was wrong oop
tooflesswulf Jul 14, 2023
2bdb3f7
Merge branch 'master' into upopt
nguyentvan7 Jul 20, 2023
5733d9f
Merge branch 'master' into upopt
nguyentvan7 Aug 16, 2023
a9d16d0
Merge branch 'master' into upopt
nguyentvan7 Aug 16, 2023
799e004
fix lint
frzyc Aug 17, 2023
83e8e5c
Merge branch 'master' into upopt
nguyentvan7 Oct 4, 2023
3c2581a
Merge branch 'master' into upopt
tooflesswulf Oct 20, 2023
b8d2bae
Merge branch 'master' into upopt
PolomoPT Oct 21, 2023
1984aa6
Merge branch 'master' into upopt
PolomoPT Oct 29, 2023
0d2ae2a
Merge branch 'master' into upopt
nguyentvan7 Nov 9, 2023
e4177cb
Hide UI behind dev flag
nguyentvan7 Nov 9, 2023
fce61a9
Fix api calls
tooflesswulf Nov 9, 2023
7fa202b
Merge branch 'master' into upopt
nguyentvan7 Nov 10, 2023
15f4d26
Merge branch 'master' into upopt
nguyentvan7 Nov 11, 2023
8eda9a0
Merge branch 'master' into upopt
nguyentvan7 Nov 11, 2023
e76431b
Merge branch 'master' into upopt
nguyentvan7 Nov 11, 2023
3c982f4
Fix spacing
nguyentvan7 Nov 12, 2023
9640b9f
Add translation key to NoArtWarning
nguyentvan7 Nov 12, 2023
3149970
Remove dead code
nguyentvan7 Nov 12, 2023
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
14 changes: 14 additions & 0 deletions apps/frontend/src/app/Components/AddArtInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Alert, Link } from '@mui/material'
import { Link as RouterLink } from 'react-router-dom'

export default function AddArtInfo() {
return (
<Alert severity="info" variant="filled">
Looks like you haven't added any artifacts yet. If you want, there are
<Link color="warning.main" component={RouterLink} to="/scanner">
automatic scanners
</Link>
that can speed up the import process!
</Alert>
)
}
19 changes: 19 additions & 0 deletions apps/frontend/src/app/Components/NoArtWarning.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Alert, Link } from '@mui/material'
import { Trans, useTranslation } from 'react-i18next'
import { Link as RouterLink } from 'react-router-dom'

export default function NoArtWarning() {
const { t } = useTranslation('page_character_optimize')
return (
<Alert severity="warning" variant="filled">
nguyentvan7 marked this conversation as resolved.
Show resolved Hide resolved
<Trans t={t} i18nKey="noArtis">
Oops! It looks like you haven't added any artifacts to GO yet! You
should go to the
<Link component={RouterLink} to="/artifacts">
Artifacts
</Link>
page and add some!
</Trans>
</Alert>
)
}
14 changes: 2 additions & 12 deletions apps/frontend/src/app/PageArtifact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import { clamp, filterFunction, sortFunction } from '@genshin-optimizer/util'
import { Add } from '@mui/icons-material'
import DifferenceIcon from '@mui/icons-material/Difference'
import {
Alert,
Box,
Button,
CardContent,
Grid,
Link,
Pagination,
Skeleton,
Typography,
Expand All @@ -30,7 +28,7 @@ import React, {
} from 'react'
import ReactGA from 'react-ga4'
import { Trans, useTranslation } from 'react-i18next'
import { Link as RouterLink } from 'react-router-dom'
import AddArtInfo from '../Components/AddArtInfo'
import SubstatToggle from '../Components/Artifact/SubstatToggle'
import BootstrapTooltip from '../Components/BootstrapTooltip'
import CardDark from '../Components/Card/CardDark'
Expand Down Expand Up @@ -197,15 +195,7 @@ export default function PageArtifact() {
<InfoDisplay />
</InfoComponent>

{noArtifact && (
<Alert severity="info" variant="filled">
Looks like you haven't added any artifacts yet. If you want, there are
<Link color="warning.main" component={RouterLink} to="/scanner">
automatic scanners
</Link>
that can speed up the import process!
</Alert>
)}
{noArtifact && <AddArtInfo />}

<ArtifactFilter
numShowing={artifactIds.length}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ import {
import NotificationsActiveIcon from '@mui/icons-material/NotificationsActive'
import NotificationsOffIcon from '@mui/icons-material/NotificationsOff'
import {
Alert,
Box,
Button,
ButtonGroup,
CardContent,
Divider,
Grid,
Link,
MenuItem,
Skeleton,
ToggleButton,
Expand All @@ -37,7 +35,7 @@ import React, {
useState,
} from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { Link as RouterLink, useLocation, useNavigate } from 'react-router-dom'
import { useLocation, useNavigate } from 'react-router-dom'
import ArtifactLevelSlider from '../../../../Components/Artifact/ArtifactLevelSlider'
import BootstrapTooltip from '../../../../Components/BootstrapTooltip'
import CardLight from '../../../../Components/Card/CardLight'
Expand All @@ -48,6 +46,7 @@ import {
ReactionToggle,
} from '../../../../Components/HitModeEditor'
import InfoTooltip from '../../../../Components/InfoTooltip'
import NoArtWarning from '../../../../Components/NoArtWarning'
import SolidToggleButtonGroup from '../../../../Components/SolidToggleButtonGroup'
import SqBadge from '../../../../Components/SqBadge'
import { CharacterContext } from '../../../../Context/CharacterContext'
Expand Down Expand Up @@ -503,18 +502,7 @@ export default function TabBuild() {
const getNormBuildLabel = useCallback((index: number) => `#${index + 1}`, [])
return (
<Box display="flex" flexDirection="column" gap={1}>
{noArtifact && (
<Alert severity="warning" variant="filled">
<Trans t={t} i18nKey="noArtis">
Oops! It looks like you haven't added any artifacts to GO yet! You
should go to the
<Link component={RouterLink} to="/artifacts">
Artifacts
</Link>
page and add some!
</Trans>
</Alert>
)}
{noArtifact && <NoArtWarning />}
{/* Build Generator Editor */}
{dataContext && (
<DataContext.Provider value={dataContext}>
Expand Down
Loading
Loading