Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hyperlinks for chat #3252

Merged
merged 65 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
c91171e
Added new button to chat bubble + some layout fixes + show on hover
fcolarich Jan 8, 2025
eb2862c
Added paste logic and hasValue check for clipboard
fcolarich Jan 9, 2025
9350a01
Added logic to show paste popup anywhere from anywhere + paste logic
fcolarich Jan 9, 2025
8aaab43
Fixed some logic + prefabs
fcolarich Jan 9, 2025
5091f91
Fixed functionality + paste prefab tweaks
fcolarich Jan 9, 2025
37ccf08
missing changes
fcolarich Jan 9, 2025
8850857
Merge branch 'dev' into feat/chat/copy_paste
fcolarich Jan 9, 2025
dd8d55d
Post dev merge fix
fcolarich Jan 9, 2025
f25c065
Changes to Chat Entries to be properly reused prefabs
fcolarich Jan 12, 2025
6c81b1d
Fixed chat scale
fcolarich Jan 12, 2025
fa90435
Fixed paste popup canvas ref
fcolarich Jan 12, 2025
a99ccd6
Fixed some rect issues with own chats
fcolarich Jan 12, 2025
1bd97f3
Merge remote-tracking branch 'origin/feat/chat/chat_improvements_main…
fcolarich Jan 12, 2025
bc40c98
Fix after merge
fcolarich Jan 12, 2025
1f64eeb
Extracted design consts into SO for easier access
fcolarich Jan 13, 2025
4902fbd
Update ChatEntryConfigurationSO.cs
fcolarich Jan 13, 2025
fd96117
fixed chat scale
fcolarich Jan 13, 2025
9fa2549
Re-added missing paste popup position marker
fcolarich Jan 13, 2025
12a75f5
Added character limit check when pasting text
fcolarich Jan 13, 2025
0109626
Added context menu with copy option
fcolarich Jan 13, 2025
827557d
fixed closing task
fcolarich Jan 13, 2025
078b37d
Update ChatController.cs
fcolarich Jan 13, 2025
1520349
Fixed non masked frame on chats
fcolarich Jan 13, 2025
79d0b63
Fixes from CR
fcolarich Jan 14, 2025
99a4bc5
Added clipboard manager service class to handle clipboard operations …
fcolarich Jan 15, 2025
b6130ee
Added handling of hyperlink
fcolarich Jan 16, 2025
cc1bf8c
Merge remote-tracking branch 'origin/feat/chat/chat_improvements_main…
fcolarich Jan 16, 2025
a778294
Fixed assembly refs for hyperlink handler + added settings
fcolarich Jan 16, 2025
b99c303
Fixed some circular dependencies on assemblies used in the chat classes
fcolarich Jan 17, 2025
e9f58ca
Fixed reference to plugin using proper bus to send events
fcolarich Jan 21, 2025
5114f0c
Added logic to handle cursor changes + hyperlink styling
fcolarich Jan 21, 2025
0a8f795
Added logic for highlighting using styles
fcolarich Jan 21, 2025
56acf0c
Fixed highlight change from one link to another
fcolarich Jan 21, 2025
4cda200
Fixed hyperlink handler
fcolarich Jan 23, 2025
12b1709
Merge remote-tracking branch 'origin/feat/chat/chat_improvements_main…
fcolarich Jan 23, 2025
7849532
Applied new pattern for view element with dependencies
fcolarich Jan 23, 2025
5f860c0
fixed and removed redundancies
fcolarich Jan 23, 2025
8823db1
Changes to Input validation
fcolarich Jan 28, 2025
0515574
Fixed validator when doing backspaces
fcolarich Jan 28, 2025
339b4c1
Added remaining regex + fixes when deleting text
fcolarich Jan 28, 2025
f2bfeb2
Small tweaks + enabled nametags in chat bubbles
fcolarich Jan 28, 2025
7bc2652
Extracted chat input box functionality from chatview into its own gam…
fcolarich Jan 29, 2025
467c00e
Fixed missing ref
fcolarich Jan 29, 2025
d73a32d
Fixed other references
fcolarich Jan 29, 2025
beabc57
Improved logic on validated Input field
fcolarich Jan 29, 2025
5aeee7d
more tweaks to validated input field
fcolarich Jan 29, 2025
f588f2e
Improved efficiency of validator
fcolarich Jan 29, 2025
68efd96
Fixes to regex and validation on backspace
fcolarich Jan 29, 2025
9006cff
Fixed regex to handle better TAG placement when removing characters
fcolarich Jan 29, 2025
d029e1a
Fixed character counting
fcolarich Jan 29, 2025
8e4b839
Optimized hyperlink validation and stringbuilder uses + added scene p…
fcolarich Jan 29, 2025
f167196
Fixed ref for Change Realm Prompt
fcolarich Jan 29, 2025
38c4a04
Fixed Confirmation message for change realm prompt
fcolarich Jan 29, 2025
22ae39d
Tweaked some logic on hyperlink handler to improve efficiency + remov…
fcolarich Jan 29, 2025
6b60cca
Merge remote-tracking branch 'origin/feat/chat/chat_improvements_main…
fcolarich Jan 29, 2025
effd5ac
Fixed assembly ref dependency hell using chat command bus
fcolarich Jan 29, 2025
b802a6b
fixed chat prefab refs
fcolarich Jan 29, 2025
a2fa75b
Fixed dependencies for hyperlink handler
fcolarich Jan 30, 2025
edd1166
Fixed issue with repeated matches overwriting the results
fcolarich Jan 30, 2025
eb1473b
Removed unused code + added comments + small tweaks to names + fixed …
fcolarich Jan 30, 2025
0300629
Fixed input validation upon pasting and with commands
fcolarich Jan 31, 2025
d8d7d2b
Added better support for more website patterns
fcolarich Jan 31, 2025
3f2a306
Fixed realm change prompt text
fcolarich Jan 31, 2025
87dd500
tweak to file so it can be changed from editor
fcolarich Jan 31, 2025
ce64315
Applied comments from PR
fcolarich Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ MonoBehaviour:
<CloseButton>k__BackingField: {fileID: 6350800476113885467}
<ContinueButton>k__BackingField: {fileID: 4323582271544481263}
<CancelButton>k__BackingField: {fileID: 2493130869277956874}
<MessageText>k__BackingField: {fileID: 0}
<MessageText>k__BackingField: {fileID: 2120140030454988638}
<RealmText>k__BackingField: {fileID: 5324196972733275058}
--- !u!222 &799493355526906641
CanvasRenderer:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"GUID:ac3295688c7c22745a96e6ac34718181",
"GUID:8322ea9340a544c59ddc56d4793eac74",
"GUID:f51ebe6a0ceec4240a699833d6309b23",
"GUID:e0eedfa2deb9406daf86fd8368728e39",
"GUID:e49b0e838d4f4d6194cd8f9ed5309820"
"GUID:e0eedfa2deb9406daf86fd8368728e39"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ protected override UniTask WaitForCloseIntentAsync(CancellationToken ct)
return UniTask.CompletedTask;

