-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Fixed "Notifications" tab not having active state #22149
Conversation
WalkthroughThe pull request introduces two primary changes. Firstly, it updates the version of the Possibly related PRs
Poem
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
apps/admin-x-activitypub/src/components/feed/FeedItem.tsxOops! Something went wrong! :( ESLint: 8.44.0 ESLint couldn't find the plugin "eslint-plugin-react-hooks". (The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "/apps/admin-x-activitypub".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-react-hooks" was referenced from the config file in "apps/admin-x-activitypub/.eslintrc.cjs". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. 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 (
|
close https://linear.app/ghost/issue/AP-640/image-attachments-on-notes-from-threads-are-not-rendered - Covered the case when `attachment.type` is `Image` and there is no `mediaType` set - Made code easier 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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
apps/admin-x-activitypub/src/components/feed/FeedItem.tsx (2)
238-244
: Implement deletion functionality for user-owned content.The TODO comment indicates that users should be able to delete their own Notes/Articles. This is an important feature for content management.
Would you like me to help implement the deletion functionality or create an issue to track this task?
188-193
: Consider optimizing truncation calculation.The current implementation recalculates truncation on every content change. Consider these optimizations:
- Use ResizeObserver for dynamic content changes
- Debounce the truncation calculation
useEffect(() => { + const debounceTimer = setTimeout(() => { const element = contentRef.current; if (element) { - setIsTruncated(element.scrollHeight > element.clientHeight); + const resizeObserver = new ResizeObserver(() => { + setIsTruncated(element.scrollHeight > element.clientHeight); + }); + resizeObserver.observe(element); + return () => resizeObserver.disconnect(); } + }, 100); + return () => clearTimeout(debounceTimer); }, [object.content]);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/admin-x-activitypub/src/components/feed/FeedItem.tsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Unit tests (Node 20.11.1)
- GitHub Check: Unit tests (Node 18.12.1)
- GitHub Check: Lint
🔇 Additional comments (1)
apps/admin-x-activitypub/src/components/feed/FeedItem.tsx (1)
87-106
: LGTM! Clean refactoring of image handling logic.The refactoring improves code readability and maintainability by:
- Extracting class names into a descriptive variable
- Adding explicit handling of image URL determination
- Using a more structured JSX return
close https://linear.app/ghost/issue/AP-738/fix-notifications-tab-not-having-active-state