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

Ml/nobranch add dependency control pattern #1288

Merged

Conversation

technoplato
Copy link
Collaborator

@technoplato technoplato commented Dec 3, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new MessageContext for managing time indicator visibility in chat.
    • Added BubbleContainer and BubbleContentContainer components for structured message bubbles.
    • Implemented useRemoteAttachment hook for fetching remote attachments.
  • Refactor

    • Significant refactor of the Chat component, with all logic commented out in preparation for redesign.
    • Streamlined AddAttachmentButton to use hooks and context for media handling.
    • Updated ChatGroupUpdatedMessage to utilize structured props for member updates.
  • Bug Fixes

    • Improved error handling and state management in various components, including ConsentPopup and GroupConsentPopup.
  • Documentation

    • Updated README.md to clarify instructions and testing procedures.
  • Chores

    • Removed deprecated components and props across multiple files to enhance code cleanliness.

@technoplato technoplato requested review from a team as code owners December 3, 2024 20:13
Copy link
Contributor

coderabbitai bot commented Dec 3, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request includes significant changes across various files, primarily focusing on the removal and refactoring of components related to chat functionality, as well as updates to configuration files for ESLint, Prettier, and build workflows. Notable modifications include the deletion of several Kotlin files and React components, the introduction of new context and utility files, and updates to build configurations for Android and iOS. The changes aim to streamline the codebase and improve the management of chat-related features, while also enhancing the overall structure and maintainability of the application.

Changes

File Change Summary
.eslintrc.json Deleted; contained ESLint configuration for a React Native project.
.github/workflows/build-app-release.yml Modified build steps for Android and iOS, including script path changes and profile updates.
.github/workflows/build-internal.yml Simplified build process for Android and iOS, consolidating commands and profiles.
.github/workflows/testflight.yml Deleted; defined a workflow for creating TestFlight builds for iOS.
.prettierrc Modified to remove a newline character at the end of the file.
App.tsx Updated imports, removed unused state management logic, and introduced new components for better structure.
App.web.tsx Deleted; contained the main application component for React Native web.
README.md Updated instructions for building applications and added sections for testing and performance.
mocks/@sentry/react-native.ts Added mock implementation for Sentry methods for testing.
adr/adr.001.folder and file structure/adr.001.folder and file structure.md Updated proposal for a feature-based folder structure with detailed implementation steps.
adr/adr.001.folder and file structure/example composite component structure.md Minor typographical corrections and updated import path in TypeScript.
adr/adr.002.architecture for business logic and dependencies - join group/adr.002.architecture-poc-for-business-logic-and-dependencies-group-joining.md Introduced a proposal for refactoring the group joining feature using Composable Architecture patterns.
android/app/build.gradle Updated application namespace, added product flavors, and modified dependencies.
android/app/src/main/AndroidManifest.xml Commented out notification-related elements and services.
android/app/src/main/google-services.json New file added for Google services configuration.
android/app/src/main/java/com/converse/MainActivity.kt Updated package declaration and methods for initializing the activity.
android/app/src/main/java/com/converse/MainApplication.kt Updated package declaration.
android/app/src/main/java/com/converse/dev/AsyncStorage.kt Deleted; contained functions for async storage management.
android/app/src/main/java/com/converse/dev/BackendApi.kt Deleted; contained HTTP request functions.
android/app/src/main/java/com/converse/dev/Datatypes.kt Deleted; contained data classes for notifications and user profiles.
android/app/src/main/java/com/converse/dev/Keychain.kt Deleted; contained functions for secure storage management.
android/app/src/main/java/com/converse/dev/MessageNotification.kt Deleted; contained logic for customizing message notifications.
android/app/src/main/java/com/converse/dev/Mmkv.kt Deleted; managed persistent storage using MMKV.
android/app/src/main/java/com/converse/dev/NotificationParser.kt Deleted; handled parsing of notification payloads.
android/app/src/main/java/com/converse/dev/NotificationUtils.kt Deleted; contained utility functions for managing notification badges.
android/app/src/main/java/com/converse/dev/Profile.kt Deleted; managed user profile retrieval and refresh logic.
android/app/src/main/java/com/converse/dev/PushNotificationsService.kt Deleted; handled push notifications.
android/app/src/main/java/com/converse/dev/Sentry.kt Deleted; contained Sentry integration functions.
android/app/src/main/java/com/converse/dev/Spam.kt Deleted; managed spam detection logic.
android/app/src/main/java/com/converse/dev/Sqlite.kt Deleted; managed SQLite database connections.
android/app/src/main/java/com/converse/dev/Utils.kt Deleted; contained utility functions for string manipulation.
android/app/src/main/java/com/converse/dev/xmtp/Client.kt Deleted; contained functions for managing the XMTP client.
android/app/src/main/java/com/converse/dev/xmtp/Conversations.kt Deleted; managed conversations and subscriptions.
android/app/src/main/java/com/converse/dev/xmtp/Messages.kt Deleted; handled messaging notifications.
android/app/src/main/res/values/strings.xml Updated string resource for expo_runtime_version.
android/app/src/preview/AndroidManifest.xml New manifest file for preview build with deep linking.
android/app/src/preview/google-services.json New file added for Google services configuration for preview.
android/app/src/preview/res/values/strings.xml New string resource for application name in preview.
android/app/src/prod/AndroidManifest.xml New manifest file for production build with deep linking.
android/app/src/prod/google-services.json New file added for Google services configuration for production.
android/app/src/prod/res/values/strings.xml New string resource for application name in production.
android/gradle.properties Added new properties for build configurations.
android/gradle/wrapper/gradle-wrapper.properties Updated Gradle version from 8.7 to 8.8.
android/react-settings-plugin/build.gradle.kts New Gradle build configuration for the react-settings-plugin.
android/react-settings-plugin/src/main/kotlin/expo/plugins/ReactSettingsPlugin.kt New file defining a custom Gradle plugin.
android/settings.gradle Enhanced configuration for React Native and Expo integration.
app.json Updated version and build numbers for the application.
assets/Encrypted.tsx Changed EncryptedProps from an interface to a type alias.
babel.config.js Updated module resolution and added new aliases.
components/AccountSettingsButton.tsx Updated navigation logic to use useRouter.
components/AndroidBackAction.tsx Simplified styling logic by removing platform checks.
components/AnimatedBlurView.tsx Changed prop destructuring method in the component signature.
components/Banner/AnimatedBanner.tsx Changed AnimatedBannerProps from an interface to a type alias.
components/Banner/Banner.tsx Changed BannerProps from an interface to a type alias.
components/Button/Button.ios.tsx Deleted; contained iOS-specific button component.
components/Button/Button.tsx Deprecated previous button implementation in favor of design system.
components/Chat/ActionButton.tsx Updated picto prop type for better type safety.
components/Chat/Attachment/AddAttachmentButton.tsx Refactored to streamline media handling logic.
components/Chat/Attachment/AttachmentMessagePreview.tsx Refactored to use React Query for fetching attachments.
components/Chat/Attachment/SendAttachmentPreview.tsx Simplified prop handling and updated rendering logic.
components/Chat/Chat.tsx Complete refactor with commented-out code for future redesign.
components/Chat/ChatDumb.tsx Introduced a new component for rendering chat interface.
components/Chat/ChatGroupUpdatedMessage.tsx Refactored to use structured props for group updates.
components/Chat/ChatNullState.tsx Updated prop handling and state management.
components/Chat/ChatPlaceholder/ChatPlaceholder.tsx Significant refactor with commented-out code for redesign.
components/Chat/ChatPlaceholder/GroupChatPlaceholder.tsx Deleted; served as a placeholder in group chat.
components/Chat/ConsentPopup/ConsentPopup.tsx Updated props structure and consent handling logic.
components/Chat/ConsentPopup/GroupConsentPopup.tsx Simplified logic and updated prop types for group consent.
components/Chat/Frame/FrameBottom.tsx Updated prop naming and simplified styling logic.
components/Chat/Frame/FramePreview.tsx Commented-out code indicates a potential redesign.
components/Chat/Frame/FramesPreviews.tsx Complete removal of functionality with commented-out code.
components/Chat/Frame/urlProtocols.ts New file for managing authorized URL protocols.
components/Chat/Input/Input.tsx Deleted; contained chat input interface.
components/Chat/Input/InputReplyBubble.tsx Deleted; displayed reply bubble in chat.
components/Chat/Input/InputReplyPreview.tsx Deleted; displayed message preview for replies.
components/Chat/Input/SendButton.tsx Deleted; rendered send button for chat.
components/Chat/Message/Message.tsx Extensive modifications with deprecated types and commented-out code.
components/Chat/Message/Message.utils.tsx New file for message handling utility functions.
components/Chat/Message/MessageActions.tsx Complete removal of message action handling component.
components/Chat/Message/MessageBubble.tsx Introduced new components for structured message bubbles.
components/Chat/Message/MessageContext.tsx New context for managing message time indicator visibility.
components/Chat/Message/MessageContextMenu.tsx Significant modifications to integrate design system components.

Possibly related PRs

Suggested reviewers

  • thierryskoda

🐇 In the code we hop, with changes galore,
From buttons to chats, we streamline and more.
With each little tweak, our app starts to shine,
A bouncy new flow, oh how divine!
So let’s celebrate code, both neat and bright,
For every small change brings us closer to light! 🌟


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.

@technoplato technoplato changed the base branch from main to release/3.0.0 December 3, 2024 20:14
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was a fix for environment variables not being properly hydrated during tests

@alexrisch alexrisch merged commit 6b7005e into release/3.0.0 Dec 3, 2024
1 check was pending
@alexrisch alexrisch deleted the ml/nobranch-add-dependency-control-pattern branch December 3, 2024 20:17
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.

2 participants