Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reply Link disappears #379

Closed
Nc432o5 opened this issue Jan 10, 2019 · 14 comments
Closed

Reply Link disappears #379

Nc432o5 opened this issue Jan 10, 2019 · 14 comments
Assignees
Milestone

Comments

@Nc432o5
Copy link

Nc432o5 commented Jan 10, 2019

If you go to this link, you will see reply buttons:

stackoverflow.com/questions/54120867/is-there-any-way-to-print-something-without-using-any-strings-or-numbers-in-pyth?noredirect=1

If you go to the same link but with a comment in the URL (happens when a comment appears in your inbox), the reply links disappear:

stackoverflow.com/questions/54120867/is-there-any-way-to-print-something-without-using-any-strings-or-numbers-in-pyth?noredirect=1#comment95074329_54120867

Note the #comment95074329_54120867 part.

@shu8
Copy link
Member

shu8 commented Jan 18, 2019

@Ethan-JK thanks for the bug report! Unfortunately, I can't reproduce this. Does this still happen for you? If so, please could you make sure you're using the latest dev version and could you tell me the environment you're using (browser, userscript manager)? Thanks!

@Nc432o5
Copy link
Author

Nc432o5 commented Jan 20, 2019

@shu8 Sure! Here it is:

Installed Version: 2.3.0 Environment: Tampermonkey

Features Enabled

["Appearance-addAuthorNameToInboxNotifications","Appearance-alignBadgesByClass","Appearance-answerTagsSearch","Appearance-colorAnswerer","Appearance-displayName","Appearance-dragBounty","Appearance-highlightQuestions","Appearance-isQuestionHot","Appearance-localTimestamps","Appearance-markEmployees","Appearance-metaChatBlogStackExchangeButton","Appearance-metaNewQuestionAlert","Appearance-scrollToTop","Appearance-spoilerTip","Appearance-standOutDupeCloseMigrated","Appearance-tabularReviewerStats","Appearance-topAnswers","Appearance-unspoil","Appearance-addTimelineAndRevisionLinks","Appearance-showTagWikiLinkOnTagPopup","Comments-autoShowCommentImages","Comments-commentReplies","Comments-commentShortcuts","Comments-confirmNavigateAway","Comments-copyCommentsLink","Comments-moveBounty","Comments-showCommentScores","Comments-hiddenCommentsIndicator","Comments-onlyShowCommentActionsOnHover","Editing-addSBSBtn","Editing-editComment","Editing-editReasonTooltip","Editing-findAndReplace","Editing-kbdAndBullets","Editing-titleEditDiff","Editing-inlineEditorEverywhere","Editing-pasteImagesDirectly","Flags-flagOutcomeTime","Flags-flagPercentages","Flags-flagPercentageBar","Sidebar-hideHireMe","Sidebar-hideLoveThisSite","Sidebar-linkedToFrom","Chat-chatEasyAccess","Chat-replyToOwnChatMessages","Chat-renameChat","Voting-betterCSS","Voting-stickyVoteButtons","Voting-disableVoteButtons","Extras-alwaysShowImageUploadLinkBox","Extras-parseCrossSiteLinks","Extras-quickAuthorInfo","Extras-shareLinksPrivacy","Extras-shareLinksMarkdown","Extras-sortByBountyAmount","Extras-warnNotLoggedIn","Extras-showMetaReviewCount","Extras-copyCode","Extras-dailyReviewBar","Extras-openLinksInNewTab","Extras-showQuestionStateInSuggestedEditReviewQueue"]

@shu8
Copy link
Member

shu8 commented Jan 20, 2019

Thanks! Which browser are you running also?

@Nc432o5
Copy link
Author

Nc432o5 commented Jan 20, 2019

@shu8 Chrome Version 71.0.3578.98 (Official Build) (64-bit)

@shu8
Copy link
Member

shu8 commented Jan 20, 2019

Thanks! I looked into it more, and it seems like in the example you linked, it only doesn't show for the comment on the question (by Samuel Liew DIAMOND) -- and it does appear for a second on page load but then disappears. Is this what you're seeing too?

If it is, it seems like a clash with the Comments-onlyShowCommentActionsOnHover feature -- you could try disabling it until I work out a fix, because it doesn't seem as straight forward as I'd hope after looking at it for a few minutes!

@Nc432o5
Copy link
Author

Nc432o5 commented Jan 20, 2019

@shu8 That is what I was seeing. It is less clear now that the conversation has been moved to chat (there was a big discussion). If I remember right, it was not Samuel Liew (who wasn't there yet) but everybody (or was it just one person, I don't remember).

Hopefully, you find a fix!

@shu8
Copy link
Member

shu8 commented Jan 23, 2019

Thanks for confirming! I'll have time to look at this after the weekend hopefully :)

@shu8
Copy link
Member

