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

ZO: Partial implementation of disc filters #2643

Merged
merged 17 commits into from
Jan 31, 2025

Conversation

failchon
Copy link
Contributor

@failchon failchon commented Jan 28, 2025

Describe your changes

Filter for discs

Issue or discord link

Testing/validation

image
image

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

Copy link
Contributor

coderabbitai bot commented Jan 28, 2025

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

📥 Commits

Reviewing files that changed from the base of the PR and between 1a673dd and 7e820a1.

📒 Files selected for processing (41)
  • libs/common/database-ui/src/hooks/useDataEntryBase.tsx (1 hunks)
  • libs/zzz/db-ui/src/hooks/index.ts (1 hunks)
  • libs/zzz/db-ui/src/hooks/useDiscDisplay.ts (1 hunks)
  • libs/zzz/db/src/Database/DataEntries/DisplayDiscEntry.ts (5 hunks)
  • libs/zzz/db/src/Database/Database.ts (3 hunks)
  • libs/zzz/localization/assets/locales/en/disc.json (3 hunks)
  • libs/zzz/localization/assets/locales/en/discNames_gen.json (1 hunks)
  • libs/zzz/localization/assets/locales/en/statKey_gen.json (1 hunks)
  • libs/zzz/localization/assets/locales/en/ui.json (1 hunks)
  • libs/zzz/stats/src/index.ts (1 hunks)
  • libs/zzz/svgicons/src/components/ElementIcon.tsx (2 hunks)
  • libs/zzz/ui/src/Character/CharIconSideElement.tsx (1 hunks)
  • libs/zzz/ui/src/Character/LocationFilterMultiAutocomplete.tsx (1 hunks)
  • libs/zzz/ui/src/Character/index.tsx (1 hunks)
  • libs/zzz/ui/src/Disc/DiscFilter.tsx (1 hunks)
  • libs/zzz/ui/src/Disc/DiscFilterDisplay.tsx (1 hunks)
  • libs/zzz/ui/src/Disc/DiscInventory.tsx (4 hunks)
  • libs/zzz/ui/src/Disc/DiscLevelSlider.tsx (1 hunks)
  • libs/zzz/ui/src/Disc/DiscMainStatMultiAutocomplete.tsx (1 hunks)
  • libs/zzz/ui/src/Disc/DiscSetMultiAutocomplete.tsx (1 hunks)
  • libs/zzz/ui/src/Disc/SubstatMultiAutocomplete.tsx (1 hunks)
  • libs/zzz/ui/src/Disc/index.tsx (1 hunks)
  • libs/zzz/ui/src/context/SillyContext.tsx (1 hunks)
  • libs/zzz/ui/src/context/index.ts (1 hunks)
  • libs/zzz/ui/src/toggles/DiscSlotToggle.tsx (1 hunks)
  • libs/zzz/ui/src/toggles/index.ts (1 hunks)
  • libs/zzz/util/.eslintrc.json (1 hunks)
  • libs/zzz/util/README.md (1 hunks)
  • libs/zzz/util/jest.config.ts (1 hunks)
  • libs/zzz/util/package.json (1 hunks)
  • libs/zzz/util/project.json (1 hunks)
  • libs/zzz/util/src/disc/disc.ts (1 hunks)
  • libs/zzz/util/src/disc/discSortUtil.ts (1 hunks)
  • libs/zzz/util/src/disc/index.ts (1 hunks)
  • libs/zzz/util/src/index.ts (1 hunks)
  • libs/zzz/util/src/level.ts (1 hunks)
  • libs/zzz/util/tsconfig.eslint.json (1 hunks)
  • libs/zzz/util/tsconfig.json (1 hunks)
  • libs/zzz/util/tsconfig.lib.json (1 hunks)
  • libs/zzz/util/tsconfig.spec.json (1 hunks)
  • tsconfig.base.json (1 hunks)
 ___________________________________
< I like big bugs and I cannot lie. >
 -----------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented Jan 28, 2025

