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

General Fixes (1.10.7) #36

Merged
merged 19 commits into from
Nov 13, 2024
Merged

General Fixes (1.10.7) #36

merged 19 commits into from
Nov 13, 2024

Conversation

Scyye
Copy link
Collaborator

@Scyye Scyye commented Nov 13, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced internationalization support across multiple plugins, replacing direct message references with localized string identifiers.
    • Improved error handling and user notifications in various components, including crash handling and timeout displays.
    • Added settings for managing user interactions with hidden channels and friend requests.
  • Bug Fixes

    • Resolved issues with message logging, deletion, and editing functionalities to ensure accurate tracking and display.
  • Documentation

    • Updated import statements to reflect changes in internationalization methods, improving clarity and maintainability.
  • Refactor

    • Streamlined code structure by consolidating error handling and updating component retrieval methods for better performance and readability.

@Scyye Scyye merged commit dd37398 into ScyyeCord:main Nov 13, 2024
1 check was pending
Copy link

coderabbitai bot commented Nov 13, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request includes extensive modifications across multiple files, primarily focusing on enhancing internationalization (i18n) support by replacing hardcoded message references with dynamic keys. Key changes involve updating the package.json version and dependencies, refining error handling in various components, and improving the logic for rendering UI elements based on user settings. The updates aim to streamline the localization process, enhance error resilience, and ensure consistent behavior across plugins while maintaining existing functionalities.

Changes

