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

fix: hide video preview's action overlay #3201

Merged
merged 1 commit into from
Mar 22, 2025
Merged

Conversation

wilsonyiyi
Copy link
Contributor

Description

PR Type

  • Feature
  • Bugfix
  • Hotfix
  • Other (please describe):

Screenshots (if UI change)

Demo Video (if new feature)

Linked Issues

#3200

Additional context

Changelog

  • I have updated the changelog/next.md with my changes.

@follow-reviewer-bot
Copy link

Thank you for your contribution. We will review it promptly.

Copy link

vercel bot commented Mar 20, 2025

@wilsonyiyi is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

@follow-reviewer-bot
Copy link

Suggested PR Title:

fix: update useEffect dependency and event listener logic

Change Summary:
Updated dependency in useEffect to include 'showActions' state, modifying event listener behavior based on visibility of action overlay.

Code Review:

Code Review

File: apps/desktop/src/renderer/src/components/ui/media/preview-media.tsx

  1. Lines 39 and 58 (Dependency Array Update in useEffect):

    • The dependency array of the useEffect hook was modified to include the showActions variable. However, it is crucial to verify that this change is necessary and that showActions is properly memoized or stable. If showActions is a function or derived from non-primitive types (e.g., objects, arrays), this could lead to unnecessary re-renders or potential bugs. Please confirm that showActions is indeed a stable primitive value or appropriately memoized.
    • Additionally, ensure that adding this dependency does not introduce any unintended behavior, such as causing the effect to run more frequently than intended. It would be helpful to provide a justification for why showActions needs to be included in the dependency array.
  2. Lines 38-42 (Conditional Check Update):

    • The conditional check now includes !showActions in addition to !containerRef.current. If showActions is being introduced here for new logic, ensure that its inclusion aligns with the desired functionality. Specifically, verify if the return when !showActions is true could prematurely stop required behavior that depends on showActions. If this breaks any existing logic, it should be addressed.

If both concerns are validated and align with the intended behavior, then no further updates are needed. However, until verified, the above points require investigation to ensure correctness.

@wilsonyiyi wilsonyiyi closed this Mar 21, 2025
@wilsonyiyi wilsonyiyi deleted the fix/3200 branch March 21, 2025 05:51
@wilsonyiyi wilsonyiyi restored the fix/3200 branch March 21, 2025 07:23
@wilsonyiyi wilsonyiyi reopened this Mar 21, 2025
@Innei Innei merged commit f4772d2 into RSSNext:dev Mar 22, 2025
5 of 9 checks passed
@follow-reviewer-bot
Copy link

Thank you @wilsonyiyi for your contribution! 🎉

Your pull request has been merged and we really appreciate your help in making this project better. We hope to see more contributions from you in the future! 💪

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