[sr-frontend] [Tue Jan 28 09:10:14 UTC 2025] - Deployed eab8a1c to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Tue Jan 28 09:10:38 UTC 2025] - Deployed eab8a1c to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Jan 28 09:10:51 UTC 2025] - Deployed eab8a1c to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Tue Jan 28 16:34:55 UTC 2025] - Deployed aacfc0f to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Jan 28 16:35:07 UTC 2025] - Deployed aacfc0f to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Tue Jan 28 16:35:57 UTC 2025] - Deployed aacfc0f to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Tue Jan 28 20:45:29 UTC 2025] - Deployed 727c39c to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Tue Jan 28 20:45:41 UTC 2025] - Deployed 727c39c to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Jan 28 20:46:11 UTC 2025] - Deployed 727c39c to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Tue Jan 28 21:21:41 UTC 2025] - Deployed c23a1b2 to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Tue Jan 28 21:21:58 UTC 2025] - Deployed c23a1b2 to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Jan 28 21:23:01 UTC 2025] - Deployed c23a1b2 to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Tue Jan 28 22:30:22 UTC 2025] - Deployed 8157c0b to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Tue Jan 28 22:30:31 UTC 2025] - Deployed 8157c0b to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Tue Jan 28 22:31:26 UTC 2025] - Deployed 8157c0b to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Wed Jan 29 07:14:59 UTC 2025] - Deployed 8157c0b to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Wed Jan 29 07:15:14 UTC 2025] - Deployed 8157c0b to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed Jan 29 07:16:14 UTC 2025] - Deployed 8157c0b to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Wed Jan 29 07:22:29 UTC 2025] - Deployed a78695c to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Wed Jan 29 07:22:36 UTC 2025] - Deployed a78695c to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed Jan 29 07:23:30 UTC 2025] - Deployed a78695c to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Wed Jan 29 14:36:57 UTC 2025] - Deployed cc83668 to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Wed Jan 29 14:37:04 UTC 2025] - Deployed cc83668 to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed Jan 29 14:37:39 UTC 2025] - Deployed cc83668 to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Wed Jan 29 20:55:48 UTC 2025] - Deployed 35b2e72 to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Wed Jan 29 20:56:05 UTC 2025] - Deployed 35b2e72 to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Wed Jan 29 20:56:08 UTC 2025] - Deployed 35b2e72 to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Thu Jan 30 12:32:34 UTC 2025] - Deployed dd8ea5c to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Thu Jan 30 12:32:42 UTC 2025] - Deployed dd8ea5c to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Thu Jan 30 12:33:02 UTC 2025] - Deployed dd8ea5c to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[zzz-frontend] [Thu Jan 30 20:35:06 UTC 2025] - Deployed cb0cb7c to https://genshin-optimizer-prs.github.io/pr/2643/zzz-frontend (Takes 3-5 minutes after this completes to be available)

[frontend] [Thu Jan 30 20:35:33 UTC 2025] - Deployed cb0cb7c to https://genshin-optimizer-prs.github.io/pr/2643/frontend (Takes 3-5 minutes after this completes to be available)

[sr-frontend] [Thu Jan 30 20:35:39 UTC 2025] - Deployed cb0cb7c to https://genshin-optimizer-prs.github.io/pr/2643/sr-frontend (Takes 3-5 minutes after this completes to be available)

[Fri Jan 31 00:11:43 UTC 2025] - Deleted deployment

@failchon failchon changed the title Partial implementation of disc filters ZO: Partial implementation of disc filters Jan 28, 2025
@frzyc frzyc added the ZO Zenless Optimizer label Jan 29, 2025
@failchon failchon marked this pull request as ready for review January 29, 2025 14:42
Copy link
Owner

@frzyc frzyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The filters are not all "on" by default

When i created a new disc, it crashed:
image

@failchon
Copy link
Contributor Author

The filters are not all "on" by default

When i created a new disc, it crashed: image

Should be solved

@failchon failchon requested a review from frzyc January 30, 2025 20:33
type DiscSetKey,
} from '@genshin-optimizer/zzz/consts'

export const setKeysByRarities = Object.fromEntries(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not required for ZO

Copy link
Owner

@frzyc frzyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, works well enough.

@frzyc frzyc merged commit 7627ec7 into frzyc:master Jan 31, 2025
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZO Zenless Optimizer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ZO - disc filter for disc page
2 participants