WPAFC / afch

Yet another Articles for creation helper script -- ACTIVE DEVELOPMENT NO LONGER HAPPENS IN THIS REPOSITORY AND HAS MOVED TO
https://github.com/WPAFC/afch-rewrite
9 stars 3 forks source link

Offer the option to automatically delete HTML comments from page #171

Closed theopolisme closed 11 years ago

theopolisme commented 11 years ago

Making a pull request for posterity.

Sample graphics:

theopolisme commented 11 years ago

@Technical-13 this isn't letting me reopen the issue (since it's not yet in live) for some reason. Any luck?

wikipedia-mabdul commented 11 years ago

nice work! looks great!

Technical-13 commented 11 years ago

No, there are some (I think ones that have deleted branches or something), that can't be open. The only thing I would think better is to put the delete link in front so they are symmetrical.

theopolisme commented 11 years ago

I kind of felt like the delete message needed to be longer, so that people would actually understand what they were deleting, at least initially... happy to be convinced though

hasteur commented 11 years ago

I can think of a case where an editor (doncram) has put actually meaningful text in an HTML comment which would be lost if this feature was applied without thinking.

On Tuesday, September 17, 2013, theopolisme wrote:

Making a pull request for posterity.

Sample graphics:

-

what one sees if there are long html comments on the page: [image: screen shot 2013-09-17 at 8 33 23 pm]https://f.cloud.github.com/assets/1410202/1162096/7e7e9cbe-2002-11e3-850b-6440011174e9.png

if you click on a "delete comment" link (after the "Comment removed" text displays for a second, it disappears): [image: screen shot 2013-09-17 at 8 33 56 pm]https://f.cloud.github.com/assets/1410202/1162097/8b8a8878-2002-11e3-8449-a394914eaead.png

and if you delete all the html comments, then the long comment notice automagically disappears (yay!): [image: screen shot 2013-09-17 at 8 34 08 pm]https://f.cloud.github.com/assets/1410202/1162100/a93a64ba-2002-11e3-9171-bdf92308546b.png


You can merge this Pull Request by running

git pull https://github.com/WPAFC/afch feature-delcomments

Or view, comment on, or merge it at:

https://github.com/WPAFC/afch/pull/171 Commit Summary

  • Fix regexp
  • Store each html comment with a unique identifier to a dictionary
  • afcHelper_removehtmlcomment() to removes the selected HTML comment from wikitext
  • When "remove comment" is clicked, trigger afcHelper_removehtmlcomment()

File Changes

  • M src/submissions.jshttps://github.com/WPAFC/afch/pull/171/files#diff-0(25)

Patch Links:

theopolisme commented 11 years ago

@hasteur hence why it displays the comment text to the reviewer, for them to read and then -- _iff_ they decide it is not necessary in the mainspace (e.g., a note to the reviewer) -- delete. [[WP:CIR]] for reviewers, even if that's not always the case ;)

Technical-13 commented 11 years ago

I've no problem with this if you think the link needs to be longer or clearer. I just like the links symmetrical to make them easier to find/click (like when MediaWiki moved the [edit] links I was one of the first to apply the css to move them back):

Which could be followed up by:

Which reminds me, although I have no issue with the script hiding the warning, I think that the deleted lines should be left and maybe up the road even offer:

Technical-13 commented 11 years ago

I was just looking at this live, and the link definitely needs to be moved over @theopolisme -- Also, as I was looking at it, I was thinking it would be nice to have some reference points in the page and links up top to those points to get a better feel for the context of the comment. For example, on http://en.wikipedia.org/wiki/Wikipedia_talk:Articles_for_creation/SHORE_Solutions_Inc. there are five comments listed there:

There is no indication where on the page that those comments are, "are they in the text?", "are they in the infobox?", "are they someplace that makes sense?" So, to fix this, add a simple notation and ref link (like tags do).

wikipedia-mabdul commented 11 years ago

"experienced reviewers" will recognize that MOST comments are used within the infobox and are copied by the blank full infobox markup from its documentation page... actually I don't believe that we can handle that so that the reviewer knows where they are; if they want to know it, press edit and then press "review"...

wikipedia-mabdul commented 11 years ago

BTW: @theopolisme: if a user does this (pressing edit and the review) should we take then the content of the edit box and modify it there or disabled the review button completely? (so live editing or somewhat...)

Technical-13 commented 11 years ago

Sure we can @wikipedia-mabdul -- Just wrap the comment in a <span id="comment-#" style="font-size: smaller;" class="sup">[1]<!-- comment --></span> or something and then in the header section just add links to #comment-#.

wikipedia-mabdul commented 11 years ago

this might be an additional thing for #83 .

theopolisme commented 11 years ago

Wouldn't it be kind of confusing for a user to see a random [1] appear in the pagetext with no apparent purpose...?

Technical-13 commented 11 years ago

@theopolisme, only the reviewer would see it, and there would be a corresponding marker in our header. I'm sure most of our reviewers are smart enough to put a and a together... Doesn't matter what we use, numbers-letters-symbols-colored dots... as long as they match and link together so clicking on one will take you to the other...

theopolisme commented 11 years ago

So, I've changed the wording. And frankly, I think it's still fairly confusing. How can we make this make sense? @APerson241 you're good at this stuff, iirc...any thoughts (for clarifying the "delete" message)?

screen shot 2013-09-18 at 7 05 54 pm

updated: "remove from page"? maybe it's as simple as that..