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

430 Commits

Author SHA1 Message Date
Dean Herbert
25ea660b0b Replace HandlePositionalInput override with simple hover effect 2022-05-05 19:13:48 +09:00
Dean Herbert
4efaa41670
Merge branch 'master' into new-chat-overlay 2022-05-05 18:57:00 +09:00
Dean Herbert
ddab3c6d80 Tidy up state variables 2022-05-04 21:00:11 +09:00
Jai Sharma
60999e83e0 Ensure ChatTextBox takes/leaves focus on chat overlay pop in/out 2022-05-03 22:33:36 +01:00
Jai Sharma
c17edb2848 Add padding to text in ChatTextBar to separate it from the textbox 2022-05-03 22:32:51 +01:00
Jai Sharma
50aee8b665 Ensure ChannelListSelector text also turns white when selected 2022-05-03 22:32:01 +01:00
Ganendra Afrasya
81be69e72e Update search textbox implementation to use BasicSearchTextBox instead 2022-05-03 06:18:42 +07:00
Jai Sharma
a931b1ecc3 Show selected channel text as white in ChannelListItem 2022-05-02 22:32:25 +01:00
Jai Sharma
7f8e00c1e3 Change "Add more channels" to sentence case in "ChannelList" 2022-05-02 21:22:47 +01:00
Jai Sharma
1473762e25 Don't wrap "chatting in.." text in ChatTextBar 2022-05-02 20:57:39 +01:00
Jai Sharma
e6f1ac6bec Ensure "chatting in..." text is aligned with chat message 2022-05-02 20:45:38 +01:00
Jai Sharma
de393f735f Implement basic layout and behaviour of new chat overlay
Provides initial implementation of new chat overlay in component
`ChatOverlayV2`. Contains only the basic functionality required for
a functioning chat overlay according to the new design with the intent
of added the rest of the functionality in subsequent PRs.

Backports existing tests for the current chat overlay except for ones
testing keyboard shortcuts (since they haven't been added) and tab
closing behaviour (since no tabs).
2022-04-30 23:59:47 +01:00
Jai Sharma
5319bce772 Revert DI usage of ChannelSelectorState in favour of directly binding BindableBool SelectorActive 2022-04-20 21:05:33 +01:00
Jai Sharma
e596c9d171 Use Bindable<ChannelSelectorState> to control selector active visibility 2022-04-20 19:12:43 +01:00
Jai Sharma
44c822f34d Use normal OsuScrollContainer for ChannelList 2022-04-19 16:56:55 +01:00
Jai Sharma
47c8b8010f Use semibold font weight for ChannelListItemFlow label 2022-04-16 23:03:03 +01:00
Jai Sharma
2f41cddb00 Remove redundant Expire call 2022-04-16 23:03:03 +01:00
Jai Sharma
36aea9009e Move ChannelList scrollbar to the right 2022-04-16 23:03:03 +01:00
Jai Sharma
4a0c5a0781 Remove hover override for ChannelListScrollContainer 2022-04-16 23:02:54 +01:00
Jai Sharma
b6631fb9f9 Add newline for base class call 2022-04-15 22:22:20 +01:00
Jai Sharma
a0a2f8118e Code quality fixes 2022-04-15 22:05:20 +01:00
Jai Sharma
f1dd319fd9 Implement ChannelList for new chat design
Reference design: https://www.figma.com/file/f8b2dHp9LJCMOqYP4mdrPZ/Client%2FChat?node-id=1%3A297

Adds new component `ChannelList` which makes up the sidebar channel
selector of the new chat design. Contains two separate fill flows for
public and private `ChannelItem` child components.

Exposed bindable `SelectorActive` to indicate current state of the "Add
more channels" button. Requires `Bindable<Channel>` from parent
component.

Renames and updates the `TestSceneChannelListItem` to
`TestSceneChannelList` to make use of new component and having both
tests seemed redundant.
2022-04-15 15:44:38 +01:00
Bartłomiej Dach
970b1951ac
Rewrite logic slightly to better convey meaning of textbox clear 2022-04-03 14:26:08 +02:00
Jai Sharma
94fa5e2ef2 Use Action<string> for event OnChatMessageCommitted & clear textbox internally 2022-04-02 21:58:54 +01:00
Jai Sharma
9e152cd3fd Fix code quality issues 2022-04-02 17:27:44 +01:00
Jai Sharma
2297073b7e Use OnChatMessageCommit & OnSearchTermsChanged events in ChatTextBar 2022-04-02 17:15:19 +01:00
Jai Sharma
b9421d1415 Simplify text clear and placeholder change in ChatTextBox 2022-04-02 17:14:27 +01:00
Jai Sharma
fff30e8a6e Simplify show/hide of text and search in ChatTextBar 2022-03-30 21:02:12 +01:00
Jai Sharma
eec3fef7a6 Remove the enter box in ChatTextBar 2022-03-30 20:25:23 +01:00
Jai Sharma
e7d2d94eee Fix code quality issues in ChatTextBar 2022-03-30 02:16:50 +01:00
Jai Sharma
f049d7cb67 Implement ChatTextBox for new chat design
Reference design: https://www.figma.com/file/f8b2dHp9LJCMOqYP4mdrPZ/Client%2FChat?node-id=1%3A297

Adds new component `ChatTextBox`.
Exposes `BindableBool` `ShowSearch` to change text input behaviour
between normal and search behaviour.

Adds new component `ChatTextBar`.
Exposes `BindableBool` `ShowSearch` which toggles between showing current
chat channel or search icon.
Additionally binds to child `ChatTextBox` components.
Requires a cached `Bindable<Channel>` instance to be managed by a parent
component.
2022-03-29 22:33:38 +01:00
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