Skip to content

Commit 53528fb

Browse files
authored
make headline message copyable (#29187)
* make headline message copyable * selectable in mobile info panel
1 parent 451eb4f commit 53528fb

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

shared/chat/conversation/messages/message-popup/text.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const PopText = (ownProps: OwnProps) => {
3333
switch (message.type) {
3434
case 'text':
3535
return message.text.stringValue()
36+
case 'setDescription':
37+
return message.newDescription.stringValue() || undefined
3638
case 'systemGitPush':
3739
switch (message.pushType) {
3840
case T.RPCGen.GitPushType.createrepo:

shared/common-adapters/markdown/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export type Props = {
7171
context?: string // metadata used for bookkeeping
7272
children?: string
7373
lineClamp?: LineClampType
74-
selectable?: boolean // desktop - applies to outer container only
74+
selectable?: boolean
7575
smallStandaloneEmoji?: boolean // don't increase font size for a standalone emoji
7676
paragraphTextClassName?: string
7777
preview?: boolean // if true render a simplified version
@@ -447,6 +447,7 @@ const SimpleMarkdownComponent = React.memo(function SimpleMarkdownComponent(p: M
447447
disallowAnimation,
448448
messageType,
449449
paragraphTextClassName,
450+
selectable,
450451
styleOverride,
451452
virtualText,
452453
}

shared/common-adapters/markdown/react.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ interface State {
2323
disallowAnimation?: boolean
2424
messageType?: T.Chat.MessageType
2525
paragraphTextClassName?: string
26+
selectable?: boolean
2627
styleOverride?: StyleOverride
2728
virtualText?: boolean
2829
key?: string | number | undefined
@@ -335,6 +336,7 @@ const reactComponentsForMarkdownType = {
335336
state.inBlockQuote && markdownStyles.quoteStyleText,
336337
])}
337338
allowFontScaling={state.allowFontScaling}
339+
selectable={state.selectable}
338340
>
339341
{output(node['content'], state)}
340342
</Text>

0 commit comments

Comments
 (0)