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

Long Press Playback Effect Turns Custom Effect On #1150

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

CalebKL
Copy link
Contributor

@CalebKL CalebKL commented Jul 4, 2023

Description

This PR sets up custom playback effects when you long press the Playback effect Icon.

Fixes # @CookiedCodes niggles

Testing Instructions

  1. Tap on the Discover tab
  2. Tap on any random podcast
  3. Long Press on the Playback effect Icon

Screenshots or Screencast

playback.mp4

Checklist

  • [X ] If this is a user-facing change, I have added an entry in CHANGELOG.md
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@CalebKL CalebKL requested a review from a team as a code owner July 4, 2023 19:52
@ashiagr
Copy link
Contributor

ashiagr commented Jul 10, 2023

👋

I just gave it a brief run and the override does seem like a useful feature!

The shortcut to enable custom effects can remain but we were thinking if we could replace the snack bar like view with a toggle to switch between local and global podcast settings. Maybe it can remain visible all the time and be set to off by default.

/cc @david-gonzalez-a8c

@CookieyedCodes
Copy link

CookieyedCodes commented Jul 10, 2023

@ashiagr I was debating this as I was mocking it up and kind of came to the conclusion that a switch with a global/home icon in the top right would add too much visual clutter for this UI popup in my view but I'm not against it if it's just better 😅

Screenshot_2023-07-10-10-40-10-86_28ad70af3b47247953fcd94176b9a9c1.jpg

Regarding what was implemented, I did find it a bit weird that it not popping up would not be possible but I suppose that's a problem with dealing with long press, after a day I was thinking why wouldn't a NAND gate not work tho,
As in IF info notification is turned on && the playback fx panel is not visible THEN popup the playback fx dialogue

That should make it quite elegant in my view, if that's possible correct me if I am wrong/it's not possible tho 🤔

Regarding your suggestion just to clarify are you suggesting a link (that would popup the playback fx) or that the notification has the toggle 🤔
IMG_20230710_105515.jpg

@ashiagr
Copy link
Contributor

ashiagr commented Jul 10, 2023

Sorry that it was not clear. I meant this view on the playback effect dialog and if we can convert it to a switch that will allow us to toggle between local/podcast effects:

Regarding your suggestion just to clarify are you suggesting a link (that would popup the playback fx) or that the notification has the toggle 🤔

Oh no, notification is fine. No changes to that.

@ashiagr
Copy link
Contributor

ashiagr commented Jul 10, 2023

Regarding what was implemented, I did find it a bit weird that it not popping up would not be possible but I suppose that's a problem with dealing with long press, after a day I was thinking why wouldn't a NAND gate not work tho,
As in IF info notification is turned on && the playback fx panel is not visible THEN popup the playback fx dialogue

That should make it quite elegant in my view, if that's possible correct me if I am wrong/it's not possible tho 🤔

I didn't notice this behavior earlier. I think what you suggested should work but I haven't tried it. @Mzazi25 have you tried it already and come across any issues?

@CookieyedCodes
Copy link

Sorry that it was not clear. I meant this view on the playback effect dialog and if we can convert it to a switch that will allow us to toggle between local/podcast effects:

Regarding your suggestion just to clarify are you suggesting a link (that would popup the playback fx) or that the notification has the toggle 🤔

Oh no, notification is fine. No changes to that.

Ah I got you, I think it's not a bad solution I think the only problem is that people would have to read to distinguish between local vs Global and might cause some mistap issues hence my recent thought on the icons 🤔🤔

@ashiagr
Copy link
Contributor

ashiagr commented Jul 10, 2023

people would have to read to distinguish between local vs Global and might cause some mistap issues hence my recent thought on the icons

Oh, I see. Let's try out toggling through icons then 👍

@CalebKL
Copy link
Contributor Author

CalebKL commented Jul 10, 2023

@ashiagr I tried but since we are using a snackbar to toast the message, we can't adjust the position of the snackbar to the screen, hence it would not pop up above the "Custom Effects Applied"
I guess that was the only challenge

@mchowning
Copy link
Contributor

👋 @Mzazi25 and @ashiagr

Just checking in on the status of this PR. Is there anything specific that needs to be done to move this forward?

@CalebKL
Copy link
Contributor Author

CalebKL commented Oct 18, 2023

👋 @Mzazi25 and @ashiagr

Just checking in on the status of this PR. Is there anything specific that needs to be done to move this forward?

I believe for this feature, there were some discussions going on, if it were a priority then. Give me a green light and I will work on it ASAP
@ashiagr @mchowning lmk what you suggest

@CookieyedCodes
Copy link

I was going to do a design like somewhat soonish -maby tomorrow- because I like the dial what Spotify did, I was also going to include a toggle for local & global playback FX 😉

@CookieyedCodes
Copy link

CookieyedCodes commented Oct 24, 2023

A new design for a speed settings, its a dial UI with preset manager -long press the UI number- as you swipe left and right the numbers to indicate location, the ability to toggle between global and local settings is also added to this UI, Lightly inspired by Spotify's new dial UI & minimalist radio tuning UI. Also unlocks 5x Speed because some people wants that as an option and would be less cumbersome with this UI (Local FX under podcast settings doesn't change UI) image Any thoughts @Mzazi25 @ashiagr @mchowning @geekygecko @david-gonzalez-a8c

@david-gonzalez-a8c
Copy link

Hey there, @CookieyedCodes

Thank you for your work on this, nice job! Here are my thoughts on the designs:

I personally think that the dial UI adds a lot of complexity to this screen, and I kinda like how in the current version we have a balance in the three settings with the icon, then the name of the setting, then the setting itself. I think I'd like to keep that so I'd consider a couple alternatives:

  1. Use the dial UI in a subsequent screen, keeping the current screen more simple, but I'm not sure about the double modal:
image
  1. Change the behaviour of the current screen so tapping on the selected speed displays a menu (I'm showing iOS here, as my design files are for iOS, but an equivalent could be used for Android, like this component). This might be cleaner and more practical than the slider, and you still have the -/+ buttons to fine tune the speed if necessary.
image

What do you think?

@CookieyedCodes
Copy link

@david-gonzalez-a8c

The main reason I put it above was to prevent accidental miss touches but I wouldn't be against a seperate UI popup that could accessed from a long press of the number 🤔
also I designed it a tad funky to look not exactly like Spotify 😅(just to be clear long pressing on the diall saves the current time to the preset but my preference would be 1)

Any thoughts on the local/global toggle 🤔

@CookieyedCodes
Copy link

Gave a whole redesign of this screen more thought
image

@@ -395,6 +396,28 @@ class PlayerViewModel @Inject constructor(
}
}

fun toggleNotifications(context: Context) {
Toast.makeText(context, LR.string.player_effects_custom_effects_applied, Toast.LENGTH_SHORT).show()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the UI related components like context from ViewModel and move to UI/fragment? We should not use context in viewmodel except UIs because it makes the testing harder.

Toast.makeText(context, LR.string.player_effects_custom_effects_applied, Toast.LENGTH_SHORT).show()
}

fun updateOverrideGlobalEffects(override: Boolean) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, override looks like a pre-defined naming convention. Can we use self-explanatory name?

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.

None yet

6 participants