Skip to content

show-whitespace doesn’t work on newly sent suggestions #2852

Closed

Description

@szmarczak

Peek 2020-03-03 16-01

Activity

  1. changed the title [-]Tabs characters (`->`) are not shown in the newly sent suggestion[/-] [+]`show-whitespace` doesn’t work on newly sent suggestions[/+] on Mar 5, 2020
  2. szmarczak commented on Apr 6, 2020

    @szmarczak
    Author

    No, I checked that for PRs (hence the "start a review" button).

  3. szmarczak commented on Apr 6, 2020

    @szmarczak
    Author

    Checked again, the issue still persists.

  4. szmarczak commented on Apr 6, 2020

    @szmarczak
    Author

    I am only seeing it on the PR Files Tab.

    That's what I'm talking about... Files changed... I guess I could've said that at the beginning :P

  5. fregante commented on Apr 13, 2020

    @fregante
    Member

    While looking for this I figured out an easy way to see GitHub's event names:

    d = Node.prototype.dispatchEvent;
    Node.prototype.dispatchEvent = function (...a) {
    	console.log(...a);
    	// debugger; // Uncomment when necessary
    	d.apply(this, a);
    }

    screen

  6. fregante commented on Apr 13, 2020

    @fregante
    Member

    Anyway, no special events seem to be available. The only solution I can think of:

    o = new MutationObserver(runUpdates);
    
    for commentHolders of select.all('.diff-table tbody, .js-comments-holder')
    	o.observe(commentHolders, {childList: true})

    This should probably be part of on-new-comments somehow. After #2987

  7. fregante commented on Jun 18, 2020

    @fregante
    Member

    I really think that #3084 should fix all of our problems, it should be revisited: #3092

    That PR probably just needs an efficient mechanism to avoid applying changes to the same element.

  8. notlmn commented on Jun 30, 2020

    @notlmn
    Contributor

    @fregante any reason we can't listen on socket:message events and handle everything from there?

  9. fregante commented on Jul 1, 2020

    @fregante
    Member

    If it works, sure, but I think updates can happen seconds after the event.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions