1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 12:07:23 +08:00
Commit Graph

449 Commits

Author SHA1 Message Date
Dean Herbert
3bb01fd595 Fix close button animation not being applied correct on mouse down due to conflicting scales 2022-03-21 14:41:57 +09:00
Dean Herbert
7ca3beb7cc Also add fade to ChannelItem selected box 2022-03-21 14:41:42 +09:00
Dean Herbert
428e439f40 Remove space between '#' and channel name
This was in flyte's design (he was following discord) but doesn't feel
too correct when it's not aligned with anything else. We can revisit
this if/when we have better glyphs to represent channel types.
2022-03-21 14:36:56 +09:00
Dean Herbert
16caf2d30b Add slight animation when highlighting an unread channel 2022-03-21 14:34:54 +09:00
Dean Herbert
692362131e Add animation when mention pill appears (or a new message arrives) 2022-03-21 14:31:51 +09:00
Dean Herbert
11b050b66b Add slight fade when hovering ChannelListItems 2022-03-21 14:28:14 +09:00
Dean Herbert
9eda2f2df1 Remove box surrounding close button 2022-03-21 14:25:29 +09:00
Dean Herbert
f922a6b556 Rename renaming button/pill classes 2022-03-21 14:15:22 +09:00
Dean Herbert
812343b410 Merge branch 'master' into new-chat-channel-control 2022-03-21 14:14:02 +09:00
Jai Sharma
f3702fbefb Pass correct params to UpdateableAvatar ctor in ChannelListItem 2022-03-19 22:20:17 +00:00
Jai Sharma
ba5a43b526 Rename ControlItem -> ChannelListItem and associated classes 2022-03-19 21:49:14 +00:00
Jai Sharma
653bb47dd5 Use UpdateableAvatar and remove redundant ControlItemAvatar class 2022-03-19 21:36:11 +00:00
Jai Sharma
5373c3066f Use OsuAnimatedButton as base for ControlItemClose 2022-03-19 21:23:32 +00:00
Jai Sharma
a293e0c766 Remove redundant ControlItemText class 2022-03-19 16:44:58 +00:00
Dean Herbert
dfda093f4b Rename icon creation method 2022-03-18 14:03:52 +09:00
Dean Herbert
5d940ded09 Fix incorrect usage of nullable in ControlItemMention 2022-03-18 13:59:03 +09:00
Dean Herbert
d1fd14e287 Add missing nullable 2022-03-18 13:57:36 +09:00
Bartłomiej Dach
b21fa78cbf
Move dependencies out of fields to BDL args where possible 2022-03-16 21:55:36 +01:00
Dean Herbert
603527d72d Fix potential crash when highlighting chat messages
Test failed locally in `TestPublicChannelMention`. This test seems to
specify that the same message may arrive twice with the same ID, so
rather than overthinking this one I propose we just use `FirstOrDefault`.

```csharp
TearDown : System.AggregateException : One or more errors occurred.
(Sequence contains more than one matching element)
  ----> System.InvalidOperationException : Sequence contains more than
one matching element
--TearDown
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken)
   at osu.Framework.Extensions.TaskExtensions.WaitSafely(Task task)
   at osu.Framework.Testing.TestScene.checkForErrors()
--InvalidOperationException
   at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source,
Func`2 predicate, Boolean& found)
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1
source, Func`2 predicate)
   at
osu.Game.Overlays.Chat.DrawableChannel.<processMessageHighlighting>b__14_0()
in
/Users/dean/Projects/osu/osu.Game/Overlays/Chat/DrawableChannel.cs:line
102
   at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
```
2022-03-16 18:38:06 +09:00
Jai Sharma
e38d9eafa0 Use BindTarget instead of caching for ControlItem unread flow 2022-03-15 22:37:15 +00:00
Jai Sharma
49b74d7867 Use BindTarget instead of caching for ControlItem mentions bindable flow 2022-03-15 22:33:36 +00:00
Jai Sharma
481b8fe80b Use Orange1 for ControlItemMention background colour 2022-03-15 22:22:32 +00:00
Jai Sharma
7621e779fa Move ControlItem Action assignments into BDL 2022-03-15 22:19:58 +00:00
Jai Sharma
73a0373b4e Code quality fixes 2022-03-14 21:56:56 +00:00
Jai Sharma
ec61b88ec2 Adjust ControlItem padding 2022-03-14 21:39:57 +00:00
Jai Sharma
75958bf270 Refactor ControlItemText to use bindable flow for unread state 2022-03-14 21:32:30 +00:00
Jai Sharma
b01a809d55 Refactor ControlItemMention to use bindable flow 2022-03-14 21:26:33 +00:00
Jai Sharma
1f0f6990f0 Use ColourProvider.Content1 for ControlItemText colour 2022-03-14 21:16:28 +00:00
Jai Sharma
3aa343b987 Use OsuColour.YellowLight for ControlItemMention background 2022-03-14 21:14:33 +00:00
Jai Sharma
9621ef9437 Use OsuColour.Red1 for ControlItemClose hover colour 2022-03-14 21:10:39 +00:00
Jai Sharma
e91af664ef Adjust ControlItemAvatar placeholder animation and colour 2022-03-14 20:37:54 +00:00
Jai Sharma
12472593cc Mark required dependencies as non-nullable 2022-03-14 20:14:04 +00:00
Jai Sharma
c0d82dfb41 Code quality fixes 2022-03-14 19:42:55 +00:00
Jai Sharma
39c30516d0 Implement ChannelControlItem for new chat design
Adds new component `ChannelControlItem` and it's child components to be
used as the clickable control in the new chat sidebar for joined
channels.

Has public properties `HasUnread` and `MentionCount` to control the
display of the channel having unread messages or mentions of the user.

Channel select/join requests are exposed via `OnRequestSelect` and
`OnRequestLeave` events respectively which should be handled by a parent
component.

Requires a cached `Bindable<Channel>` instance to be managed by a parent
component.

Requires a cached `OveralayColourScheme` instance to be provided by a
parent component.
2022-03-14 18:55:27 +00:00
Salman Ahmed
53c57661c7 Move implementtaion detail to inline comment 2022-03-11 18:34:22 +03:00
Salman Ahmed
5b70139b33 Avoid running message highlight processing more than once 2022-03-11 18:32:49 +03:00
Salman Ahmed
cc87563d57
Merge branch 'master' into chat-mention-highlight 2022-03-11 17:51:22 +03:00
Salman Ahmed
d07e3101ea Improve message highlight handling in DrawableChannel 2022-03-10 23:07:15 +03:00
Dean Herbert
46f2db1712 Move ChannelListingItem spacing into item so input is always handled by an item in the list
Without this change, there would be a couple of pixels between each list
item where nothing would be hovered. This is a pretty annoying UX which
we should be avoiding we possible.
2022-03-10 15:58:57 +09:00
Dean Herbert
1a187d4dec Add animation to checkbox when joning/leaving a channel 2022-03-10 15:54:42 +09:00
Salman Ahmed
b25c37ce62 Instantiate highlight background container on animation
Also removes the necessity of scheduling as it actually never worked as
intended, `Scheduler` will still update even when the chat line is
masked away, and the animation will never be held anyways.

The new duration of the animation should be enough for long scrolls
either way.
2022-03-10 03:49:42 +03:00
Salman Ahmed
cf9671cafb Increase highlight delay to 1500ms 2022-03-10 02:50:15 +03:00
Salman Ahmed
80c0df6af5 Scroll chat line to channel center
We may eventually want that encapsulated within `ScrollIntoView`, as it
would also come in handy for `GameplayLeaderboard`.
2022-03-10 02:50:15 +03:00
Salman Ahmed
93cf93943f Schedule chat line highlight after children to handle non-loaded lines 2022-03-10 02:48:33 +03:00
Salman Ahmed
2d8983383a Revert newMessagesArrived changes and always schedule highlight
In the case a message arrives and the chat overlay is hidden, clicking
on the mention notification will not work as the `HighlightedMessage`
bindable callback will execute before the scheduled `newMessagesArrived`
logic (which was hanging since the message arrived until the chat
overlay became open because of the notification).

Simplify things by always scheduling the `HighlightedMessage` bindable
callback.
2022-03-10 01:11:27 +03:00
Jai Sharma
b67f9269f9 Remove NewChat namespace 2022-03-09 18:13:56 +00:00
Salman Ahmed
5e0882df8d Simplify message highlighting transforms 2022-03-08 04:00:11 +03:00
Salman Ahmed
d74064b94b Use Equals instead of reference equality operator 2022-03-08 03:56:27 +03:00
Salman Ahmed
7f47be4680 Refactor message highlighting logic to rely on a Channel data bindable 2022-03-08 03:19:37 +03:00
Salman Ahmed
30b38345aa Add ability to highlight chat lines 2022-03-07 05:08:36 +03:00
Salman Ahmed
a13a087f5d Add xmldoc to trackNewContent to explain its purpose 2022-03-06 23:51:27 +03:00
Salman Ahmed
9ec0e74813 Move scrolling to UpdateAfterChildren to avoid scheduling
At least that's what I believe "let FillFlow update to new size" means.
2022-03-06 23:50:58 +03:00
Salman Ahmed
9bc1f3f014 Further refactor and simplify ChannelScrollContainer 2022-03-06 23:34:12 +03:00
Salman Ahmed
5b3ffb12b7 Refactor channel scrolling container to handle manual scrolls resiliently 2022-03-05 23:27:07 +03:00
Dean Herbert
6b6dd93e9e Fix LinkFlowContainer not creating user links supporting full IUser specification 2021-11-08 14:17:47 +09:00
Dean Herbert
b9983add15 Rename User to APIUser and move to correct namespace 2021-11-04 18:21:31 +09:00
Dean Herbert
36352d1de4 Improve highlighted chat username shadow effect 2021-08-21 14:34:35 +09:00
Dean Herbert
9b9dacf3fe Update usages of Drawable.Click() 2021-08-04 17:30:33 +09:00
Jamie Taylor
9b7bb37244
Add hover+select sounds to some components that are missing them 2021-07-30 21:35:28 +09:00
Nathan Alo
812624a502 use .Equals() instead 2021-06-24 10:45:20 +08:00
Nathan Alo
564c72bf74 compare directly instead of comparing IDs 2021-06-24 10:10:57 +08:00
Nathan Alo
73590bfca1 Return an empty array when the sender is from system. 2021-06-24 07:20:31 +08:00
Dean Herbert
d9cc1c227b Allow UpdateableAvatar to handle displaying username as tooltip 2021-06-17 16:31:12 +09:00
Craftplacer
b97f31f314
Revert deletion of xmldoc summary line 2021-06-05 19:03:11 +02:00
Craftplacer
39c3b08fc7
Merge remote-tracking branch 'upstream/master' into chat-mention 2021-06-05 11:18:06 +02:00
Dean Herbert
a91015302e Replace second usage of new function 2021-06-03 14:56:29 +09:00
Dean Herbert
aa23c4a4b9
Merge branch 'master' into keyboard_shortcuts 2021-05-27 16:30:34 +09:00
Dean Herbert
52ca2f4797 Merge branch 'master' into chat-mention 2021-05-26 16:00:26 +09:00
Dean Herbert
699a317b44 Fix chat scroll sticking visually when scrolling beyond bottom extent 2021-03-29 18:07:47 +09:00
Dean Herbert
4cdde42228 Remove unnecessary backing field 2021-02-25 14:08:01 +09:00
Dean Herbert
1fd76ea3fb Apply changes to UI components overriding functions with changing signatures 2021-02-22 19:01:42 +09:00
Dean Herbert
a76314a876 Use Update instead of UpdateAfterChildren (no need for the latter) 2021-02-02 15:57:17 +09:00
Dean Herbert
bb0753f68d Use a better method of cancelling user scroll 2021-02-02 15:44:03 +09:00
Dean Herbert
398ab9c2c2 Use UserTrackingScrollContainer instead 2021-02-02 15:29:38 +09:00
Salman Ahmed
5c28c030c8 Unconditionally set "autoscroll" state 2021-02-01 22:08:57 +03:00
Salman Ahmed
15fcabb128
Add documentation to auto-scroll leniency
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2021-02-01 22:04:44 +03:00
Salman Ahmed
49e62c3a4b
Apply documentation changes
Co-authored-by: Dean Herbert <pe@ppy.sh>
2021-02-01 11:02:08 +03:00
Salman Ahmed
e806e5bcd1 Improve robustness of chat auto-scrolling logic
Fix auto-scrolling state changing by old messages removal logic
2021-01-31 23:45:49 +03:00
Dean Herbert
fca6b15d2f Fix local echo messages remaining permanently dimmed when chatting via multiplayer 2021-01-22 16:05:45 +09:00
Bartłomiej Dach
0b42b4b955 Rename {Drawable -> Clickable}Avatar 2020-12-26 14:35:11 +01:00
Dean Herbert
d096f2f8f6 Fix potential cross-thread operation during chat channel load
The callbacks are scheduled to the API thread, but hooked up in BDL
load. This causes a potential case of cross-thread collection
enumeration.

