Charcoal-SE / userscripts

Collection of userscripts that are used by/are useful to Charcoal.
https://charcoal-se.org/scripts
Apache License 2.0
28 stars 27 forks source link

FDSC should not show NAA indicator for questions #97

Closed Glorfindel83 closed 5 years ago

Glorfindel83 commented 7 years ago

Scroll down for Hacktoberfest summary and guidance.

The question linked to in this chat message behaves oddly when FDSC is opened; it shows an naa feedback. This could be the ignore feedback by bummi.

angussidney commented 7 years ago

By the looks of it we retrieve the NAA count directly from the API, so this bug is probably an issue on the Metasmoke end.

angussidney commented 7 years ago

Related bug: FDSC shouldn't display the NAA count for questions.

angussidney commented 6 years ago

contrib-guidance

Summary

Difficulty: 1/5 stars
Scope: Narrow scope
Issue Owner: angussidney

This issue relates to one of our userscripts, Flag Dialog Smokey Controls (FDSC). One of the functions of this script is to display the number of each type of feedback on a post. However, NAA (not an answer) feedback isn't allowed on questions - therefore it should not be displayed.

Guidance

All the files related to FDSC are stored in this folder. Specifically, you'll be looking at the main .user.js file which stores all of the code.

The relevant code for displaying feedbacks on this line. I recommend refactoring this line into several new lines, each appending HTML for each specific feedback. Not only will this make it easier for you to work with, it will also increase readability and maintainability. Then, you'll need to detect whether the selected post is a question, and if so, hide the NAA indicator.

Finally, don't forget to increment the version number in the metadata at the top, and update the .meta.js file to match.

How to get help

For additional support in completing this issue, either: