Skip to content

fix: in app notification is not showing channel name and message content#7268

Merged
Rohit3523 merged 2 commits into
developfrom
in-app-notification-fix
Apr 29, 2026
Merged

fix: in app notification is not showing channel name and message content#7268
Rohit3523 merged 2 commits into
developfrom
in-app-notification-fix

Conversation

@Rohit3523
Copy link
Copy Markdown
Member

@Rohit3523 Rohit3523 commented Apr 29, 2026

Proposed changes

Regression introduced in #6985

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-2148

How to test or reproduce

Screenshots

Before After
Screenshot 2026-04-29 at 8 20 58 PM Screenshot 2026-04-29 at 8 26 10 PM

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • Style
    • Adjusted in-app notification layout with improved spacing and flex behavior for better visual alignment and consistency.

@Rohit3523 Rohit3523 temporarily deployed to approve_e2e_testing April 29, 2026 14:56 — with GitHub Actions Inactive
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d2034c3c-ed75-4dfc-bba2-f63513eb2df1

📥 Commits

Reviewing files that changed from the base of the PR and between 2c4dd8d and 926a742.

⛔ Files ignored due to path filters (1)
  • app/containers/InAppNotification/__snapshots__/NotifierComponent.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • app/containers/InAppNotification/NotifierComponent.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ESLint and Test / run-eslint-and-test
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions

Files:

  • app/containers/InAppNotification/NotifierComponent.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers

**/*.{ts,tsx}: Use TypeScript with strict mode enabled and baseUrl set to app/ for module imports
Support iOS 13.4+ and Android 6.0+ as minimum target platforms

Files:

  • app/containers/InAppNotification/NotifierComponent.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx}: Use tabs for indentation with single quotes, 130 character line width, no trailing commas, and avoid arrow function parentheses when possible
Use ESLint with @rocket.chat/eslint-config base including React, React Native, TypeScript, and Jest plugins

Files:

  • app/containers/InAppNotification/NotifierComponent.tsx
app/containers/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Create reusable UI components in app/containers/ directory

Files:

  • app/containers/InAppNotification/NotifierComponent.tsx
🧠 Learnings (5)
📓 Common learnings
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.
📚 Learning: 2026-03-10T15:21:45.098Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.

Applied to files:

  • app/containers/InAppNotification/NotifierComponent.tsx
📚 Learning: 2026-04-22T22:57:58.545Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-22T22:57:58.545Z
Learning: Applies to app/lib/hooks/useResponsiveLayout/**/*.{ts,tsx} : Implement responsive layouts using useResponsiveLayout hook to switch between master-detail on tablets and single stack on phones

Applied to files:

  • app/containers/InAppNotification/NotifierComponent.tsx
📚 Learning: 2026-04-22T22:57:58.545Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-22T22:57:58.545Z
Learning: Applies to app/containers/**/*.{ts,tsx} : Create reusable UI components in app/containers/ directory

Applied to files:

  • app/containers/InAppNotification/NotifierComponent.tsx
📚 Learning: 2026-03-04T20:13:17.288Z
Learnt from: divyanshu-patil
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6957
File: ios/RocketChat Watch App/Views/MessageComposerView.swift:37-55
Timestamp: 2026-03-04T20:13:17.288Z
Learning: In the WatchOS app (ios/RocketChat Watch App) for Rocket.Chat React Native, using SwiftUI `Button` inside a `ScrollView` on WatchOS causes accidental message sends because button tap targets can be triggered during scroll gestures. `Text` with `.onTapGesture` is the preferred pattern for tappable items in scroll views on WatchOS. To preserve accessibility, add `.accessibilityAddTraits(.isButton)` and `.accessibilityLabel()` to the `Text` element instead.

Applied to files:

  • app/containers/InAppNotification/NotifierComponent.tsx
🔇 Additional comments (3)
app/containers/InAppNotification/NotifierComponent.tsx (3)

37-51: Good layout fix for notification content spacing.

Adding right padding and moving flexible text layout into styles.inner is a solid adjustment for keeping channel/message text visible alongside the close action.


109-124: Pressable content structure update looks correct.

This change cleanly wires the notification body through the new inner flex container and preserves the intended tap target behavior.


125-126: Close action simplification is clean.

Removing extra icon-specific spacing here is consistent with the updated container-level spacing strategy.


Walkthrough

The notification component's row layout is restructured to adjust padding and flex properties. The flex behavior is moved from the touch container to a new inner wrapper view, and styling is simplified by removing fragment wrappers and adjusting margin properties.

Changes

Cohort / File(s) Summary
Notification Layout Adjustment
app/containers/InAppNotification/NotifierComponent.tsx
Modified container padding, removed justifyContent: 'space-between', relocated flex property to inner wrapper view, added right margin to wrapper, updated pressable Touch component styling, and simplified content structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: addressing the regression where in-app notifications stopped showing channel name and message content, which is directly reflected in the code changes to the NotifierComponent layout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@Rohit3523 Rohit3523 requested a deployment to experimental_android_build April 29, 2026 15:01 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_android_build April 29, 2026 15:01 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_ios_build April 29, 2026 15:01 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build April 29, 2026 15:01 — with GitHub Actions Waiting
Copy link
Copy Markdown
Contributor

@OtavioStasiak OtavioStasiak left a comment

Choose a reason for hiding this comment

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

LGTM

@Rohit3523 Rohit3523 merged commit 2346df0 into develop Apr 29, 2026
20 of 39 checks passed
@Rohit3523 Rohit3523 deleted the in-app-notification-fix branch April 29, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants