diff --git a/config.dev.json b/config.dev.json index e37ffcf3bc..7cb7ca16ac 100644 --- a/config.dev.json +++ b/config.dev.json @@ -95,6 +95,7 @@ "agent2.tchap.incubateur.net", "externe.tchap.incubateur.net" ], - "feature_space": ["agent1.tchap.incubateur.net", "agent2.tchap.incubateur.net", "externe.tchap.incubateur.net"] + "feature_space": ["agent1.tchap.incubateur.net", "agent2.tchap.incubateur.net", "externe.tchap.incubateur.net"], + "feature_thread": ["agent1.tchap.incubateur.net", "agent2.tchap.incubateur.net", "externe.tchap.incubateur.net"] } } diff --git a/config.preprod.json b/config.preprod.json index 8eece04183..f321ac5116 100644 --- a/config.preprod.json +++ b/config.preprod.json @@ -85,6 +85,7 @@ "custom_translations_url": "/i18n/tchap_translations.json", "tchap_features": { "feature_email_notification": ["i.tchap.gouv.fr", "e.tchap.gouv.fr"], + "feature_thread": ["i.tchap.gouv.fr", "e.tchap.gouv.fr"], "feature_space": ["i.tchap.gouv.fr", "e.tchap.gouv.fr"] } } diff --git a/config.prod.lab.json b/config.prod.lab.json index 7a79a4a8ba..81b9c7f396 100644 --- a/config.prod.lab.json +++ b/config.prod.lab.json @@ -193,6 +193,7 @@ "custom_translations_url": "/i18n/tchap_translations.json", "tchap_features": { "feature_email_notification": [], + "feature_thread": ["agent.dinum.tchap.gouv.fr"], "feature_space": ["agent.dinum.tchap.gouv.fr"] } } diff --git a/patches/patches.json b/patches/patches.json index a5075b24f0..b8ea3e289b 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -173,7 +173,7 @@ "files": [ "src/components/views/context_menus/MessageContextMenu.tsx", "src/components/views/messages/MessageActionBar.tsx", - "src/components/views/right_panel/RoomHeaderButtons.tsx" + "src/components/views/right_panel/LegacyRoomHeaderButtons.tsx" ] }, "change-sections-order-in-security-privacy-settings": { diff --git a/patches/remove-thread-buttons/matrix-react-sdk+3.78.0.patch b/patches/remove-thread-buttons/matrix-react-sdk+3.78.0.patch index beb72cd34c..2bdb870c39 100644 --- a/patches/remove-thread-buttons/matrix-react-sdk+3.78.0.patch +++ b/patches/remove-thread-buttons/matrix-react-sdk+3.78.0.patch @@ -1,52 +1,90 @@ 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 ffe35fa..aff8c9b 100644 +index ffe35fa..02d0430 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 -@@ -698,7 +698,9 @@ export default class MessageContextMenu extends React.Component +@@ -61,6 +61,8 @@ import { getForwardableEvent } from "../../../events/forward/getForwardableEvent + import { getShareableLocationEvent } from "../../../events/location/getShareableLocationEvent"; + import { ShowThreadPayload } from "../../../dispatcher/payloads/ShowThreadPayload"; + import { CardContext } from "../right_panel/context"; ++//:tchap: add feature flags ++import TchapUIFeature from "../../../../../../src/tchap/util/TchapUIFeature"; + + interface IReplyInThreadButton { + mxEvent: MatrixEvent; +@@ -698,7 +700,10 @@ export default class MessageContextMenu extends React.Component {reactButton} {replyButton} -+ {/* :TCHAP: Remove Reply In Thread Button - {replyInThreadButton} -+ end :TCHAP: */} +- {replyInThreadButton} ++ {/* :TCHAP: activate Thread based on homeserver feature flag ++ {replyInThreadButton} */} ++ {TchapUIFeature.isFeatureActiveForHomeserver("feature_thread") ? replyInThreadButton : null} ++ {/*:TCHAP: end */} {editButton} ); 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 6b727c5..aa71892 100644 +index 6b727c5..e1ae7ec 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 -@@ -332,18 +332,21 @@ export default class MessageActionBar extends React.PureComponent { + onClick={this.onTimelineCardClicked} + />, + ); +- rightPanelPhaseButtons.set( +- RightPanelPhases.ThreadPanel, +- { + onClick={this.onThreadsPanelClicked} + isHighlighted={this.isPhase(LegacyRoomHeaderButtons.THREAD_PHASES)} + isUnread={this.state.threadNotificationColor > NotificationColor.None} +- > ++ > + + , + ); ++ } ++ //:tchap: end + rightPanelPhaseButtons.set( + RightPanelPhases.NotificationPanel, +