I've tested and it seems like the schedule logic should be fine for
short term. Longer term, we probably want to re-think how this works so
background operations aren't performed on the `DrawableChannel` in the
first place (chat shouldn't have an overhead like this when not
visible).

Closes #11231.
2020-12-21 16:39:50 +09:00
Angela Zhang
4c1e75f101
Small whitespace fix 2020-12-12 18:02:08 -06:00
Jess Meng
3dd6589d6e Fixed style changes and cleaned up ctrl + t implementation 2020-12-12 15:53:08 -08:00
Joehu
2ad7e6ca88 Fix hovered channel tabs color when unselected 2020-09-17 19:10:58 -07:00
Dean Herbert
942276d88f Remove outdated SearchableList classes 2020-09-03 16:34:58 +09:00
smoogipoo
96724bde32 Fix chat name backgrounds not dimming 2020-07-16 15:05:01 +09:00
Dean Herbert
c79d8a4251 Update ChannelTabControl in line with TabControl changes 2020-06-16 00:18:09 +09:00
smoogipoo
f3b5149648 Move some suggestions to warnings, resolve issues 2020-06-03 16:48:44 +09:00
Dean Herbert
c73d45bc01 Reduce initial channel load overhead by only loading history on active channel 2020-04-29 15:23:28 +09:00
Dean Herbert
1b6342438f Hide scrollbars in tournament chat display 2020-03-23 12:05:16 +09:00
TheWildTree
acd280c855 Add System channel type and use it for the ChannelSelectorTab 2020-03-15 22:13:26 +01:00
TheWildTree
8991e88039 Fix active tab closing behaviour 2020-03-13 18:34:51 +01:00
TheWildTree
097bd37e37 Fix SelectorTab crashing tests after a reload
For some reason, the default channel type (Public) caused the channel manager to attempt to connect to an API, which was null at that time, after hot reloading the test environment (via dynamic compilation). Changing the channel type seems to fix that.
2020-03-13 18:34:51 +01:00
Dean Herbert
ed837d3115 Use framework extension method for FromHex 2020-03-11 10:18:41 +09:00
smoogipoo
2fb640f57f Change to until step + fix CI error 2020-01-30 15:00:39 +09:00
smoogipoo
ce36e5458f Fix possible crash with no channel topic 2020-01-30 14:35:03 +09:00
TheWildTree
d2a032ca8d Move reverse-order comparer to ChannelTabControl 2020-01-25 22:16:21 +01:00
smoogipoo
bfb056c612 Apply input method signature refactorings 2020-01-20 18:17:21 +09:00
Craftplacer
1681e16738 Rework ChannelTabControl's AddChannel method to not auto select and let ChatOverlay handle this 2020-01-19 18:20:42 +01:00
Craftplacer
5f96940b7d Remove unused injection 2020-01-19 17:56:01 +01:00