shu8 commented Feb 2, 2019

@Ethan-JK I think this only seems to happen when you link to a deleted comment? I'm trying to reproduce again, and it only works on that link because the comment doesn't exist anymore!

Could you confirm please?

@Nc432o5
Copy link
Author

Nc432o5 commented Feb 2, 2019

@shu8 Yep, you are right. It only happens on comments that have been deleted. As such, I have steps to reproduce now! Here they are:

  1. Comment on something.
  2. Manually get the #comment[COMMENTID]_[POSTID] tag into the URL by inspecting the HTML for the id=[ID] of both the post and comment IDs.
  3. Copy the URL.
  4. Then deleting the comment.
  5. Paste URL containing the #comment[COMMENTID]_[POSTID] tag into URL bar
  6. Hit enter to load the page with the now-deleted comment.
  7. Poof! Gone!
    (It may only work when the (show X more comments button needs to show)

It worked for me! I did it on this question, which is mine so nobody gets a notification. I added a comment that looked something like this:

This is so cool when you look into it more.

I then got the comment ID (95800607) and the ID of the question (53772454) from DevTools and combined them like this:

#comment95800607_53772454

I then deleted the comment and added the above to the URL:

https://stackoverflow.com/questions/53772454/truly-private-variables-in-python-3#comment95800607_53772454

Then the reply buttons don't appear! You can click on the link above to see it for yourself. Also as a side note, the show X more comments that SOX adds to the top of the comment section appears, even though the #comment[X]_[Y] part of the URL should make it go away, as the bottom one does.

Oh, I also re-added my comment at the end but with slightly different wording, so you will see my comment that I added:

This is really cool when you look into it more!

However, the bug still happens without re-adding my comment. I just did it because I thought it should be there.

@shu8
Copy link
Member

shu8 commented Feb 3, 2019

Thanks for investigating @Ethan-JK!

This seems to be due to SOX not catching some sort of CSS change the sites do when a link to an invalid comment is given.

I've added a tiny delay in the function now, which should be unnoticeable, but should fix the bug!

Please give dev 2.3.31 a shot :)

@shu8 shu8 closed this as completed Feb 3, 2019
@shu8 shu8 self-assigned this Feb 3, 2019
@shu8 shu8 added this to the 2.4.0 milestone Feb 3, 2019
@shu8 shu8 added confirmed and removed no-repro labels Feb 3, 2019
shu8 added a commit that referenced this issue Feb 3, 2019
* new dev

* #305

* #307

* #310

* #310

* Better fix for #310

The old fix placed the SOX button to the right of the username, but the username only shows up in the top bar if you're logged in. This meant the SOX button would be absent if you were logged out. This new code should fix that.

* #310

* #309, #313

* #311, #312

* #256

* #319, #317, #316

* #256

* #318

* #294 deprecate enhanced editor

* #308, other small fixes

* #320

* minor fixes (#324)

change scroll top top feature JSON info

* fixes #329 (#330)

also reduces jQuery dependency

* v2.1.4 DEV before push to master

also adds #326

* v2.2.0

* inital DEV push

* update readme to state GM not supported; #306

* reduce dependency on `hotkeys`+minor details (#333)

* #334 fixed

* #334

* #334

* #338

* #335, #338

* Micro optimizations (#336)

* update source link

* micro optimizations

- converted jQuery .not to CSS selector for faster perf (https://stackoverflow.com/questions/8845811/performance-differences-between-using-not-and-not-selectors)
- introduced a separate function to eliminate thrice-repeated (!) code, to keep it DRY

* fixes some issues (#339)

described in #338 (comment)

* fixes #338

* fixes #338 (#340)

1. used addEventListener instead of onload
2. descriptive names (`reader`)
3. optimized extraction of the image URL from the `data`
4. made all declarations `var` and moved them into one place for consistency
5. shortened the POST url to simply `'/upload/image?https=true',` ;P

* #322 implemented

* Sticky property

* Update sox.user.js

* Updating button colors

The main SE buttons use a lighter color than the SOX buttons

* Update sox.css

* Minor fixes

Patched a problem with vote buttons, and fixed the color of the notify on edit button

* Update sox.user.js

* minor changes/fixes

* #341 temporary fix

* Updated mod diamond icon

Updated to the icon, to match the one used by the new topbar

* Updated diamond icon

* Updated mod diamond

* improvements in colorAnswerer (#344)

* improvements in colorAnswerer
1. constant variables+cache answeredID
2. reduce jQuery dependency+shorter a[href] selector via user ID
3. change coloration

* optimization: use filters throughout (#345)

reduces bandwidth consumption

* fixes a few features; adds CSS

Fixes moveBounty, dragBounty, copyCommentsLink.
Adds class for colorAnswerer.
Updates jQuery

* fixes quickAuthorInfo fontawesome icon

* fix a few of #308

* Major improvements in code extensibility, reduced API usage, eliminate redundancy, etc. (#348)

* fixes various bugs mentioned in #348

* fixes standOutDupeCloseMigrated for search pages

* remove unwanted console logs

* #347, various minor tweaks

* fixes small bug in parseCrossSiteLinks

e.g. on this comment: https://meta.stackoverflow.com/questions/370902/i-need-a-lot-of-help-to-write-a-query-for-the-stack-exchange-data-explorer-sh?cb=1#comment608548_370902

* Fixed Meta SE's chat link

Added a / to the end of Meta SE's if statement to fix it. Also replaced "discuss" with "meta" for Area 51 (to match the new URL for Area 51 Discussions), shortened a bit of code, and added some comments

* Fixed Meta SE links

* Changed topbar z-index

Changed the fixed topbar's z-index to match the one on SO, in order to prevent elements like the usercard (z-index: 1000) from covering it

* Made it clearer what the checkbox does

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Many fixes to dialog buttons

Fixes many of the bugs from #308

* Fixed Area 51 Discussions bug

* #348 minor tweak

* fix (#350)

...for answerer ID 13 also matching commenter ids beginning with 13 (1345, 13555, etc.)

* #352, #353 remove yahoo YQL use

* #352

* PR/351 (#355)

* update getQuestionTags

* provide immediate response to user

* minor changes

* #325: remove rangyInputs dependency (#354)

* bump version number

* remove downvotedPostsEditAlert; remove rangyinputs `require`; implement mini changelog in dialog

* install stale and no-response bots

* #356 added, minor bug fix

* start #349, start to move to es6

* onlyShowCommentActionsOnHover bug fix

* #357

* deprecate fixedTopbar feature for #349

* add showTagWikiLinkOnTagPopup feature

* #359 fixed

* #358 fixed

* fixes #360

* fixes for #361

* #361 changes

* v2.3.0 final

* 2.3.0 DEV

* fix for #363

* implemented 'feature packs' in settings dialog

* debugging for #363, fixes #364

* #363 debugging

* fix for #363

* #361 implemented (access token no longer mandatory); minor code cleanup

* #365

* fix #368

* Add #315

* fix #366

* start to use linting

* fix #372

* add #370

* clean up code

* implement #374

* fix #373

* add #370; deprecate pasteImagesDirectly

* #374 replace 'help' instead of prepend new link

* change indentation to 2 spaces

* lint

* implement #296

* implements #376 (linkify meta diamond dialog title)

* fix #375 (topAnswers post score not being found)

* improve customMagicLinks feature -- add button to help menu on all pages

* fix sticky vote buttons feature

* keep new meta posts under diamond even after clicking (#378)

* editComment improve design, add more defaults (#377)

* fix better css feature

* editComment: make dialog delete button smaller

* improve editComment for #377; allow editing; new setting storage format

* add delay to comment features for links to deleted comments #379

* bump to v2.4.0

* Remove accidental letter introduced into file

* Bump installation link version numbers

* Lint
@Nc432o5
Copy link
Author

Nc432o5 commented Feb 3, 2019

@shu8 Yep, you fixed it.

One thing though, if you go to the link I used, which is below.

https://stackoverflow.com/questions/53772454/truly-private-variables-in-python-3#comment95800607_53772454

You will see that the show X more comments button that SOX adds to the top of the comments area appears, but the one on the bottom (the SO one) doesn't. I assume this is the same problem, but just with that show X more comments button instead of the reply buttons.

Clould you fix that too? I would amagine that if would be the same fix and you used to fix the reply buttons.

@shu8
Copy link
Member

shu8 commented Feb 3, 2019

@Ethan-JK Thanks, I forgot you mentioned that! I just looked into it and the same fix might work, but I'd rather figure out a better way to fix it without the hacky delay. I'll reopen this so I remember!

@shu8 shu8 reopened this Feb 3, 2019
@shu8 shu8 modified the milestones: 2.4.0, v2.5.0 Jun 2, 2019
shu8 added a commit that referenced this issue Jun 2, 2019
Removes setTimeout added when previously trying to fix this issue.

Adds .comment-text to sox-new-comment event element checks.
This means the event will be fired when individual comments change, for
e.g. when navigating to a link with the comment in the URL which causes
the comments to automatically expand.

Fixes #379.
@shu8
Copy link
Member

shu8 commented Jun 2, 2019

@Ethan-JK Sorry for the extreme delay, but I've now fixed both these issues properly in dev 2.4.36 :)

@shu8 shu8 closed this as completed Jun 2, 2019
@Nc432o5
Copy link
Author

Nc432o5 commented Jun 3, 2019

It's fine. Nice.

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

No branches or pull requests

2 participants