shu8 / stack-exchange-post-watcher

Watch questions and answers on the Stack Exchange network of sites to find out when they are edited, commented on, answered, and more!
https://stackapps.com/q/8278/26088
MIT License
5 stars 0 forks source link

General Improvements #1

Open shu8 opened 5 years ago

shu8 commented 5 years ago

[Comment by @fixer1234 migrated from https://github.com/soscripted/sox/issues/215]:

Loaded it on Firefox and played with it a bit. Good start. Some suggestions:

  • The token didn't survive rebooting, so I lost all of the threads I was following. A persistent token is probably a requirement for it to have real value. It would be even better if there's a way to anchor it to the account so that it works across devices. It's probably common for people to work on several computers (like work and home).

  • It would be helpful to identify whether each link is to the question or an answer (Maybe prefix the link with a "Q" or "A").

  • An important thing I follow is whether an answer has been deleted. It would be useful to add watching a state change on answers.

  • It isn't obvious from the icon whether there's been any changes. If it does change, it doesn't change back after updates have been cleared. So it serves as an access point for watched posts, but doesn't inform when there are changes (you need to periodically check it). It would be useful if the icon indicates changed content (e.g., obvious color change, like blue for no indication vs. red or orange for change indication).

  • There isn't a simple way to reset it. At least for me, I'm not looking for just the first change to a watched post, but any change until I unwatch it. The change indication doesn't clear automatically when you view the post (which would be hard to get right if you are watching a thread and go to say the question without noticing that a watched answer there also has a change). So after the first change, there isn't an indication for subsequent changes. Since there isn't an easy way to find the post again, the current procedure is to click on the post link. At the post, open the watch icon and stop watching the post. Then click watch on the post again. I can think of a couple of approaches to improve this. 1) Use the post's Watch button as a reset toggle. Clicking it while active would clear changes in the Watch window. This might be counter-intuitive, though, for people who expect that to function like a watch on/off. 2) A better solution would be to add a Reset button next to the Stop button in the watch window, which would clear the change indicators for the post.

  • A potential way to simplify it. I'm not sure how many people really need the granularity of what changes to watch. It might be just as useful if clicking Watch just tracks everything (no selection of which changes to track, so faster). In the watch window, every post would have all of the boxes, which would show what change actually happened, so the user would know whether the change is important to them from that window. If the granularity actually is important to people, you could still leave all of the boxes in the watch window for every post (for uniformity and simplicity). In that case, the boxes would show the changes, but only selected changes would trigger the alert indicator on the icon.

shu8 commented 5 years ago

@fixer1234 I've started working on the improvements you've suggested. I'm thinking of making the popup dialog look something like:

image

which clarifies your 5th point hopefully! I've also added a 'Q:' or 'A:' prefix to the post titles so you can see what post types each one is for your 2nd point :)

I've made the 'unread changes' icon badge larger so hopefully it's more noticeable (see the top right of the screenshot) for your 4th point.

Unfortunately I couldn't reproduce your 1st point where the access token didn't persist -- can I ask if you're logged in to Firefox's sync? if you are you might need to enable 'add ons' under 'sync settings' at about:preferences.

I'm looking into adding deleted posts as a state change option, the main issue being that if it's deleted then the API won't respond with it, but it may be possible to detect a post being missing in the response!

Please let me know if you can think of any more improvements in the UI or functionality before I publish the next version :)

Thanks again for your help!

fixer1234 commented 5 years ago

@shu8 Nice! Thoughts:

I'll be happy to check out the changes, but I removed the add-on because the token loss issue kind of makes all of the effort of watching posts a waste. I'll try to install it in Vivaldi. If it works there, and the Tampermonkey scripts work there, I may just have to migrate from Firefox to Vivaldi. Otherwise, if you can think of any diagnostics, let me know.

shu8 commented 5 years ago

@fixer1234 I haven't published this yet, and I'm going to try find a nice way to 'publish' beta versions of extensions (which I hope is possible!), so there's probably not any point reinstalling yet πŸ˜›

The exclamation mark was always there but it was incredibly small! I didn't notice that when I first released it unfortunately.

You could try disabling the add-on sync perhaps -- it could be that for some reason your reboots are messing with the sync settings? (although I wouldn't be surprised if it's just a classic FF annoyance πŸ˜‰ πŸ˜›)

shu8 commented 5 years ago

I've published v1.1.0 on Firefox @fixer1234: https://addons.mozilla.org/en-GB/firefox/addon/stack-exchange-post-watcher/ -- there is now a delete watch option too :)

fixer1234 commented 5 years ago

