1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 21:17:25 +08:00
Commit Graph

37 Commits

Author SHA1 Message Date
Bartłomiej Dach
30a4e77097
Merge branch 'master' into fix-overlapping-chat-links 2023-12-01 14:30:55 +01:00
Bartłomiej Dach
d97ae8df6a
Remove commented out italic code
It's a holdover from the Exo days (anyone remember those?) and hasn't
been relevant for years, so why keep it.
2023-12-01 13:31:11 +01:00
Susko3
c395ae2460 Add failing tests
They throws `ArgumentOutOfRangeException` on the first drawable Update()
2023-12-01 00:51:20 +01:00
Susko3
7f9ae55f5e Add passing tests 2023-12-01 00:48:55 +01:00
Susko3
1a33bfbb3a Enable NRT 2023-12-01 00:37:16 +01:00
Susko3
fba6349c65 Remove unused properties 2023-12-01 00:36:40 +01:00
Susko3
21fedff54f Check number of links shown 2023-12-01 00:29:37 +01:00
Susko3
7b1ccb38cb Remove redundant string interpolation 2023-11-30 23:35:10 +01:00
Susko3
0520ac265f Move to TestCase-based test 2023-11-30 23:34:43 +01:00
Susko3
52ffbcc6db Move special cases to TestCase'd test 2023-11-30 23:29:22 +01:00
Susko3
3ca3f25492 Extract local method 2023-11-30 23:26:52 +01:00
Susko3
9a32c0368e Remove redundant linkAmount parameter 2023-11-30 14:38:58 +01:00
Susko3
831fe5b9f2 Use collection assert to ease debugging 2023-11-30 14:36:23 +01:00
Lukynka CZE
2a18f76b02 add visual test 2023-09-14 17:48:10 +02:00
Bartłomiej Dach
4859b8c994
Add some extra text coverage against potential emoji-to-link misparses 2023-07-13 20:51:52 +02:00
Alden Wu
0cb7c94c21 Merge branch 'master' of https://github.com/ppy/osu into chat-profile-highlight-v2 2022-11-28 17:59:15 -08:00
Alden Wu
c2d8ffc225 Refactor ChatLine username drawable creation 2022-11-28 17:50:12 -08:00
Dan Balasescu
7bc8908ca9 Partial everything 2022-11-27 00:00:27 +09:00
Dan Balasescu
fa18b5f701 Construct notifications client inside ChannelManager 2022-11-04 18:51:00 +09:00
Dan Balasescu
5b25ef5f2f Construct notifications client via IAPIProvider 2022-11-01 21:34:34 +09:00
Dan Balasescu
169bcc2654 Use polling connector in tests 2022-10-28 18:08:08 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
c661f2b059 Ensure ChannelManager has access to API from point of construction
Closes https://github.com/ppy/osu/issues/18451.
2022-06-08 19:15:23 +09:00
Jai Sharma
60b10fca4e Remove redundant caching of overlays in ChatLink test 2022-05-23 21:02:50 +01:00
Salman Ahmed
3cbc6cd297 Update further tests to cache using IDialogOverlay 2022-04-18 21:04:22 +03:00
Dean Herbert
98aaf83177 Add a centralised constant for the osu URL schema protocol 2022-02-18 15:57:37 +09:00
Dan Balasescu
3cb5f43f77 Fix incorrect action returned for wiki links in DEBUG mode 2022-01-11 17:46:49 +09:00
Dan Balasescu
269df08fc9 Make ChatLink tests into proper unit test methods 2022-01-11 17:42:02 +09:00
Dean Herbert
0ecf5f201c Rename User to APIUser and move to correct namespace 2021-11-07 11:26:01 +09:00
Dean Herbert
f7374703f0 Update tests to match dev domain 2021-02-12 15:29:21 +09:00
smoogipoo
648999a2de Remove all RequiredTypes usages 2020-05-16 18:17:12 +09:00
Dean Herbert
1a6056637b Turn off italics test for now (may come back if we switch chat to content font) 2020-03-15 01:43:48 +09:00
Dean Herbert
ed837d3115 Use framework extension method for FromHex 2020-03-11 10:18:41 +09:00
Bartłomiej Dach
08350a1aca Add parenthesis handling to old link format
Allow users to put both balanced round parentheses, as well as
unbalanced escaped ones, in old style link text. The implementation
is the same as for Markdown and new style links, except for swapping
all instances of

    \[\]

to

    \(\)

for obvious reasons (different type of parenthesis requiring escaping).
Tests also included.
2019-09-04 00:21:27 +02:00
Bartłomiej Dach
f04add6d9e Add bracket handling to Markdown link format
Allow users to put both balanced brackets, as well as unbalanced
escaped ones, in Markdown link text. The implementation is the exact
same as in the case of new format links.

For completion's sake, tests also included.
2019-09-04 00:07:00 +02:00
Bartłomiej Dach
a8f16503e2 Add backslash escaping to new link format
For users to be able to add square brackets inside of links using
the new format, the regular expression used for parsing those links
contained a balancing group, which can be used for matching pairs
of tokens (in this case, opening and closing brackets, in that order).
However, this means that users could not post links with unmatched
brackets inside of them (ie. ones that contain single brackets, or
a closing bracket and then an opening one). Allow for escaping opening
and closing brackets using the backslash character.

The change substitutes this old fragment of the regex in the display
text group:

    [^\[\]]*        // any character other than closing/opening bracket

for this one:

    (((?<=\\)[\[\]])|[^\[\]])*

The second pattern in the alternative remains the same; the first one
performs the escaping, as follows:

    (
        (?<=\\)     // positive lookbehind expression:
                    // this match will succeed, if the next expression
                    // is preceded by a single backslash
        [\[\]]      // either an opening or closing brace
    )

Since the entire display group is matched, unfortunately the lookbehind
expression does not actually strip the backslashes, so they are
manually stripped in handleMatches.

As demonstrated in the unit tests attached, this also allows balanced
brackets to be mixed with escaped ones.
2019-09-03 23:18:39 +02:00
Roman Kapustin
459a285cd8 Rename test cases to test scenes inline with the framework change 2019-05-14 22:37:25 +03:00