return UniTask.WhenAny(
viewInstance.CloseButton.OnClickAsync(ct),
viewInstance!.CloseButton.OnClickAsync(ct),
viewInstance.CancelButton.OnClickAsync(ct),
viewInstance.ContinueButton.OnClickAsync(ct));
}
Expand All @@ -61,7 +61,7 @@ private void RequestChangeRealm(string message, string realm, Action<ChangeRealm
resultCallback?.Invoke(ChangeRealmPromptResultType.Approved);
else
{
viewInstance.MessageText.text = message;
viewInstance!.MessageText.text = message;
viewInstance.RealmText.text = realm;
}
}
Expand Down
69 changes: 10 additions & 59 deletions Explorer/Assets/DCL/Chat/Assets/Chat.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e8facb6a795b74627b44b47cb560e799, type: 3}
m_Name:
m_EditorClassIdentifier:
inputField: {fileID: 5622104160664987093}
inputFieldRectTransform: {fileID: 1115583169272015923}
inputField: {fileID: 4092135091884069058}
inputFieldRectTransform: {fileID: 6520705227176678513}
contentRectTransform: {fileID: 8211434791048164212}
minimumHeight: 40
--- !u!1 &9152785347356188261
Expand Down Expand Up @@ -278,28 +278,12 @@ MonoBehaviour:
<canvas>k__BackingField: {fileID: 6099333271793956856}
<raycaster>k__BackingField: {fileID: 2110952359374055602}
BackgroundFadeTime: 0.2
MaxMessageLength: 250
chatBubblesToggle: {fileID: 4830781885806626314}
emojiPanel: {fileID: 8642591472055175998}
emojiSuggestionPanel: {fileID: 5472059768468074674}
inputField: {fileID: 5622104160664987093}
characterCounter: {fileID: 5274648269416443391}
chatInputBox: {fileID: 5059819421467020040}
panelBackgroundCanvasGroup: {fileID: 4742269820946521976}
emojiPanelButton: {fileID: 5796404896790943328}
closeChatButton: {fileID: 1104092725699042680}
pastePopupPosition: {fileID: 8997778028803641515}
chatMessageViewer: {fileID: 682925133115260549}
emojiPanelConfiguration: {fileID: 11400000, guid: 51646f2adc3264ba7bf9b4f90febbd22, type: 2}
emojiMappingJson: {fileID: 4900000, guid: 7355ae17e96e64b9592813524510dc45, type: 3}
emojiSectionViewPrefab: {fileID: 7843218067654608663, guid: d4552d3a2432742f58c63ba71bdfb50e, type: 3}
emojiButtonPrefab: {fileID: 8273076807335735701, guid: 7d0a647adf3334ee1a142e7bf69f128d, type: 3}
emojiSuggestionViewPrefab: {fileID: -5260165294436727257, guid: 5bc332aa8fd2147cab980e20e64bec03, type: 3}
addEmojiAudio: {fileID: 11400000, guid: ab59a5b2a814f02419850961fc490805, type: 2}
openEmojiPanelAudio: {fileID: 11400000, guid: abc438e2962540549b414d54fbc89eed, type: 2}
chatSendMessageAudio: {fileID: 11400000, guid: efe341aa011f4c8428d3246fa65ef5b0, type: 2}
chatReceiveMessageAudio: {fileID: 11400000, guid: 1c179628ffe816f4c9be1ba12630f97f, type: 2}
chatInputTextAudio: {fileID: 11400000, guid: d6b0660efe9c3954c937d083f8aa9c98, type: 2}
enterInputAudio: {fileID: 11400000, guid: 8703731941d082441b7bc7c6e9720b34, type: 2}
--- !u!1001 &1890474067062928347
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -402,31 +386,9 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 1533203949891575784, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_PrefabInstance: {fileID: 1890474067062928347}
m_PrefabAsset: {fileID: 0}
--- !u!114 &5274648269416443391 stripped
--- !u!114 &4092135091884069058 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5985002989317627428, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_PrefabInstance: {fileID: 1890474067062928347}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d52b8ae7e003f4dac8bc233a9bec4eff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &5472059768468074674 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5894360322644460393, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_PrefabInstance: {fileID: 1890474067062928347}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ede92f1128314ccab26c2f0389e572f4, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &5622104160664987093 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6069139085487838734, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_CorrespondingSourceObject: {fileID: 2519340724717527833, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_PrefabInstance: {fileID: 1890474067062928347}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
Expand All @@ -435,31 +397,20 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &5796404896790943328 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5353838427765777851, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_PrefabInstance: {fileID: 1890474067062928347}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8fef2260eb7f54392b8c68f9874d1d28, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &8642591472055175998 stripped
--- !u!114 &5059819421467020040 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7911970236011968741, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_CorrespondingSourceObject: {fileID: 6630502416812194003, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_PrefabInstance: {fileID: 1890474067062928347}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2ebd3771315604fc09ca02ca37850846, type: 3}
m_Script: {fileID: 11500000, guid: 18b5dde3d1a0473dbcf0d7305ac86c38, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!224 &8997778028803641515 stripped
--- !u!224 &6520705227176678513 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 7413724693438948208, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_CorrespondingSourceObject: {fileID: 4630372213285562282, guid: 754fd4e2bb7828240808af9ce37feb93, type: 3}
m_PrefabInstance: {fileID: 1890474067062928347}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1949774983281342339
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,14 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 6709421707846502462}
m_Modifications:
- target: {fileID: 2681651048344826938, guid: 66cddfcb263aafe499942012249d5b00, type: 3}
propertyPath: m_isRichText
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4356320699868230769, guid: 66cddfcb263aafe499942012249d5b00, type: 3}
propertyPath: styleSheet
value:
objectReference: {fileID: 11400000, guid: 3675d28be476ed544a0b350da26e2d70, type: 2}
- target: {fileID: 5238833002639546345, guid: 66cddfcb263aafe499942012249d5b00, type: 3}
propertyPath: m_Name
value: MessageContentElement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 5118336956721699336}
- component: {fileID: 2681651048344826938}
- component: {fileID: 7487901908219479282}
- component: {fileID: 4356320699868230769}
m_Layer: 5
m_Name: ChatEntryMessageContentElement
m_TagString: Untagged
Expand Down Expand Up @@ -167,3 +168,18 @@ MonoBehaviour:
<messageContentRectTransform>k__BackingField: {fileID: 8258041763941702871}
<messageContentSizeFitter>k__BackingField: {fileID: 5118336956721699336}
<messageContentText>k__BackingField: {fileID: 2681651048344826938}
<hyperlinkHandler>k__BackingField: {fileID: 4356320699868230769}
--- !u!114 &4356320699868230769
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5238833002639546345}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 71db578cd89a48d0903a2e608024fcd5, type: 3}
m_Name:
m_EditorClassIdentifier:
textComponent: {fileID: 2681651048344826938}
styleSheet: {fileID: 11400000, guid: 3675d28be476ed544a0b350da26e2d70, type: 2}
Loading