@shu8 Sorry for the delay in getting back to you. I've been running into computer problems. Among other things, Firefox has been misbehaving. The Tampermonkey scripts I rely on have rarely been appearing. At least for now, I've given up and made Vivaldi my default browser. It's Chromium based, so extensions from the Chrome Store work. Is there a Chrome version of the post watcher?

shu8 commented 5 years ago

@fixer1234 No problem! Sorry to hear Firefox is being a pain :( Has it had any updates recently, or has Tampermonkey been updated for FF recently? You could perhaps try Violentmonkey on FF to see if that works for you?

There is a Chrome version here: https://chrome.google.com/webstore/detail/kdjoaglbdcmgbmiahlkkhkkefncejmmm/ :) Hope it works out for you!

fixer1234 commented 5 years ago

@shu8 I'm still having computer problems. I needed to use Firefox again and the user scripts have been temporarily working, so I loaded the Firefox add-on. It's shaping up nicely, and it looks like you pretty much addressed my previous points. I made some notes in case they're useful:

All-in-all, nice job. I find myself making heavy use of it. Have you posted it on Stack Apps? How do you get the word out that it's available?

shu8 commented 5 years ago

@fixer1234 Thanks a lot for the details feedback once again!!

I'm glad you're finding it useful, and I appreciate the feedback you're giving!

I have posted it on Stack Apps: Stack Exchange Post Watcher - Firefox & Chrome extension to watch posts for any changes, but that's about the only word that's gone out it's available :P

I'll try getting these changes done as soon as possible!

fixer1234 commented 5 years ago

@shu8 on the Watch positioning, the other two items that it sometimes switches places with are Revisions and Timeline. Are those SOX items (because that's loaded on mine)? Especially if so, I wouldn't go nuts trying to fix that. Not every user will have both installed. A consistent UI looks more polished, but that position switching certainly doesn't make it unusable. Once you're aware that it happens, it's no big thing to look a few positions over to find it. If it is SOX, might there be a way just to check for SOX and then adjust, like wait for SOX to go first?

Just to clarify modifying the watch options, I wasn't envisioning anything like adding an edit button. What occurred to me was something like leaving the checkmarks displayed in the watch selections on the post. You would modify it by just unchecking a box or checking an additional box, which would also solve the issue of duplicate watch records (all you could do by clicking on Watch again would be to modify what was previously selected, you wouldn't get a blank slate to start from scratch and trigger another watch instance).

I suspect that would be a radical change from the mechanism you're using now. Changing the selection doesn't happen all that often, and it isn't a big deal to occasionally unwatch and then make new watch selections. So don't rewrite the whole thing just to add that feature.

This is a seriously useful app. There ought to be a way to announce it to make people aware that it exists. It's surprising how few people are familiar with Stack Apps. And many of those who are don't routinely pop in there just to see what new tools are available. That site is the best kept secret on SE. It would be great if announcements of new apps could be included in the community announcement window on the SE sites' main pages.

One other item that just occurred to me. If you play with the "watching for author return" feature, if the user clicks "Mark as read" on that post in the watched posts window, that should probably restart the clock for identifying the author's return.

shu8 commented 5 years ago

Yeah, the 'revisions' and 'timeline' links are SOX features, although I know of (a lot) of other userscripts that have that too, so it may be one of the them if you have one installed. It won't be high on my list but I think you're right that it would look ever so slightly more polished it it was always in the same place, so I'll have a look into that at some point :)

Ah, for the changing watch options, thinking about what you said, it might be possible to just change the behaviour from auto-unwatching when you click the 'watch' button on a post to instead _always) open the watch option dialog, and add a 'delete' option along with the current 'save' one to it. Tha way the options can be modified or the watch deleted. I'll see how difficult that would be to implement.

I'm really happy you're finding it useful! I wish there was a way to make more people aware of Stack Apps, I definitely agree that Stack Apps is a hidden gem on SE! For SOX, I used to post about it on related feature requests on Meta to let more people know about it, but there's a limit to the relevant feature requests on Meta :P I guess another issue is some people might know about it but don't want to try out a userscript/extension because they either think it might be too complicated or want the feature to be native so it exists on all their devices/platforms without them having to do anything extra!

fixer1234 commented 5 years ago

@shu8 A strange bug for you, which I suspect is an interaction with SOX. A SOX feature is to add a flame icon to the beginning of the question title on HNQ's (and I have that feature active). When I watch a HNQ (question or any of its answers), the Q or A indicator is there, but no post title. I'm guessing the flame icon is interfering with grabbing the title. Also, the tracking is sometimes messed up on HNQ Q or A posts. For example, a comment was deleted from such a watched answer. I got three notifications of the comment change (notify, mark as read, rinse & repeat). It's possible that the issue related to comment deletion rather than HNQ status (that was the only repeated notification on three HNQ watched posts, so it may not have related to its HNQ status).

