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

feat: Added option to hide powerups from reward menu #1049

Conversation

ChrisScr3ams
Copy link

Proposed changes

in the reward menu the options for power ups are now always displayed above all the channel point rewards. To make the menu cleaner an option to hide these power ups should be added.

Types of changes

What types of changes does your code introduce to 7TV?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

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

Further comments

A slider option to hide the power ups from the reward menu was added to the settings under Site Layout -> Twitch Features:
Screenshot 2024-06-19 214442

It was a bit tricky to make sure the right elements get hidden, since all the rewards, power ups and category headlines are on the same level in hierarchy and don't have any classes to make them unique. Furthermore depending on if a challenge or prediction are active an additional div for the category "Challenges and Predictions" can be existent or not (the divs for the actual challenge or prediction are always existing, just the one for the header is optional). With the implementation I chose it should always hide the correct divs regardless of that.

Reward menu with power ups:
Screenshot 2024-06-19 215252

Reward menu with power ups and active prediction:
Screenshot 2024-06-19 215357

Reward menu without power ups:
Screenshot 2024-06-19 215450

Reward menu without power ups and active prediction:
Screenshot 2024-06-19 215426

@Excellify
Copy link
Collaborator

Gonna close as this will result in unwanted behaviour if twitch decide to change anything

@Excellify Excellify closed this Jun 19, 2024
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