-
Notifications
You must be signed in to change notification settings - Fork 238
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
ZO add advanced Set Filters #2654
Conversation
Warning Rate limit exceeded@frzyc has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 12 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (13)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
[zzz-frontend] [Thu Jan 30 07:35:32 UTC 2025] - Deployed 2a62ab4 to https://genshin-optimizer-prs.github.io/pr/2654/zzz-frontend (Takes 3-5 minutes after this completes to be available) [sr-frontend] [Thu Jan 30 07:36:11 UTC 2025] - Deployed 2a62ab4 to https://genshin-optimizer-prs.github.io/pr/2654/sr-frontend (Takes 3-5 minutes after this completes to be available) [frontend] [Thu Jan 30 07:37:34 UTC 2025] - Deployed 2a62ab4 to https://genshin-optimizer-prs.github.io/pr/2654/frontend (Takes 3-5 minutes after this completes to be available) [zzz-frontend] [Thu Jan 30 07:43:29 UTC 2025] - Deployed 47b0239 to https://genshin-optimizer-prs.github.io/pr/2654/zzz-frontend (Takes 3-5 minutes after this completes to be available) [sr-frontend] [Thu Jan 30 07:43:39 UTC 2025] - Deployed 47b0239 to https://genshin-optimizer-prs.github.io/pr/2654/sr-frontend (Takes 3-5 minutes after this completes to be available) [frontend] [Thu Jan 30 07:44:48 UTC 2025] - Deployed 47b0239 to https://genshin-optimizer-prs.github.io/pr/2654/frontend (Takes 3-5 minutes after this completes to be available) [zzz-frontend] [Thu Jan 30 07:53:53 UTC 2025] - Deployed 47b0239 to https://genshin-optimizer-prs.github.io/pr/2654/zzz-frontend (Takes 3-5 minutes after this completes to be available) [sr-frontend] [Thu Jan 30 07:54:11 UTC 2025] - Deployed 47b0239 to https://genshin-optimizer-prs.github.io/pr/2654/sr-frontend (Takes 3-5 minutes after this completes to be available) [frontend] [Thu Jan 30 07:55:34 UTC 2025] - Deployed 47b0239 to https://genshin-optimizer-prs.github.io/pr/2654/frontend (Takes 3-5 minutes after this completes to be available) [zzz-frontend] [Thu Jan 30 16:55:16 UTC 2025] - Deployed 3db7bdd to https://genshin-optimizer-prs.github.io/pr/2654/zzz-frontend (Takes 3-5 minutes after this completes to be available) [sr-frontend] [Thu Jan 30 16:55:23 UTC 2025] - Deployed 3db7bdd to https://genshin-optimizer-prs.github.io/pr/2654/sr-frontend (Takes 3-5 minutes after this completes to be available) [frontend] [Thu Jan 30 16:56:48 UTC 2025] - Deployed 3db7bdd to https://genshin-optimizer-prs.github.io/pr/2654/frontend (Takes 3-5 minutes after this completes to be available) [zzz-frontend] [Thu Jan 30 17:01:18 UTC 2025] - Deployed c9f6737 to https://genshin-optimizer-prs.github.io/pr/2654/zzz-frontend (Takes 3-5 minutes after this completes to be available) [sr-frontend] [Thu Jan 30 17:01:53 UTC 2025] - Deployed c9f6737 to https://genshin-optimizer-prs.github.io/pr/2654/sr-frontend (Takes 3-5 minutes after this completes to be available) [frontend] [Thu Jan 30 17:02:07 UTC 2025] - Deployed c9f6737 to https://genshin-optimizer-prs.github.io/pr/2654/frontend (Takes 3-5 minutes after this completes to be available) [Fri Jan 31 00:12:11 UTC 2025] - Deleted deployment |
} from '@mui/material' | ||
import { useCharacterContext } from './CharacterContext' | ||
|
||
export function SetFilter({ disabled = false }: { disabled?: boolean }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very confusing with both force and set filter. should just remove the force option and have it be like GO (need to disable all 4p and 2p to 'force')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its the same system, it allows people to "force" a single set without having to deal with the advanced config. I think quite a lot of the questions on GO was "how do you force a single set", now there is a shortcut without needing them to juggle a new concept
characterKey && | ||
database.chars.set(characterKey, { | ||
setFilter4: setFilter4.length | ||
? toggleInArr([...setFilter4], setKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is super unintuitive behavior. clicking should only toggle the specific set you clicked, not invert the whole selection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases, when you are selecting sets, you only really need to select 2-3 of them, so this is similiar to the behaviour of our main stat filter, where first click selects just that 1, which ends up being overall less clicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main stat filter on ZZZ works like how i describe (only toggles the specific stat you clicked)
this just goes back to the 3-state button again though so i wont rehash it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I will have to change the zenless one to be similiar to the 3 state button. I am kinda annoyed the amount of clicks needed to set main stats
|
||
if (filter4.length) { | ||
let has4 = false | ||
for (const key in setCount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can do Object.entries(setCount).forEach(([key, count]) => {})
and it will have proper typings and no need for !
access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but its less performant, since it creates a new array
for (const key in setCount) { | ||
const k = key as DiscSetKey | ||
if (setCount[k]! >= 4 && filter4.includes(k)) { | ||
has4 = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we seem to do more of arr.every() or arr.any() checks rather than this for-break paradigm. not a big deal tho, just weird to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use more for loops in calc because they are more performant (how much so I can't attest), I much rather use array function otherwise for robustness
Describe your changes
Adds a set filter:
[]
any (any set/rainbow)[setKey]
(disable rainbow, only builds with the set result)[...setKey, ...]
(disable rainbow, only builds with those sets result)Add a new stage in solver. Builds that fail the set filters gets eliminated.
This should drastically increase build speed upon using the filter.
Issue or discord link
Testing/validation
Using the "quick UI" to select a set
![image](https://private-user-images.githubusercontent.com/1754901/408030977-a5914ffa-5678-4f21-bc39-c9bf3806a1c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNjQ2MzksIm5iZiI6MTczOTA2NDMzOSwicGF0aCI6Ii8xNzU0OTAxLzQwODAzMDk3Ny1hNTkxNGZmYS01Njc4LTRmMjEtYmMzOS1jOWJmMzgwNmExYzEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMDEyNTM5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjhmZjNjZTliMGQ4MTBmYTgwODY1MDFiOWVmNzRjNTc3NDJkYmIxYWRhZDMyODhiN2YwNzVlMTZiMTA2YmFiMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.0SWhYd4lTX_LhfmtGlsTdpdv9k3LPle6HZuCaessxkk)
![image](https://private-user-images.githubusercontent.com/1754901/408031821-1f8ac129-ea69-4cbc-bbb9-aa7a556ddb0f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNjQ2MzksIm5iZiI6MTczOTA2NDMzOSwicGF0aCI6Ii8xNzU0OTAxLzQwODAzMTgyMS0xZjhhYzEyOS1lYTY5LTRjYmMtYmJiOS1hYTdhNTU2ZGRiMGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDlUMDEyNTM5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDA1ZDZlMzFjZmExMzM3YmRlMjIzNTQ4OWU0OGQ3ZGQ0MjY3YzkzYjg0YmFlZmNmMjE2ZTE4NGYzZjkzZGY4YiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.v__IcbnQxffD0THgzXLQOLFnZ2ssiirJoMHNh8hZQaE)
Using the "Advanced UI" to select multiple sets
Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)
yarn run mini-ci
locally to validate format and lint.