Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

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

Merged
merged 4 commits into from
Sep 18, 2013

Conversation

theopolisme
Copy link
Contributor

Making a pull request for posterity.

Sample graphics:

  • what one sees if there are long html comments on the page:
    screen shot 2013-09-17 at 8 33 23 pm
  • if you click on a "delete comment" link (after the "Comment removed" text displays for a second, it disappears):
    screen shot 2013-09-17 at 8 33 56 pm
  • and if you delete all the html comments, then the long comment notice automagically disappears (yay!):
    screen shot 2013-09-17 at 8 34 08 pm

theopolisme added a commit that referenced this pull request Sep 18, 2013
Offer the option to automatically delete HTML comments from page
@theopolisme theopolisme merged commit dde02a6 into develop Sep 18, 2013
@ghost ghost assigned theopolisme Sep 18, 2013
@theopolisme theopolisme deleted the feature-delcomments branch September 18, 2013 01:38
@theopolisme
Copy link
Contributor Author

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

@wikipedia-mabdul
Copy link
Member

nice work! looks great!

@Technical-13
Copy link
Contributor

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.

  • (delete) hidden comment: lorem ipsum .....
  • (delete) hidden comment: foo bar baz .....

@theopolisme
Copy link
Contributor Author

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
Copy link
Member

hasteur commented Sep 18, 2013

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:

#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

Patch Links:

@theopolisme
Copy link
Contributor Author

@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
Copy link
Contributor

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:

  • You deleted the following hidden comment: lorem ipsum .....
  • You deleted the following hidden comment: foo bar baz .....

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
Copy link
Contributor

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
Copy link
Member

"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
Copy link
Member

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
Copy link
Contributor

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
Copy link
Member

this might be an additional thing for #83 .

@theopolisme
Copy link
Contributor Author

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
Copy link
Contributor

@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
Copy link
Contributor Author

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..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants