Page MenuHomePhabricator

Manual QA of bracket matching
Closed, ResolvedPublic2 Estimated Story Points

Description

We have very little browser test coverage (exactly 1 test of the feature), so let's do a little manual smoke testing.

  • Merge all final patches so they appear on beta.
  • Enable bracket matching on beta.
  • A few of us (not just developers) try the feature on beta, with real article text copied from wiki*s.

Things to try:

  • A wide range of browsers.
  • Very long paragraphs.
  • Mismatched punctuation.
  • All the different brackets.

Event Timeline

awight set the point value for this task to 2.Jan 20 2021, 9:40 AM

I found a strange behavior: When you add a bracket of another type inside a pair, the original pair matching is not working. See also the screen cast (click to play):

Peek 2021-01-20 12-31.gif (226×540 px, 65 KB)

See my comment in https://phabricator.wikimedia.org/T270317#6764924 for a general cross browser performance review. tl;dr: All fine with the bracket matching code.

I found a strange behavior: When you add a bracket of another type inside a pair, the original pair matching is not working. See also the screen cast (click to play):

Peek 2021-01-20 12-31.gif (226×540 px, 65 KB)

That's interesting. The most minimal example code seems to be }[}]. The highlighting/matching does not work for the square brackets. If you use }[[}]] it will match the first square bracket with the next to last one, but not the others. We should create a ticket for that.

See my comment in https://phabricator.wikimedia.org/T270317#6764924 for a general cross browser performance review. tl;dr: All fine with the bracket matching code.

tl;dr2: I tested current FF, Chrome, Edge and IE11. in general bracket matching works in all these browsers.

That's interesting. The most minimal example code seems to be }[}]. The highlighting/matching does not work for the square brackets. If you use }[[}]] it will match the first square bracket with the next to last one, but not the others. We should create a ticket for that.

Additional fun fact: with this code snippet you get a light blue highlighted space.

}[}]
 <-space here

Screenshot_2021-01-21 Editing Main Page - EnLocalWiki.png (96×111 px, 1 KB)

Edit: The latter has nothing to do with the bracket matching code.

I found a strange behavior: When you add a bracket of another type inside a pair, the original pair matching is not working. See also the screen cast (click to play):

Peek 2021-01-20 12-31.gif (226×540 px, 65 KB)

That's interesting. The most minimal example code seems to be }[}]. The highlighting/matching does not work for the square brackets. If you use }[[}]] it will match the first square bracket with the next to last one, but not the others. We should create a ticket for that.

T272602: Interlaced, single and other non-matching brackets are not highlighted

Also did a last round of testing with a current Webkit ( Safari-alike ) browser. All fine. Moving this to done.

The bug mentioned above seems to be an edge case where I would not give highest priority to fix it.

WMDE-Fisch claimed this task.

I just added the maintenance tags to the follow up ticket. I guess this can be closed then.

The bug mentioned above […]

Note: I left a longer response at T272602#6781121. TL;DR: We disabled error-reporting. Sure, we can re-enable it, but that's a product decision, not a bug.

If you use }[[}]] it will match the first square bracket with the next to last one, but not the others.

The algorithm skips nested pairs of brackets, but intentionally doesn't check if they match. That's why in [… (…} …] the outer […] pair is highlighted. It matches. The algorithm considers the inner (…} a "pair" as well and skips it, but never highlights it, because it doesn't match.

This is not necessarily the only way to do it. We can discuss other ways if you want.

[…] you get a light blue highlighted space.

This is when a line starts with a space. That's actually syntax in wikitext. It does the same as <pre> and is rarely used. You might not even know it.