Edit: Nope. A vote count change just got reported again for that HNQ question, so it isn't related to comment deletion. Perhaps lack of the title leaves it with nothing to anchor to?

shu8 commented 5 years ago

Thanks for pointing that out! I think it will all be due to the title not being extracted properly like you suspected.

I'll try looking into it as soon as I can :) (and get the other changes published too!)

fixer1234 commented 5 years ago

@shu8 Another thought on a useful addition. Am I correct that answer acceptance is not registered as anything else that is being tracked (e.g., votes, state change, etc.)? It would be useful to be able to watch for when/if a question author accepts an answer. Doing that on specific answers would get unwieldy, and the user would need to watch every answer, including new ones. However, whether or not a question has an accepted answer appears to be information associated with the question and available through the API. Just watching the question for the status of it having an accepted answer would do the trick (and it's easy enough to go to the watched question to see which answer it is). Whether a question has an accepted answer seems like a common thing people would want to know for a variety of reasons (I'm guessing it isn't just me).

shu8 commented 5 years ago

@fixer1234 great idea! I'll try adding that too :)

I might do it as a 'state change' or a new watch option itself, but I'll see how it will work first!

shu8 commented 5 years ago

@fixer1234 Sorry for the delay, but I've just now finally released most of these changes in v1.2.0!

There should be an option to update the extensions in the extensions page of Chrome/Firefox (but I'm sure it'll automatically update itself soon enough too!). It might take time for it to propagate, but from what I can tell they have reached the Chrome/FF stores!

Some things I didn't get round to (listing them here as a TODO for me πŸ˜›): making the icon better and the positioning of the watch button conflicting with SOX. I'll hopefully get round to them soon enough!


I looked into the 'user last seen' watch option idea, and I've decided to not implement it (at least for now) -- to get this working would mean adding a lot of much different logic into the extension, as the last seen time is only in the /users/ids endpoint and would require storing more details such as the user ID alongside the current post ID. I think all this might complicate the extension more than necessary.

But, SOX does have a 'show user last seen' feature, which you might find helpful for your use case (if you didn't already know about it!). I do realise it's not as helpful as having a notification, but hopefully it will be of some use!


Thanks for all the feedback again, and please do mention anything else you find/would find useful! :)

fixer1234 commented 5 years ago

@shu8 Just wanted to get back to you. I've been using this for a few weeks, both on Firefox and Vivaldi (Chromium-based), and it's working great. Nice job.

fixer1234 commented 5 years ago

@shu8 I'm seeing what might be a bug. I watched one question where accepted answer was one of the watched criteria. I also watched one answer where deletion was a watched criterion. In those two cases (the only examples where I watched for accepted answer or deletion), the status information inside the watch window correctly showed the acceptance and deletion, and those were the only relevant changes, but those post changes didn't trigger the toolbar icon to show the new info alert symbol. This is using the Chrome version. Check and see if there's something obvious. Let me know if you want me to try to gather more rigorous data. Everything else works as expected.

shu8 commented 5 years ago

Thanks, I'll try investigating as soon as I can!

shu8 commented 5 years ago

@fixer1234 Sorry for the delay! I finally managed to look into this to remind myself the logic for the toolbar icon.

From what I can see, as soon as a change is detected, the current tab's toolbar icon should update, and any other tabs should have their icon updated when you switch to them.

I can't tell why this didn't happen for you unfortunately. However, does this happen frequently? It could be that when you experienced this, the API had only just been queried and the icon hadn't been updated yet (but this is just a guess!).

Also, I know it's been a long time since this happened (sorry again!) but do you remember if there were multiple tabs open, and if the icon was updated on any of those tabs if so?

If this happens again, I think one way to try for us to debug it is for you to switch tabs and see whether the new tab has the current toolbar icon. This would help to narrow down which part of the code is failing!

fixer1234 commented 5 years ago

@shu8, I'll keep my eye out for posts where it might be likely and watch them. I'll post back when anything shows up.

fixer1234 commented 5 years ago

@shu8, OK, just watched an answer for deletion, and the icon did change. So it looks like it's working. Who knows what happened before? Maybe it just behaved this time because it knew you were watching. :-)

It looks like this is a big NEVERMIND! Hope it didn't waste too much of your time.

shu8 commented 5 years ago

@fixer1234 no problem! Glad it's working now :)

It could still have been some sort of race condition though so please let me know if it happens again! (and I'll try to debug it a bit quicker!)