File Path Change Summary
package.json Version updated from 1.10.5 to 1.10.7; new dependency @intrnl/xxhash64 added.
scripts/generateReport.ts Modified error handling in printReport; regex pattern for badPatches report updated.
src/components/Icons.tsx Updated aria-label in OwnerCrownIcon to use getIntlMessage.
src/components/VencordSettings/PatchHelperTab.tsx Changed parsing logic for FullPatchInput to evaluate as an array.
src/debug/loadLazyChunks.ts Simplified shouldForceDefer logic to always be false.
src/plugins/_api/memberListDecorators.ts Updated GUILD_OWNER decorator identification to use #{intl::GUILD_OWNER}.
src/plugins/_api/messageAccessories.ts Changed find property for message accessories to use #{intl::REMOVE_ATTACHMENT_BODY}.
src/plugins/_api/messageDecorations.ts Updated match pattern for GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE to #{intl::...}.
src/plugins/_api/messageEvents.ts Enhanced asynchronous handling of message events with new patterns.
src/plugins/_api/messagePopover.ts Updated find property to use #{intl::MESSAGE_UTILITIES_A11Y_LABEL}.
src/plugins/_api/serverList.ts Changed find patterns to use #{intl::...} for server list messages.
src/plugins/_core/noTrack.ts Removed patch that forced getDebugLogging() to always return false.
src/plugins/_core/settings.tsx Added getIntlMessage import; removed i18n import; updated settings management logic.
src/plugins/_core/supportHelper.tsx Updated string formatting to use #{intl::BEGINNING_DM} and enhanced error handling.
src/plugins/accountPanelServerProfile/index.tsx Updated string identifiers for account panel messages to use internationalization.
src/plugins/alwaysAnimate/index.ts Updated find property to use #{intl::GUILD_OWNER} for animation logic.
src/plugins/anonymiseFileNames/index.tsx Enhanced file anonymization logic with new settings and updated patching logic.
src/plugins/banger/index.ts Updated find property for BAN_CONFIRM_TITLE to #intl::BAN_CONFIRM_TITLE.
src/plugins/betterFolders/index.tsx Improved error handling and filtering logic for Better Folders sidebar.
src/plugins/betterGifAltText/index.ts Updated GIF identifier references to use #{intl::GIF}.
src/plugins/betterNotes/index.tsx Updated find string for note placeholders to #{intl::NOTE_PLACEHOLDER}.
src/plugins/betterRoleDot/index.ts Updated role dot identifiers to use #{intl::ADD_ROLE_A11Y_LABEL}.
src/plugins/betterSessions/index.tsx Enhanced session management with error boundaries and async handling.
src/plugins/betterSettings/index.tsx Updated settings management to use getIntlMessage for menu labels.
src/plugins/clientTheme/index.tsx Updated component initialization to use internationalization strings.
src/plugins/consoleJanitor/index.ts Enhanced logging functionality and deprecated warning management.
src/plugins/consoleShortcuts/index.ts Added runtimeHashMessageKey to shortcuts API.
src/plugins/copyFileContents/index.tsx Updated find property to use #{intl::PREVIEW_BYTES_LEFT}.
src/plugins/crashHandler/index.ts Enhanced crash handling logic with new state management.
src/plugins/decor/index.tsx Updated avatar decoration handling with new hooks and state management.
src/plugins/decor/lib/stores/AuthorizationStore.tsx Updated storage configuration for Zustand store.
src/plugins/decor/lib/stores/UsersDecorationsStore.ts Enhanced error handling with try-catch blocks.
src/plugins/decor/ui/components/DecorationGridCreate.tsx Updated component initialization to use #{intl::CREATE}.
src/plugins/decor/ui/components/DecorationGridNone.tsx Updated message retrieval to use getIntlMessage("NONE").
src/plugins/disableCallIdle/index.ts Updated permission identifiers to use internationalization.
src/plugins/fakeNitro/index.tsx Enhanced emoji and sticker permission handling with new settings.
src/plugins/fakeProfileThemes/index.tsx Updated string identifiers for profile themes to use internationalization.
src/plugins/forceOwnerCrown/index.ts Updated find property for GUILD_OWNER to use #{intl::GUILD_OWNER}.
src/plugins/friendsSince/index.tsx Updated regex patterns for user friendship indicators to use internationalization.
src/plugins/fullSearchContext/index.tsx Enhanced accessibility labels with getIntlMessage for context menus.
src/plugins/gameActivityToggle/index.tsx Updated string references to use #{intl::ACCOUNT_SPEAKING_WHILE_MUTED}.
src/plugins/greetStickerPicker/index.tsx Updated context menu handling for greeting stickers with new identifiers.
src/plugins/ignoreActivities/index.tsx Enhanced activity toggling and settings management.
src/plugins/implicitRelationships/index.ts Enhanced relationship handling with new fetch logic and sorting.
src/plugins/invisibleChat.desktop/index.tsx Updated message editing patch to use internationalization.
src/plugins/keepCurrentChannel/index.ts Enhanced channel transition logic during account switching.
src/plugins/loadingQuotes/index.ts Updated loading quote identification to use #{intl::LOADING_DID_YOU_KNOW}.
src/plugins/memberCount/index.tsx Updated rendering logic for member count display based on user settings.
src/plugins/messageLogger/index.tsx Enhanced message deletion and editing features with new logging.
src/plugins/moreUserTags/index.tsx Updated tag handling with new internationalization support.
src/plugins/noBlockedMessages/index.ts Enhanced message hiding logic with new dynamic checks.
src/plugins/noOnboardingDelay/index.ts Updated onboarding subtitle identification to use #{intl::ONBOARDING_COVER_WELCOME_SUBTITLE}.
src/plugins/noUnblockToJump/index.ts Updated match patterns for unblock to jump functionality.
src/plugins/normalizeMessageLinks/index.ts Updated message link copy functionality to use internationalization.
src/plugins/pauseInvitesForever/index.tsx Enhanced invite management with new localization support.
src/plugins/permissionFreeWill/index.ts Updated permission identifiers to use internationalization.
src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx Updated context menu labels to use getIntlMessage.
src/plugins/permissionsViewer/components/UserPermissions.tsx Updated permission string retrieval to use getIntlMessage.
src/plugins/permissionsViewer/index.tsx Enhanced permissions viewing capabilities with updated context menu integration.
src/plugins/permissionsViewer/utils.ts Streamlined permission string retrieval with getIntlMessage.
src/plugins/pinDms/components/CreateCategoryModal.tsx Updated component initialization to use internationalization.
src/plugins/relationshipNotifier/utils.ts Added null check for current user in syncAndRunChecks.
src/plugins/replyTimestamp/index.tsx Updated patching logic for reply timestamps to use internationalization.
src/plugins/reverseImageSearch/index.tsx Updated context menu patching for image searches with internationalization.
src/plugins/roleColorEverywhere/index.tsx Updated identifiers in the patches section for internationalization.
src/plugins/shikiCodeblocks.desktop/index.ts Updated patching logic for code block previews with internationalization.
src/plugins/showAllMessageButtons/index.ts Updated patching logic for message buttons to use internationalization.
src/plugins/showConnections/VerifiedIcon.tsx Updated tooltip text retrieval to use getIntlMessage.
src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx Updated component retrieval to use internationalization.
src/plugins/showHiddenChannels/index.tsx Enhanced hidden channel functionality with updated rendering logic.
src/plugins/showHiddenThings/index.ts Updated predicates and replacements in patches for dynamic behavior.
src/plugins/showTimeoutDuration/index.tsx Enhanced timeout display logic with internationalization support.
src/plugins/sortFriendRequests/index.tsx Enhanced friend request sorting and display logic.
src/plugins/startupTimings/index.tsx Updated patching logic for startup timings with internationalization.
src/plugins/themeAttributes/index.ts Updated avatar styles handling with new conditions for data URLs.
src/plugins/typingIndicator/index.tsx Enhanced typing indicator functionality with guild-specific information.
src/plugins/typingTweaks/index.tsx Improved error handling and rendering logic for typing indicators.
src/plugins/unlockedAvatarZoom/index.ts Updated avatar upload edit media identifier to use internationalization.
src/plugins/userMessagesPronouns/PronounsChatComponent.tsx Updated tooltip text retrieval to use getIntlMessage.
src/plugins/userVoiceShow/components.tsx Updated channel name retrieval to use internationalization.
src/plugins/userVoiceShow/index.tsx Enhanced user profile and message indicators with updated patching logic.

Poem

In the code where changes bloom,
A rabbit hops to clear the gloom.
With messages now dressed in style,
International joy, spreading a smile.
From patches bright to settings new,
Every tweak brings a hop, it's true! 🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/components/Icons.tsx

Oops! Something went wrong! :(

ESLint: 9.14.0

Error: Key "rules": Key "no-useless-escape":
Value [{"extra":"i"}] should NOT have more than 0 items.

at RuleValidator.validate (/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/config/rule-validator.js:170:27)
at new Config (/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/config/config.js:243:27)
at [finalizeConfig] (/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/config/flat-config-array.js:216:16)
at FlatConfigArray.getConfigWithStatus (/node_modules/.pnpm/@[email protected]/node_modules/@eslint/config-array/dist/cjs/index.cjs:1102:55)
at FlatConfigArray.getConfig (/node_modules/.pnpm/@[email protected]/node_modules/@eslint/config-array/dist/cjs/index.cjs:1120:15)
at /node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/eslint.js:764:40
at async Promise.all (index 0)
at async ESLint.lintFiles (/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/eslint.js:759:25)
at async Object.execute (/node_modules/.pnpm/[email protected]/node_modules/eslint/lib/cli.js:498:23)
at async main (/node_modules/.pnpm/[email protected]/node_modules/eslint/bin/eslint.js:158:22)

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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants