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 tags and schedule edit for parental control #6231

Merged
merged 12 commits into from
Oct 20, 2024

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Oct 20, 2024

Our callback implementation for the parental control page was quite hacky and fragile. It stopped working properly in the current master branch, likely due to updates in React. This isn't the only instance where we manipulate DOM objects directly instead of using React, so other pages may also be affected, but this one has been reported.

In the parental control page, the popup callback was added twice since useEffect was executed twice in each render cycle. Also, the delete tag/schedule button had no callbacks assigned because the DOM object wasn't available when the data loading hook was executing.

Changes

  • Migrate onClick to pure react callback for delete operations.
  • Unbind showing popup callbacks when unmounting

Issues

@gnattu gnattu requested a review from a team as a code owner October 20, 2024 13:52
@jellyfin-bot
Copy link
Collaborator

jellyfin-bot commented Oct 20, 2024

Cloudflare Pages deployment

Latest commit e17d50f
Status ✅ Deployed!
Preview URL https://ea5b7605.jellyfin-web.pages.dev
Type 🔀 Preview

View build logs

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ESLint doesn't pass. Please fix all ESLint issues.

src/apps/dashboard/routes/users/parentalcontrol.tsx Outdated Show resolved Hide resolved
src/apps/dashboard/routes/users/parentalcontrol.tsx Outdated Show resolved Hide resolved
src/apps/dashboard/routes/users/parentalcontrol.tsx Outdated Show resolved Hide resolved
src/apps/dashboard/routes/users/parentalcontrol.tsx Outdated Show resolved Hide resolved
src/apps/dashboard/routes/users/parentalcontrol.tsx Outdated Show resolved Hide resolved
src/apps/dashboard/routes/users/parentalcontrol.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ESLint doesn't pass. Please fix all ESLint issues.

src/elements/IconButtonElement.tsx Outdated Show resolved Hide resolved
src/elements/IconButtonElement.tsx Outdated Show resolved Hide resolved
src/elements/IconButtonElement.tsx Outdated Show resolved Hide resolved
src/elements/IconButtonElement.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ESLint doesn't pass. Please fix all ESLint issues.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ESLint doesn't pass. Please fix all ESLint issues.

src/elements/IconButtonElement.tsx Outdated Show resolved Hide resolved
src/elements/IconButtonElement.tsx Outdated Show resolved Hide resolved
Unfortuenately, the key is never populated in accessSchedule.js which cannot use that as a key for a list
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ESLint doesn't pass. Please fix all ESLint issues.

src/apps/dashboard/routes/users/parentalcontrol.tsx Outdated Show resolved Hide resolved
This is better and any sane person should not set multiple schdules to be exactly the same
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

ESLint doesn't pass. Please fix all ESLint issues.

Copy link

sonarcloud bot commented Oct 20, 2024

@thornbill thornbill added the bug Something isn't working label Oct 20, 2024
@thornbill thornbill added this to the v10.10.0 milestone Oct 20, 2024
@thornbill thornbill merged commit 38ab2c1 into jellyfin:master Oct 20, 2024
14 checks passed
@gnattu gnattu deleted the fix-parental-tags branch October 21, 2024 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants