Skip to content

Commit

Permalink
Release 0.63.2-0.7.1 (RocketChat#320)
Browse files Browse the repository at this point in the history
* Implement a local password policy

* Fix Smarti integration tests

* Correct merge-error from https://github.com/RocketChat/Rocket.Chat/pull/9367/files

* Add setting to configure i18n for Smarti widget (RocketChat#308)

* Add setting to configure i18n for Smarti widget

* add exhausting description for the translation object

* Propagate topic value of the expertise (RocketChat#317)

* Help Request creation using word cloud (RocketChat#169)

* enable drop down and fix ac after selection from word cloud
* restrict and sort drop down values to 10
* added icon for wc and moved db call to server methods
* Delay the expertise drop down a bit

* Add some translations

* bump version
  • Loading branch information
mrsimpson authored and ruKurz committed Apr 19, 2018
1 parent bde4944 commit 22f2fe6
Show file tree
Hide file tree
Showing 40 changed files with 772 additions and 147 deletions.
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,4 @@ assistify:defaults
chatpal:search
rocketchat:version-check
meteorhacks:aggregate
overture8:wordcloud2
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ observe-sequence@1.0.16
ordered-dict@1.1.0
ostrio:cookies@2.2.4
pauli:accounts-linkedin@2.1.5
overture8:wordcloud2@1.0.0
pauli:linkedin-oauth@1.2.0
percolate:synced-cron@1.3.2
promise@0.10.2
Expand Down
12 changes: 10 additions & 2 deletions packages/assistify-ai/client/views/app/tabbar/smarti.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ Template.AssistifySmarti.onRendered(function() {
},
lang: localStorage.getItem('userLanguage').split('-')[0]
};

//propagate i18n - support formatted strings while doing that
const i18nSetting = RocketChat.settings.get('Assistify_AI_Smarti_Widget_i18n');
const i18n = i18nSetting.search('\n') > -1 ? JSON.parse(i18nSetting) : i18nSetting;
if (i18n) {
smartiOptions.i18n = i18n;
}

console.debug('Initializing Smarti with options: ', JSON.stringify(smartiOptions, null, 2));
instance.smarti = new window.SmartiWidget(instance.find('.smarti #widgetContainer'), smartiOptions);
}
Expand All @@ -74,14 +82,14 @@ Template.AssistifySmarti.onRendered(function() {
Template.AssistifySmarti.helpers({
isLivechat() {
const instance = Template.instance();
return ChatSubscription.findOne({rid: instance.data.rid}).t === 'l';
return ChatSubscription.findOne({ rid: instance.data.rid }).t === 'l';
},
/**
This helper is needed in order to create an object which matches the actions bar importing parameters
*/
liveChatActions() {
const instance = Template.instance();
return {roomId: instance.data.rid};
return { roomId: instance.data.rid };
},
helpRequestByRoom() {
const instance = Template.instance();
Expand Down
7 changes: 7 additions & 0 deletions packages/assistify-ai/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ Meteor.startup(() => {
public: true,
i18nLabel: 'Assistify_AI_RocketChat_Webhook_Token'
});

this.add('Assistify_AI_Smarti_Widget_i18n', '', {
type: 'code',
public: true,
i18nLabel: 'Assistify_AI_Smarti_Widget_i18n',
i18nDescription: 'Assistify_AI_Smarti_Widget_i18n_Description'
});
});
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,16 @@
color: var(--input-placeholder-color);
}
}

.rc-input {
&__icon {
&--right {
right: 1rem;
left: auto;
}
}
}
.rc-input__icon-svg--book-alt {
cursor: pointer;
}
}
19 changes: 15 additions & 4 deletions packages/assistify-help-request/client/public/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,76 +1,84 @@
<template name="AssistifyCreateRequest">
<header class="create-channel__header">
<h1 class="create-channel__title">{{_ "Requests"}}</h1>
<p class="create-channel__description">{{_ "Request_description"}}</p>
</header>
<form class="create-channel__content">
<div class="create-channel__inputs">
<div class="rc-input {{#if expertiseError}} rc-input--error {{/if}}">
<label class="rc-input__label">
<div class="rc-input__title">{{_ "Expertise"}}</div>
<div class="rc-input__wrapper">
<div class="rc-input__icon">
<svg class="rc-icon rc-input__icon-svg rc-input__icon-svg--lock" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-lock"></use>
</svg>
{{#unless topicSearchEnable}}
<header class="create-channel__header">
<h1 class="create-channel__title">{{_ "Requests"}}</h1>
<p class="create-channel__description">{{_ "Request_description"}}</p>
</header>
<form class="create-channel__content">
<div class="create-channel__inputs">
<div class="rc-input {{#if expertiseError}} rc-input--error {{/if}}">
<label class="rc-input__label">
<div class="rc-input__title">{{_ "Expertise"}}</div>
<div class="rc-input__wrapper">
<div class="rc-input__icon">
<svg class="rc-icon rc-input__icon-svg rc-input__icon-svg--lock" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-lock"></use>
</svg>
</div>
<input name="expertise" type="text" class="rc-input__element"
id="expertise-search"
placeholder={{_ "New_request_for_expertise"}} autocomplete=off value={{expertise}}>
<div class="rc-input__icon rc-input__icon--right">
<svg class="rc-icon rc-input__icon-svg rc-input__icon-svg--book-alt" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-book-alt"></use>
</svg>
</div>
</div>
<input name="expertise" id="expertise-search" type="text" class="rc-input__element" placeholder={{_ "New_request_for_expertise"}} autocomplete=off value={{expertise}}>
</div>
{{#unless autocomplete 'isShowing'}}
{{#if expertise}}
{{#if expertiseError}}
{{> AssistifyCreateInputError text=expertiseError}}
{{/if}}
{{/if}}
{{/unless}}
{{#with config}}
{{#if autocomplete 'isShowing'}}
<div class="fadeInDown">
{{#if autocomplete 'isLoaded'}}
{{> popupList data=config items=items}}
{{#unless autocomplete 'isShowing'}}
{{#if expertise}}
{{#if expertiseError}}
{{> AssistifyCreateInputError text=expertiseError}}
{{/if}}
{{/if}}
{{/unless}}
{{#with config}}
{{#if autocomplete 'isShowing'}}
<div class="fadeInDown">
{{#if autocomplete 'isLoaded'}}
{{> popupList data=config items=items}}
{{/if}}
</div>
{{/if}}
{{/with}}
</label>
</div>
<div class="rc-input {{#if titleError}}rc-input--error{{/if}}">
<label class="rc-input__label">
<div class="rc-input__title">{{_ "Title"}}</div>
<div class="rc-input__wrapper">
<div class="rc-input__icon">
<svg class="rc-icon rc-input__icon-svg rc-input__icon-svg--flag" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-flag"></use>
</svg>
</div>
{{/if}}
{{/with}}
</label>
</div>
<div class="rc-input {{#if titleError}}rc-input--error{{/if}}">
<label class="rc-input__label">
<div class="rc-input__title">{{_ "Title"}}</div>
<div class="rc-input__wrapper">
<div class="rc-input__icon">
<svg class="rc-icon rc-input__icon-svg rc-input__icon-svg--flag" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-flag"></use>
</svg>
<input name="request_title" type="text" class="rc-input__element" id="request_title"
placeholder={{_ "New_request_title"}} autocomplete="off">
</div>
<input name="request_title" id="request_title" type="text" class="rc-input__element" placeholder={{_ "New_request_title"}} autocomplete="off">
</div>
</label>
{{#if titleError}}
{{> AssistifyCreateInputError text=titleError}}
{{/if}}
</div>
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__title">{{_ "Your_question"}}</div>
<div class="rc-input__wrapper">
<div class="rc-input__icon">
{{> icon block="rc-input__icon-svg" icon="send"}}
</label>
{{#if titleError}}
{{> AssistifyCreateInputError text=titleError}}
{{/if}}
</div>
<div class="rc-input">
<label class="rc-input__label">
<div class="rc-input__title">{{_ "Your_question"}}</div>
<div class="rc-input__wrapper">
<div class="rc-input__icon">
{{> icon block="rc-input__icon-svg" icon="send"}}
</div>
<textarea name="first_question" id="first_question" class="rc-input__textarea"
placeholder="{{_ 'New_request_first_question'}}"
maxlength="{{maxMessageLength}}"></textarea>
</div>
<textarea name="first_question" id="first_question" class="rc-input__textarea" placeholder="{{_ 'New_request_first_question'}}" maxlength="{{maxMessageLength}}"></textarea>
</div>
</label>
</label>
</div>
<div class="rc-input">
<input class="rc-button rc-button--primary js-save-request" type="submit" data-button="create"
value="{{_ "Create"}}" {{createIsDisabled}}>
</div>
</div>
<div class="rc-input">
<input class="rc-button rc-button--primary js-save-request" type="submit" data-button="create"
value="{{_ "Create"}}" {{createIsDisabled}}>
</div>
</div>
</form>
</template>

<template name="AssistifyCreateRequestAutocomplete">
<li class="rc-popup-list__item">
<span class="rc-popup-list__item-name">{{{modifier item.name}}}</span>
</li>
</form>
{{else}}
{{> AssistifyWordCloud properties=getWordcloudProperties}}
{{/unless}}
</template>
Loading

0 comments on commit 22f2fe6

Please sign in to comment.