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

Remove threads buttons #478

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 25 additions & 25 deletions .github/ISSUE_TEMPLATE/bug-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ name: Bug report for Tchap Web (in browser)
description: File a bug report if you are using Element in a web browser like Firefox, Chrome, Edge, and so on.
labels: [web, v4, bug]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!

Please report security issues by email to security@matrix.org
- type: textarea
id: reproduction-steps
attributes:
label: Steps to reproduce
description: Please attach screenshots, videos or logs if you can.
placeholder: Tell us what you see!
value: |
1. Where are you starting? What can you see?
2. What do you click?
3. More steps…
validations:
required: true
- type: textarea
id: result
attributes:
label: Outcome
placeholder: Tell us what went wrong
value: |
#### What did you expect?
Please report security issues by email to security@matrix.org
- type: textarea
id: reproduction-steps
attributes:
label: Steps to reproduce
description: Please attach screenshots, videos or logs if you can.
placeholder: Tell us what you see!
value: |
1. Where are you starting? What can you see?
2. What do you click?
3. More steps…
validations:
required: true
- type: textarea
id: result
attributes:
label: Outcome
placeholder: Tell us what went wrong
value: |
#### What did you expect?

#### What happened instead?
#### What happened instead?
validations:
required: true
- type: input
Expand Down
36 changes: 18 additions & 18 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ body:
value: |
#### What would you like to do?

#### Why would you like to do it?
#### Why would you like to do it?

#### How would you like to achieve it?
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Have you considered any alternatives?
placeholder: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
placeholder: Is there anything else you'd like to add?
validations:
required: false
#### How would you like to achieve it?
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Have you considered any alternatives?
placeholder: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional context
placeholder: Is there anything else you'd like to add?
validations:
required: false
9 changes: 9 additions & 0 deletions patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,14 @@
"src/components/views/rooms/RoomList.tsx",
"src/stores/spaces/index.ts"
]
},
"remove-thread-buttons": {
"github-issue" : "https://github.com/tchapgouv/tchap-web-v4/issues/472; ",
"package": "matrix-react-sdk",
"files": [
"src/components/views/context_menus/MessageContextMenu.tsx",
"src/components/views/messages/MessageActionBar.tsx",
"src/components/views/right_panel/RoomHeaderButtons.tsx"
]
}
}
72 changes: 72 additions & 0 deletions patches/remove-thread-buttons/matrix-react-sdk+3.68.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
diff --git a/node_modules/matrix-react-sdk/src/components/views/context_menus/MessageContextMenu.tsx b/node_modules/matrix-react-sdk/src/components/views/context_menus/MessageContextMenu.tsx
index ad56409..f9591dc 100644
--- a/node_modules/matrix-react-sdk/src/components/views/context_menus/MessageContextMenu.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/context_menus/MessageContextMenu.tsx
@@ -678,7 +678,9 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
<IconizedContextMenuOptionList>
{reactButton}
{replyButton}
+ {/* :TCHAP: Remove Reply In Thread Button
{replyInThreadButton}
+ end :TCHAP: */}
{editButton}
</IconizedContextMenuOptionList>
);
diff --git a/node_modules/matrix-react-sdk/src/components/views/messages/MessageActionBar.tsx b/node_modules/matrix-react-sdk/src/components/views/messages/MessageActionBar.tsx
index 1a7d773..4e8f18f 100644
--- a/node_modules/matrix-react-sdk/src/components/views/messages/MessageActionBar.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/messages/MessageActionBar.tsx
@@ -367,18 +367,21 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
private readonly forbiddenThreadHeadMsgType = [MsgType.KeyVerificationRequest];

private get showReplyInThreadAction(): boolean {
- const inNotThreadTimeline = this.context.timelineRenderingType !== TimelineRenderingType.Thread;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aulamber c'est possible d'avoir une capture d'écran de ce changement ?

-
- const isAllowedMessageType =
- !this.forbiddenThreadHeadMsgType.includes(this.props.mxEvent.getContent().msgtype as MsgType) &&
- /** forbid threads from live location shares
- * until cross-platform support
- * (PSF-1041)
- */
- !M_BEACON_INFO.matches(this.props.mxEvent.getType()) &&
- !(this.props.mxEvent.getType() === VoiceBroadcastInfoEventType);
-
- return inNotThreadTimeline && isAllowedMessageType;
+ // :TCHAP: hide thread button
+ return false;
+ // const inNotThreadTimeline = this.context.timelineRenderingType !== TimelineRenderingType.Thread;
+
+ // const isAllowedMessageType =
+ // !this.forbiddenThreadHeadMsgType.includes(this.props.mxEvent.getContent().msgtype as MsgType) &&
+ // /** forbid threads from live location shares
+ // * until cross-platform support
+ // * (PSF-1041)
+ // */
+ // !M_BEACON_INFO.matches(this.props.mxEvent.getType()) &&
+ // !(this.props.mxEvent.getType() === VoiceBroadcastInfoEventType);
+
+ // return inNotThreadTimeline && isAllowedMessageType;
+ // end :TCHAP
}

/**
diff --git a/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomHeaderButtons.tsx b/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomHeaderButtons.tsx
index 4d7e873..1a6e2f6 100644
--- a/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomHeaderButtons.tsx
+++ b/node_modules/matrix-react-sdk/src/components/views/right_panel/RoomHeaderButtons.tsx
@@ -292,6 +292,7 @@ export default class RoomHeaderButtons extends HeaderButtons<IProps> {
onClick={this.onTimelineCardClicked}
/>,
);
+ /* :TCHAP: Remove Thread from Header Buttons
rightPanelPhaseButtons.set(
RightPanelPhases.ThreadPanel,
<HeaderButton
@@ -306,6 +307,7 @@ export default class RoomHeaderButtons extends HeaderButtons<IProps> {
<UnreadIndicator color={this.state.threadNotificationColor} />
</HeaderButton>,
);
+ end :TCHAP: */
rightPanelPhaseButtons.set(
RightPanelPhases.NotificationPanel,
<HeaderButton