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

[Feature Request] Make the app ring when the cooking time is over #671

Closed
Thovi98 opened this issue Apr 3, 2021 · 19 comments · Fixed by #1120
Closed

[Feature Request] Make the app ring when the cooking time is over #671

Thovi98 opened this issue Apr 3, 2021 · 19 comments · Fixed by #1120
Assignees
Labels
enhancement New feature or request Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code

Comments

@Thovi98
Copy link

Thovi98 commented Apr 3, 2021

Is your feature request related to a problem? Please describe.
I'm always frustrated when I cook and I begin the cooking time timer : when it’s over, only this popup appears
2021-04-03 16_23_31-Livre de recettes - Nextcloud

Describe the solution you'd like
I would like, if it’s possible, that the app rings when time is over. So I don’t have to be on my computer during the whole cooking process.

Describe alternatives you've considered
Use another alarm app on my phone, but I think an integrated alarm is better, because it’s what we think we will have when we press the timer button.

Thanks !

(Firefox, latest release ; Nextcloud 20.0.7 ; Cookbook 0.8.4)

@Thovi98 Thovi98 added the enhancement New feature or request label Apr 3, 2021
@christianlupus
Copy link
Collaborator

Just to be sure we are on the same page: You want the cookbook app within NC to emit a sound, right? We are not talking of any sort of mobile phone app, right?

@Thovi98
Copy link
Author

Thovi98 commented Apr 5, 2021

You want the cookbook app within NC to emit a sound, right?

Yes please. Because there is now a timer but not sound when countdown is over. On the desktop with Firefox. Thanks.

@MarcelRobitaille
Copy link
Collaborator

MarcelRobitaille commented Jul 22, 2022

I added an alarm sound effect when a timer runs out. My branch is here: https://github.com/MarcelRobitaille/cookbook/tree/671-timer-alarm-sound

I stole the sound effect from the DuckDuckGo timer. I'm not sure what license it has. I looked around for a creative commons alarm sound, but I did not find anything. I am open to suggestions.

When using the webpack file-loader to load the mp3, I had to replace nextcloud-cookbook with cookbook. Does anyone know why webpack is giving this URL? Is it based on the name in package.json? I checked my real install, and the folder inside apps is indeed named cookbook not nextcloud-cookbook.

@MarcelRobitaille MarcelRobitaille self-assigned this Jul 22, 2022
@christianlupus
Copy link
Collaborator

I will check. I think I have a bunch of sights with open source royalty free music samples maybe there is something that can be used as an alarm.

Regarding your question with the namespace is nextcloud or not nextcloud: in which location did you stumble over this? In the package description of the app there is the name with the term nextcloud. This is against best practice of the current app development guides. So far it did not hurt. It was introduced in the very beginning of the app and never touched as far as I know.

If you are referring to something different, please explain where and what is the issue.

@MarcelRobitaille
Copy link
Collaborator

Thanks for looking into the sound we could use.

I am not sure where it's coming from, but when using the file-loader webpack loader, the URL of the mp3 starts with /apps/nextcloud-cookbook but it should be /apps/cookbook. I noticed that nextcloud-cookbook shows up in package.json as the name, but I'm not exactly sure where webpack is pulling this from or why it's working for .js but not .mp3 using file-loader.

Ok, I just tested it by modifying package.json. It is taking the name from the package.json. I think we can either update the name (we have to update MainController.php as well), see if there's a way to use nextcloud-cookbook inside of apps instead of just cookbook (at least it would be consistent), or leave the .replace('nextcloud-cookbook', 'cookbook').

@christianlupus christianlupus added this to the Release 0.9.14 milestone Jul 25, 2022
@MarcelRobitaille MarcelRobitaille added javascript Pull requests that update Javascript code Frontend Issue or PR related to the frontend code labels Jul 26, 2022
@MarcelRobitaille
Copy link
Collaborator

The file-loader issue was fixed with #1099. The only thing left is to find a sound we can use I think.

@christianlupus
Copy link
Collaborator

I have looked for some samples, that I found on the net. According to my understanding of their FAQ and their terms, we are allowed to use these:

There might be more and some of these might need cutting to have a single alarm instead of multiple dongs. This is just a selection of some sounds I would consider useful. Some are alarms while others are "notification" sounds that the clock is running.

How do we proceed? Just ask the community what they prefer? Selecting ourselves?

@seyfeb
Copy link
Collaborator

seyfeb commented Jul 27, 2022

Thanks for compiling the extensive list. We should first decide: Should be repeated until confirmed (like a timer on a smartphone) or should it only be a short single tone or a short procession of tones which stop automatically after some time?

For a continued signal, I would consider those suitable from that list:

alarm clock short
service bell ring
success bell
small_bell
Bell

For a short clip others might work as well.

@christianlupus
Copy link
Collaborator

Personally, I am a person who needs a kick in the ass if I need to do something. So, I would prefer a continuous notification until I acknowledge it. But this might be unnerving as you might work in the kitchen and do not want to touch the display with dirty hands.

@seyfeb
Copy link
Collaborator

seyfeb commented Jul 27, 2022

There is always the possibility to add yet another user preference 😅

@MarcelRobitaille
Copy link
Collaborator

Wow, those are good ones. Thanks for finding them. I was not able to find anything nearly that good. I like the alarm clock ones best. Should we do a vote or how should we proceed?

@christianlupus
Copy link
Collaborator

I will prepare something for that.

@christianlupus
Copy link
Collaborator

I put something in the poll #1125.

@christianlupus
Copy link
Collaborator

Ok, the poll indicated a tendency towards a continuing alarm until confirmation.

When planned accordingly, it should be possible to short after one ring without confirmation by the user. The user night have an option to select his/get preferences in some sort of settings.

Would you consider that manageable, @MarcelRobitaille?

Do we want to offer the user the option to select from multiple sounds? Or will we just offer one fixed sound?

The poll was not super active. I was hoping for more participants. Asking what sound might be best will most probably (in my opinion) lead to much answers. I think we will have to decide on one and see if the users are complaining.

I do not see anyone coming up with better sound samples for now. If there is still something to cover, please report back. I will think of a way to make a survey so we can internally see, what deems best to us. Okay?

@christianlupus
Copy link
Collaborator

christianlupus commented Aug 21, 2022

I created a survey on my own instance and published/shared it here. If you would like to participate, you are welcome to do so anonymously.

The poll will close itself on 2022-09-04 23:55:47 CEST.

Ping @seyfeb @MarcelRobitaille

@christianlupus
Copy link
Collaborator

Attention, I had the wrong link inserted in the last comment. I have updated it. I am sorry for the inconvience.

@seyfeb
Copy link
Collaborator

seyfeb commented Aug 24, 2022

It is probably a bit of an overkill, but thanks for creating the poll, anyway! :D

@MarcelRobitaille
Copy link
Collaborator

Hi @christianlupus. Sorry I haven't been active here.

Here is what I understand so far:

  1. The sound is https://pixabay.com/sound-effects/alarm-clock-short-6402/
  2. By default, the alarm plays continuously until the user presses "OK" in the alert
  3. The user can change to a single alarm instead of a continuous alarm in app settings

I am still not clear about a few things:

  1. Where should these settings be? Maybe related to Create an app configuration #1067?
  2. Is it possible to select no alarm at all in the settings?

If this is cleared up, I think I can complete this fairly quickly.

@christianlupus
Copy link
Collaborator

Hello, @MarcelRobitaille,

yes, we have mostly the same understanding so far.

No alarm makes no sense to me, to be honest. The user is not obligated to activate the alarm clock, so if he is doing it, he will also want to know when things are due. So, No 2 would be a no for me.

I would prepare to allow the user to change the settings, but for now, we stick with a continuous sound. This will be the default setting.

Once #1067 is done, we can make the setting configurable and let the user store the setting in the DB/backend. The reason is that I'd like to avoid adding too much more options to the current settings and overflowing the user completely.

Does this clear out things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants