PrayTeam / scriptured-prayer

GNU Affero General Public License v3.0
1 stars 0 forks source link

Generate Daily Deck for Guest Users #42

Open kenancasey opened 5 months ago

kenancasey commented 5 months ago

As a guest user (non-authenticated), I want to see a custom generated deck that is "different" every day and is a length based on my duration preference (5min, 10min, 30min, 45min).

Ideally, the daily deck for guest users will be composed as follows:

Estimated Time Durations per Genre

Currently, all the request categories start with "Prayers for...". The other categories are praise.

Soyokaze-42 commented 5 months ago

Instead of coding the duration in the API, what if we make an endpoint that will take the number of praises and requests as parameters and returns a list of Cards composed as close as I can get to the algorithm above?

kenancasey commented 5 months ago

I'm ok with that. I wasn't sure how much of the generation logic to put in the backend.

The other thing I didn't write is that each deck is composed so that roughly 2/3 of the time is use for praises and 1/3 is for requests.

Ideally, an authenticated user will be able to configure that proportion. Also, there will be more genres eventually.

Does any of that additional context change your opinion? I don't have strong feelings.

follindown commented 5 months ago

The order for either user or non-user should be the same. Names of God, God Is, Names of Jesus, Names of the Holy Spirit, In Christ, Promises of God.

Soyokaze-42 commented 5 months ago

So the user options are going to be percentages for each genre? I was thinking they were choosing the number of cards per category. That complicates a lot of things. In that case, duration is the first class parameter.

follindown commented 5 months ago

User will not select percentages just whether or not they want the computer to automagically pull the cards from the deck for them or if they want a card daily, weekly, or monthly. Whatever they select I would like the default to be that at least one of each of the praise categories hits the daily deck in the order I've written. What I saw as a problem in the future when we have custom decks is that they may select to pray only 5 minutes and also have selected that their custom decks are daily and therefore rarely get any from the praise decks. Instead we want to guarantee they get at least one from each praise category (as long as they haven't hidden that deck) and then the 5 minutes is really taking from their other categories. Not sure I'm explaining this well. Ask me questions to clarify.

Soyokaze-42 commented 5 months ago

We need to settle on the set of options. I might like this percentage option from @kenancasey. In the UI, it could be sliders. Along with whether a category is enabled or not, we could generate a nice custom list without giving lots of options to the user. I would not want to weigh both the categories and the genres, though. That algorithm would get murky really fast.

follindown commented 5 months ago

My only request is that they get at least one of each praise category. One of the main functions of this website is to teach people how to praise God. I wouldn't want us to lose sight of that. I don't care at all how you do that. You guys are the brains.

Soyokaze-42 commented 5 months ago

If I am understanding this correctly: "Currently, all the request categories start with "Prayers for...". The other categories are praise," The MVP Category list in #15 only has praise categories, right? @follindown

follindown commented 5 months ago

Correct.

On Fri, Jan 19, 2024 at 4:26 PM Soyokaze-42 @.***> wrote:

If I am understanding this correctly: "Currently, all the request categories start with "Prayers for...". The other categories are praise," The MVP Category list in #15 https://github.com/PrayTeam/scriptured-prayer/issues/15 only has praise categories, right? @follindown https://github.com/follindown

— Reply to this email directly, view it on GitHub https://github.com/PrayTeam/scriptured-prayer/issues/42#issuecomment-1901222351, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEXUS3RP527SNZRDWLE3GFDYPLXIZAVCNFSM6AAAAABB46QHCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGIZDEMZVGE . You are receiving this because you were mentioned.Message ID: @.***>

Soyokaze-42 commented 5 months ago

We cannot write the logic in this issue without any request categories. Are you thinking this is a future feature? If so, we should tag it "backlog"

Soyokaze-42 commented 5 months ago

I would also like to consider decoupling the duration from the size of the prayer deck. This is problematic for a number of reasons, chiefly that it will never be correct. If you want to use duration, can we instead start a timer and end the prayer when the timer goes off?

I don't like using duration for something other than time. I would rather go by the size of the deck and let the user get a feel for how long that is going to take them to pray personally.

follindown commented 5 months ago

I wouldn't want to use a timer. That would make me feel super pressured. I understand what you are saying on the fuzziness of time in this case b/c every person will be different. I do agree with Kenan that time feels like an easier decision than number in the deck for a first time user. I'm not sure what to do. I would like others to weigh in.

On Fri, Jan 19, 2024 at 5:11 PM Soyokaze-42 @.***> wrote:

I would also like to consider decoupling the duration from the size of the prayer deck. This is problematic for a number of reasons, chiefly that it will never be correct. If you want to use duration, can we instead start a timer and end the prayer when the timer goes off?

I don't like using duration for something other than time. I would rather go by the size of the deck and let the user get a feel for how long that is going to take them to pray personally.

— Reply to this email directly, view it on GitHub https://github.com/PrayTeam/scriptured-prayer/issues/42#issuecomment-1901274858, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEXUS3UO2K54S7YLWVN2OSTYPL4QPAVCNFSM6AAAAABB46QHCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGI3TIOBVHA . You are receiving this because you were mentioned.Message ID: @.***>

Soyokaze-42 commented 5 months ago

We don't have to display the time as they pray. We could fetch a new card every time they swipe and stop giving them cards at the end of the timer. That way, no matter how quickly they pray, the duration is true.

This proposal is to use counts of cards per genre as a proxy for the duration because the duration is not really a time in this case. It is an estimate that will vary (maybe widely) depending on the user.

We can give anonymous users only one option as a sample or the same 4 options in the OP so they are not overwhelmed by the option(s). The options can even have time estimates on the button to start the prayer.

follindown commented 5 months ago

I do like the idea of a hidden timer that ends the session at the specified time without you having to feel like you didn't finish all the cards you had in your deck. It will just seem that the deck was the exact right length for the amount of time you specified. I think I need clarification on your proposal to understand. Do you want to use the time estimate of 30 seconds for praise cards and 15 seconds for other genres as a way to set an amount of cards in a deck when the user selects 5 minutes? Or are you saying that on the automagically generated daily deck for non-users you would just have a deck or decks containing certain amounts of cards and give them a suggested time that it might take them to do that deck? Or maybe just call them something generic like "quick session"?

On Fri, Jan 19, 2024 at 6:35 PM Soyokaze-42 @.***> wrote:

We don't have to display the time as they pray. We could fetch a new card every time they swipe and stop giving them cards at the end of the timer. That way, no matter how quickly they pray, the duration is true.

This proposal is to use counts of cards per genre as a proxy for the duration because the duration is not really a time in this case. It is an estimate that will vary (maybe widely) depending on the user.

We can give anonymous users only one option as a sample or the same 4 options in the OP so they are not overwhelmed by the option(s). The options can even have time estimates on the button to start the prayer.

— Reply to this email directly, view it on GitHub https://github.com/PrayTeam/scriptured-prayer/issues/42#issuecomment-1901438092, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEXUS3UNJAM6QS3XF3VIL4DYPMGMJAVCNFSM6AAAAABB46QHCWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBRGQZTQMBZGI . You are receiving this because you were mentioned.Message ID: @.***>

kenancasey commented 3 months ago

@Soyokaze-42 I'd like to plan this feature (i.e. the backend endpoint). Do you prefer to take care of the API endpoint for guest users, or should I assign it to a student?

Soyokaze-42 commented 3 months ago

What are you thinking the API lacks for this feature?RobbieOn Mar 19, 2024, at 12:53 PM, Kenan Casey @.***> wrote: @Soyokaze-42 I'd like to plan this feature (i.e. the backend endpoint). Do you prefer to take care of the API endpoint for guest users, or should I assign it to a student?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

kenancasey commented 3 months ago

@Soyokaze-42 I didn't see an endpoint to get a mixture of cards from different categories based a given a desired number of cards. Is that already written? I didn't see it in the Swagger docs.

Soyokaze-42 commented 3 months ago

@kenancasey The limit filter on the /api/cards endpoint should give you a set number of cards across all of the available categories.