Skip to content

Commit

Permalink
Help Request creation using word cloud (RocketChat#169)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
vickyokrm authored and mrsimpson committed Apr 19, 2018
1 parent 10e6378 commit 8d973e3
Show file tree
Hide file tree
Showing 21 changed files with 460 additions and 97 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 @@ [email protected]
[email protected]
ostrio:[email protected]
pauli:[email protected]
overture8:[email protected]
pauli:[email protected]
percolate:[email protected]
[email protected]
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 8d973e3

Please sign in to comment.