mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 10:11:03 +01:00 
			
		
		
		
	Merge pull request #3519 from matrix-org/travis/enable-cider
Enable CIDER composer by default
This commit is contained in:
		
						commit
						fba646d2c5
					
				@ -166,6 +166,8 @@ module.exports = createReactClass({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            canReact: false,
 | 
					            canReact: false,
 | 
				
			||||||
            canReply: false,
 | 
					            canReply: false,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            useCider: false,
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -201,6 +203,14 @@ module.exports = createReactClass({
 | 
				
			|||||||
        this._onRoomViewStoreUpdate(true);
 | 
					        this._onRoomViewStoreUpdate(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        WidgetEchoStore.on('update', this._onWidgetEchoStoreUpdate);
 | 
					        WidgetEchoStore.on('update', this._onWidgetEchoStoreUpdate);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this._onCiderUpdated();
 | 
				
			||||||
 | 
					        this._ciderWatcherRef = SettingsStore.watchSetting(
 | 
				
			||||||
 | 
					            "useCiderComposer", null, this._onCiderUpdated);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    _onCiderUpdated: function() {
 | 
				
			||||||
 | 
					        this.setState({useCider: SettingsStore.getValue("useCiderComposer")});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    _onRoomViewStoreUpdate: function(initial) {
 | 
					    _onRoomViewStoreUpdate: function(initial) {
 | 
				
			||||||
@ -479,6 +489,8 @@ module.exports = createReactClass({
 | 
				
			|||||||
        // (We could use isMounted, but facebook have deprecated that.)
 | 
					        // (We could use isMounted, but facebook have deprecated that.)
 | 
				
			||||||
        this.unmounted = true;
 | 
					        this.unmounted = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        SettingsStore.unwatchSetting(this._ciderWatcherRef);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // update the scroll map before we get unmounted
 | 
					        // update the scroll map before we get unmounted
 | 
				
			||||||
        if (this.state.roomId) {
 | 
					        if (this.state.roomId) {
 | 
				
			||||||
            RoomScrollStateStore.setScrollState(this.state.roomId, this._getScrollState());
 | 
					            RoomScrollStateStore.setScrollState(this.state.roomId, this._getScrollState());
 | 
				
			||||||
@ -1793,7 +1805,7 @@ module.exports = createReactClass({
 | 
				
			|||||||
            myMembership === 'join' && !this.state.searchResults
 | 
					            myMembership === 'join' && !this.state.searchResults
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        if (canSpeak) {
 | 
					        if (canSpeak) {
 | 
				
			||||||
            if (SettingsStore.isFeatureEnabled("feature_cider_composer")) {
 | 
					            if (this.state.useCider) {
 | 
				
			||||||
                const MessageComposer = sdk.getComponent('rooms.MessageComposer');
 | 
					                const MessageComposer = sdk.getComponent('rooms.MessageComposer');
 | 
				
			||||||
                messageComposer =
 | 
					                messageComposer =
 | 
				
			||||||
                    <MessageComposer
 | 
					                    <MessageComposer
 | 
				
			||||||
 | 
				
			|||||||
@ -26,6 +26,7 @@ import PlatformPeg from "../../../../../PlatformPeg";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export default class PreferencesUserSettingsTab extends React.Component {
 | 
					export default class PreferencesUserSettingsTab extends React.Component {
 | 
				
			||||||
    static COMPOSER_SETTINGS = [
 | 
					    static COMPOSER_SETTINGS = [
 | 
				
			||||||
 | 
					        'useCiderComposer',
 | 
				
			||||||
        'MessageComposerInput.autoReplaceEmoji',
 | 
					        'MessageComposerInput.autoReplaceEmoji',
 | 
				
			||||||
        'MessageComposerInput.suggestEmoji',
 | 
					        'MessageComposerInput.suggestEmoji',
 | 
				
			||||||
        'sendTypingNotifications',
 | 
					        'sendTypingNotifications',
 | 
				
			||||||
 | 
				
			|||||||
@ -331,8 +331,8 @@
 | 
				
			|||||||
    "Custom user status messages": "Custom user status messages",
 | 
					    "Custom user status messages": "Custom user status messages",
 | 
				
			||||||
    "Group & filter rooms by custom tags (refresh to apply changes)": "Group & filter rooms by custom tags (refresh to apply changes)",
 | 
					    "Group & filter rooms by custom tags (refresh to apply changes)": "Group & filter rooms by custom tags (refresh to apply changes)",
 | 
				
			||||||
    "Render simple counters in room header": "Render simple counters in room header",
 | 
					    "Render simple counters in room header": "Render simple counters in room header",
 | 
				
			||||||
    "Use the new, faster, but still experimental composer for writing messages (requires refresh)": "Use the new, faster, but still experimental composer for writing messages (requires refresh)",
 | 
					 | 
				
			||||||
    "Multiple integration managers": "Multiple integration managers",
 | 
					    "Multiple integration managers": "Multiple integration managers",
 | 
				
			||||||
 | 
					    "Use the new, faster, composer for writing messages": "Use the new, faster, composer for writing messages",
 | 
				
			||||||
    "Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
 | 
					    "Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
 | 
				
			||||||
    "Use compact timeline layout": "Use compact timeline layout",
 | 
					    "Use compact timeline layout": "Use compact timeline layout",
 | 
				
			||||||
    "Show a placeholder for removed messages": "Show a placeholder for removed messages",
 | 
					    "Show a placeholder for removed messages": "Show a placeholder for removed messages",
 | 
				
			||||||
 | 
				
			|||||||
@ -114,19 +114,17 @@ export const SETTINGS = {
 | 
				
			|||||||
        supportedLevels: LEVELS_FEATURE,
 | 
					        supportedLevels: LEVELS_FEATURE,
 | 
				
			||||||
        default: false,
 | 
					        default: false,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "feature_cider_composer": {
 | 
					 | 
				
			||||||
        isFeature: true,
 | 
					 | 
				
			||||||
        displayName: _td("Use the new, faster, but still experimental composer " +
 | 
					 | 
				
			||||||
            "for writing messages (requires refresh)"),
 | 
					 | 
				
			||||||
        supportedLevels: LEVELS_FEATURE,
 | 
					 | 
				
			||||||
        default: false,
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    "feature_many_integration_managers": {
 | 
					    "feature_many_integration_managers": {
 | 
				
			||||||
        isFeature: true,
 | 
					        isFeature: true,
 | 
				
			||||||
        displayName: _td("Multiple integration managers"),
 | 
					        displayName: _td("Multiple integration managers"),
 | 
				
			||||||
        supportedLevels: LEVELS_FEATURE,
 | 
					        supportedLevels: LEVELS_FEATURE,
 | 
				
			||||||
        default: false,
 | 
					        default: false,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "useCiderComposer": {
 | 
				
			||||||
 | 
					        displayName: _td("Use the new, faster, composer for writing messages"),
 | 
				
			||||||
 | 
					        supportedLevels: LEVELS_ACCOUNT_SETTINGS,
 | 
				
			||||||
 | 
					        default: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    "MessageComposerInput.suggestEmoji": {
 | 
					    "MessageComposerInput.suggestEmoji": {
 | 
				
			||||||
        supportedLevels: LEVELS_ACCOUNT_SETTINGS,
 | 
					        supportedLevels: LEVELS_ACCOUNT_SETTINGS,
 | 
				
			||||||
        displayName: _td('Enable Emoji suggestions while typing'),
 | 
					        displayName: _td('Enable Emoji suggestions while typing'),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user