1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 08:47:24 +08:00
Commit Graph

529 Commits

Author SHA1 Message Date
Terochi
3d4962e181 Added functioning tests. 2022-11-17 13:07:06 +01:00
Terochi
6d83af01e2 Moved and renamed MessageHistoryTextBox.cs for better fit. 2022-11-17 13:07:06 +01:00
Dragon
b9590320b7 Moved implementation to ChatRecentTextBox.cs and derived ChatTextBox.cs and StandAloneChatDisplay.cs from it. 2022-11-17 13:07:06 +01:00
Dean Herbert
22d8a1160e Fix last silence ID being updated too often, causing most silences to be missed 2022-11-13 00:10:06 +09:00
Dean Herbert
143c946128 Simplify ack re-perform flow 2022-11-12 23:02:37 +09:00
Dean Herbert
bfb939cbd0 Expand on why call needs to be made every 10 minutes 2022-11-12 22:24:27 +09:00
Dean Herbert
ace4099079 Update ack code after incorrect merge 2022-11-12 21:41:10 +09:00
Dean Herbert
dde09d409b Merge branch 'master' into chat-silences 2022-11-12 21:00:56 +09:00
Dean Herbert
19876ca0fb
Merge branch 'master' into websocket-chat-2 2022-11-11 23:53:42 +09:00
Dan Balasescu
6ac19615fa Fix test failure 2022-11-11 14:55:41 +09:00
Dan Balasescu
67e99b5344 Lookup channels before calling HandleJoinedChannel() 2022-11-07 14:34:55 +09:00
Joseph Madamba
b977fc8181 Use autosize instead of max width on fixed width timestamps 2022-11-06 19:28:01 -08:00
Dan Balasescu
f931bdc5ff Fix channel lookup not considering missing ids 2022-11-07 12:25:23 +09:00
Dan Balasescu
cf03001c83 Better handling for joining channels with only ID 2022-11-07 11:52:07 +09:00
Dan Balasescu
e3adf5a985 Handle channel parts 2022-11-07 11:36:55 +09:00
Dan Balasescu
f12ada9d92 Fix chat connecting too early 2022-11-04 19:36:24 +09:00
Dan Balasescu
1d2818dc70 Reschedule ack request on completion 2022-11-04 19:02:26 +09:00
Dan Balasescu
fa18b5f701 Construct notifications client inside ChannelManager 2022-11-04 18:51:00 +09:00
Dan Balasescu
72745656e7 Remove StartChat()/chat enablement 2022-11-04 18:48:34 +09:00
Dan Balasescu
58396d49dc Fix handling of local echo deduplication 2022-11-04 18:44:22 +09:00
Dan Balasescu
063a8bdf9e Remove messages from silenced users 2022-11-02 17:13:14 +09:00
Dan Balasescu
f688ed12d0 Add test for removing chat messages 2022-11-02 17:00:47 +09:00
Dan Balasescu
ab78cde2d4 Fix crossthread mutations 2022-10-28 18:37:43 +09:00
Dan Balasescu
169bcc2654 Use polling connector in tests 2022-10-28 18:08:08 +09:00
Dan Balasescu
2f731f86ba Adjust ChannelManager to use notifications client 2022-10-28 16:28:58 +09:00
Dan Balasescu
33bb1212d1 Add notifications websocket + chat implementation 2022-10-28 16:28:58 +09:00
Dean Herbert
09aa3e065d Move colouring to full icon content rather than background 2022-08-30 18:06:48 +09:00
Dean Herbert
6a0d23cf96 Nest dialog class and apply NRT 2022-08-24 17:39:22 +09:00
Andrew Hong
ec5fd7ac1d Remove possible 'System.NullReferenceException' 2022-08-24 03:42:16 -04:00
Andrew Hong
b24513038c Add popupdialog button to copy url 2022-08-24 03:35:19 -04:00
Dean Herbert
c1075d113f Add logging around current channel changes and join requests
Tracking down a flaky test
(https://teamcity.ppy.sh/buildConfiguration/Osu_Build/553?hideProblemsFromDependencies=false&expandBuildTestsSection=true&hideTestsFromDependencies=false):

```csharp
TearDown : System.TimeoutException : "PM Channel 1 displayed" timed out
--TearDown
   at osu.Framework.Testing.Drawables.Steps.UntilStepButton.<>c__DisplayClass11_0.<.ctor>b__0()
   at osu.Framework.Testing.Drawables.Steps.StepButton.PerformStep(Boolean userTriggered)
   at osu.Framework.Testing.TestScene.runNextStep(Action onCompletion, Action`1 onError, Func`2 stopCondition)
--- End of stack trace from previous location ---
   at osu.Framework.Testing.TestSceneTestRunner.TestRunner.RunTestBlocking(TestScene test)
   at osu.Game.Tests.Visual.OsuTestScene.OsuTestSceneTestRunner.RunTestBlocking(TestScene test) in /opt/buildagent/work/ecd860037212ac52/osu.Game/Tests/Visual/OsuTestScene.cs:line 503
   at osu.Framework.Testing.TestScene.RunTestsFromNUnit()
------- Stdout: -------
[runtime] 2022-06-27 23:18:55 [verbose]: 💨 Class: TestSceneChatOverlay
[runtime] 2022-06-27 23:18:55 [verbose]: 🔶 Test:  TestKeyboardNextChannel
[runtime] 2022-06-27 23:18:55 [verbose]: Chat is now polling every 60000 ms
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #1 Setup request handler
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #2 Add test channels
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #3 Show overlay with channels
[runtime] 2022-06-27 23:18:55 [verbose]: Unhandled Request Type: osu.Game.Online.API.Requests.CreateChannelRequest
[network] 2022-06-27 23:18:55 [verbose]: Failing request osu.Game.Online.API.Requests.CreateChannelRequest (System.InvalidOperationException: DummyAPIAccess cannot process this request.)
[runtime] 2022-06-27 23:18:55 [verbose]: Unhandled Request Type: osu.Game.Online.API.Requests.CreateChannelRequest
[network] 2022-06-27 23:18:55 [verbose]: Failing request osu.Game.Online.API.Requests.CreateChannelRequest (System.InvalidOperationException: DummyAPIAccess cannot process this request.)
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #4 Select channel 1
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #5 Channel 1 is visible
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #6 Press document next keys
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #7 Channel 2 is visible
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #8 Press document next keys
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #9 PM Channel 1 displayed
[network] 2022-06-27 23:18:55 [verbose]: Request to https://a.ppy.sh/587 failed with System.Net.WebException: NotFound.
[network] 2022-06-27 23:18:55 [verbose]: Request to https://a.ppy.sh/503 failed with System.Net.WebException: NotFound.
[runtime] 2022-06-27 23:19:05 [verbose]: 💥 Failed (on attempt 5,550)
[runtime] 2022-06-27 23:19:05 [verbose]:  Currently loading components (0)
[runtime] 2022-06-27 23:19:05 [verbose]: 🧵 Task schedulers
[runtime] 2022-06-27 23:19:05 [verbose]: LoadComponentsAsync (standard) concurrency:4 running:0 pending:0
[runtime] 2022-06-27 23:19:05 [verbose]: LoadComponentsAsync (long load) concurrency:4 running:0 pending:0
[runtime] 2022-06-27 23:19:05 [verbose]: 🎱 Thread pool
[runtime] 2022-06-27 23:19:05 [verbose]: worker:          min 1      max 32,767 available 32,766
[runtime] 2022-06-27 23:19:05 [verbose]: completion:      min 1      max 1,000  available 1,000
[runtime] 2022-06-27 23:19:05 [debug]: Focus on "ChatTextBox" no longer valid as a result of unfocusIfNoLongerValid.
[runtime] 2022-06-27 23:19:05 [debug]: Focus changed from ChatTextBox to nothing.
```

This kind of logging should be helpful:

```csharp
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #5 Channel 1 is visible
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #6 Press document next keys
[runtime] 2022-06-28 04:59:57 [verbose]: Current channel changed to #channel-2
[runtime] 2022-06-28 04:59:57 [debug]: Pressed (DocumentNext) handled by TestSceneChatOverlay+TestChatOverlay.
[runtime] 2022-06-28 04:59:57 [debug]: KeyDownEvent(PageDown, False) handled by ManualInputManager+LocalPlatformActionContainer.
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #7 Channel 2 is visible
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #8 Press document next keys
[runtime] 2022-06-28 04:59:57 [verbose]: Current channel changed to test user 685
[runtime] 2022-06-28 04:59:57 [debug]: Pressed (DocumentNext) handled by TestSceneChatOverlay+TestChatOverlay.
[runtime] 2022-06-28 04:59:57 [debug]: KeyDownEvent(PageDown, False) handled by ManualInputManager+LocalPlatformActionContainer.
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #9 PM Channel 1 displayed
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #10 Press document next keys
[runtime] 2022-06-28 04:59:57 [verbose]: Current channel changed to test user 218
```
2022-06-28 14:00:30 +09:00
Dean Herbert
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +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
Dean Herbert
eee79c9531
Merge pull request #18610 from jai-x/refactor-chat-line
Refactor `ChatLine` and fix `DrawableChannel` flow padding
2022-06-08 13:54:53 +09:00
Salman Ahmed
830ff66688 Fix message notifier not handling unresolved PM channels 2022-06-08 04:31:31 +03:00
Jai Sharma
2f635fa854 Refactor ChatLine and fix DrawableChannel flow padding
Refactors `ChatLine` component to use more sensible override properties
and layout using grid container. Moves creation of username component
into its own method to simplify BDL.

Updates padding of base `DrawableChannel` flow padding.

Removes usage of `ChatOverlayDrawableChannel` since it's overrides are
no longer needed.

Updates usage of `StandAloneChatDisplay` to use new override properties
of `DrawableChannel`.
2022-06-07 22:35:45 +01:00
Jai Sharma
c0aaeff2b3 Update DaySeparator to use new design throughout
Moves `DaySeparator` chat component to it's own file and update it to
match new chat design. Makes use of several virtual attributes that can
be overridden to update spacing and layout in other usage contexts.

Remove redundant usage of `ChatOverlayDaySeparator`, since the new
design is now part of the base class.

Create `StandAloneDaySeparator` to use in `StandAloneChatDisplay` which
overrides attributes to match correct spacing and layout for its design.

Ensure that `DrawableChannel.CreateDaySeparator` returns type of
`DaySeparator` instead of `Drawable`.
2022-06-04 18:02:14 +01:00
Jamie Taylor
365819865e
Remove 'submit' sample usages 2022-06-03 22:31:35 +09:00
Dean Herbert
f65d2db77f Remove "V2" suffix from ChatOverlay components 2022-05-30 17:54:09 +09:00
Jai Sharma
8f596520f3 Remove old chat overlay components 2022-05-29 20:08:43 +01:00
Dean Herbert
b2607196b8 Merge branch 'master' into new-chat-integrate 2022-05-26 18:38:26 +09:00
Dean Herbert
87959a59d9 Add missing "announce" channel type
Of note, this doesn't mean the channels will display, but it does fix
parsing errors which cause the whole chat display to fail.
2022-05-25 18:28:33 +09:00
Jai Sharma
d2a49ca266 Use ChatOverlayV2 in message notifier and tests 2022-05-23 21:02:50 +01:00
Dean Herbert
136ecb45e2 Rename dummy channel and move to a nested class inside the ChannelListing itself 2022-05-19 19:26:14 +09:00
Jai Sharma
dd4b11c593 Re-add exception handling on PM message request failure 2022-05-18 01:47:23 +01:00
Jai Sharma
ae5b6c3e10 Use dummy channel to show selector and remove ChannelListSelector
Add dummy channel `DummySelectorChannel` which should be set as the
current channel in the channel manager when the selector in the chat
overlay should be shown.

Refactors the `ChannelListItem` to not show mention pill and close
button when the channel is the dummy selector channel.

Ensure that the `ChannelList` selects the dummy channel on clicking the
selector item.

Removes `ChannelListSelector` as it is no longer needed.

Removes the `setCurrent` parameter from `ChannelManager.JoinChannel`
method as it is no longer needed.
2022-05-15 20:24:49 +01:00
Dean Herbert
a35c57860c Resolve colour inline 2022-05-12 23:54:43 +09:00
Dean Herbert
8760e5d884 Merge branch 'master' into new-chat-drawable-channel 2022-05-12 22:36:19 +09:00
Jai Sharma
cced8609f6 Add setCurrent param to ChannelManager.JoinChannel 2022-05-11 22:51:15 +01:00