HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
11.94k stars 4.08k forks source link

"Advanced Options in tasks start collapsed" does not work #5408

Closed Alys closed 9 years ago

Alys commented 9 years ago

Under Settings -> Site, there is a checkbox labelled "Advanced Options in tasks start collapsed". From memory, this used to work: if the box was unticked, then whenever you opened a task for editing, the Advanced Options would already be open. If you ticked the checkbox, then the Advanced Options would be closed by default.

However now, Advanced Options is always closed, regardless of the state of that checkbox.

hairlessbear commented 9 years ago

I'm almost positive that this was caused by the addition of the weeklies/monthlies feature. I could be wrong of course, but that's when I noticed it, and I use the advanced features often.

crookedneighbor commented 9 years ago

Probably a result of my refactoring during the weeklies pr.

patena commented 9 years ago

I have the same problem.

JiriChara commented 9 years ago

I would love if HabitRPG could remember my last selection. Same for selected tab in certain task category and so on. It would be pretty useful to have kind of user settings (persisted on the server) for such things so it would work across devices. The user settings API can be very simple just accepting string key and a JSON value and user ID. User settings will be loaded on every full refresh and they will be PATCHed every-time user changes something. What do you guys think? I think most of the users expect to see the same on the screen after refreshing the page.

Alys commented 9 years ago

Sorry, I meant to say: I noticed this before the recent addition of new options to the Dailies, but forgot to report it then.

crookedneighbor commented 9 years ago

The problem is actually that it is reversed. If you don't have it checked, the advanced options don't show up automatically. If you do have it checked, they do. Should be an easy fix. Going to publish it in the Aspiring Coders guild.

Here's the line that needs changing: https://github.com/HabitRPG/habitrpg/blob/develop/website/public/js/directives/habitrpg-tasks.directive.js#L25

As you can see, it's setting whether or not the task's advanced settings are open to be equal to the value of the user setting, but it should be the opposite, since the user setting is true if you do not want it open.

carolstone commented 9 years ago

I'd love to work on this, but I'm not going to be able to get a reasonable block of time until Thursday 6/18 (partly because my setup is so slow). I'll look in on it again then and if nobody has grabbed it, I'll happily do so!

hairlessbear commented 9 years ago

@carolstone Shoot, I didn't see your message before I fixed this. I'm sorry! I would've left it for you if I'd known you were interested :confused:. I'll be more careful next time.

carolstone commented 9 years ago

@hairlessbear I'm glad you didn't wait for me. Please don't feel bad!