Minor UI improvements (#4959)
* PLT-5128 - Fixing channel header responsively * PLT-4984 - Fixing search popover behaviour
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
be5aa0398b
Коммит
3e7a59b7b9
@@ -193,6 +193,19 @@ export default class SearchBar extends React.Component {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const searchPopover = (
|
||||||
|
<Popover
|
||||||
|
id='searchbar-help-popup'
|
||||||
|
placement='bottom'
|
||||||
|
className={helpClass}
|
||||||
|
>
|
||||||
|
<FormattedHTMLMessage
|
||||||
|
id='search_bar.usage'
|
||||||
|
defaultMessage='<h4>Search Options</h4><ul><li><span>Use </span><b>"quotation marks"</b><span> to search for phrases</span></li><li><span>Use </span><b>from:</b><span> to find posts from specific users and </span><b>in:</b><span> to find posts in specific channels</span></li></ul>'
|
||||||
|
/>
|
||||||
|
</Popover>
|
||||||
|
);
|
||||||
|
|
||||||
const flaggedTooltip = (
|
const flaggedTooltip = (
|
||||||
<Tooltip id='flaggedTooltip'>
|
<Tooltip id='flaggedTooltip'>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
@@ -276,29 +289,28 @@ export default class SearchBar extends React.Component {
|
|||||||
autoComplete='off'
|
autoComplete='off'
|
||||||
>
|
>
|
||||||
<span className='fa fa-search sidebar__search-icon'/>
|
<span className='fa fa-search sidebar__search-icon'/>
|
||||||
<SuggestionBox
|
<OverlayTrigger
|
||||||
ref='search'
|
delayShow={Constants.OVERLAY_TIME_DELAY_SMALL}
|
||||||
className='form-control search-bar'
|
|
||||||
placeholder={Utils.localizeMessage('search_bar.search', 'Search')}
|
|
||||||
value={this.state.searchTerm}
|
|
||||||
onFocus={this.handleUserFocus}
|
|
||||||
onBlur={this.handleUserBlur}
|
|
||||||
onChange={this.handleChange}
|
|
||||||
listComponent={SearchSuggestionList}
|
|
||||||
providers={this.suggestionProviders}
|
|
||||||
type='search'
|
|
||||||
/>
|
|
||||||
{isSearching}
|
|
||||||
<Popover
|
|
||||||
id='searchbar-help-popup'
|
|
||||||
placement='bottom'
|
placement='bottom'
|
||||||
|
overlay={searchPopover}
|
||||||
|
trigger='focus'
|
||||||
|
rootClose={true}
|
||||||
className={helpClass}
|
className={helpClass}
|
||||||
>
|
>
|
||||||
<FormattedHTMLMessage
|
<SuggestionBox
|
||||||
id='search_bar.usage'
|
ref='search'
|
||||||
defaultMessage='<h4>Search Options</h4><ul><li><span>Use </span><b>"quotation marks"</b><span> to search for phrases</span></li><li><span>Use </span><b>from:</b><span> to find posts from specific users and </span><b>in:</b><span> to find posts in specific channels</span></li></ul>'
|
className='form-control search-bar'
|
||||||
|
placeholder={Utils.localizeMessage('search_bar.search', 'Search')}
|
||||||
|
value={this.state.searchTerm}
|
||||||
|
onFocus={this.handleUserFocus}
|
||||||
|
onBlur={this.handleUserBlur}
|
||||||
|
onChange={this.handleChange}
|
||||||
|
listComponent={SearchSuggestionList}
|
||||||
|
providers={this.suggestionProviders}
|
||||||
|
type='search'
|
||||||
/>
|
/>
|
||||||
</Popover>
|
</OverlayTrigger>
|
||||||
|
{isSearching}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{mentionBtn}
|
{mentionBtn}
|
||||||
|
|||||||
@@ -93,20 +93,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-help-popover {
|
.search-help-popover {
|
||||||
@include single-transition(opacity, .3s, ease-in);
|
|
||||||
font-size: em(13px);
|
font-size: em(13px);
|
||||||
max-width: 350px;
|
margin-top: 17px !important;
|
||||||
top: 36px;
|
max-width: 300px;
|
||||||
visibility: hidden;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
&.autocomplete {
|
&.autocomplete {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
.popover-content {
|
.popover-content {
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,11 +203,6 @@
|
|||||||
.tooltip-inner {
|
.tooltip-inner {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.visible {
|
|
||||||
@include opacity(1);
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-list__popover {
|
.member-list__popover {
|
||||||
|
|||||||
@@ -85,6 +85,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.channel-header {
|
||||||
|
.search-bar__container {
|
||||||
|
.search__form {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
|
|||||||
@@ -427,8 +427,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-help-popover {
|
.search-help-popover {
|
||||||
left: 55px;
|
margin-left: 10px;
|
||||||
max-width: calc(100% - 10px);
|
max-width: calc(100% - 20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-direct-channels,
|
.modal-direct-channels,
|
||||||
|
|||||||
@@ -9,14 +9,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.channel-header {
|
.channel-header {
|
||||||
.search-bar__container {
|
|
||||||
.search__form {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading {
|
.heading {
|
||||||
max-width: 110px;
|
max-width: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,9 +33,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.post-error {
|
.post-error {
|
||||||
top: 0;
|
|
||||||
left: 32px;
|
left: 32px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
.sidebar--right & {
|
.sidebar--right & {
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|||||||
@@ -824,6 +824,7 @@ export const Constants = {
|
|||||||
description: 'Enable WebRTC one on one calls'
|
description: 'Enable WebRTC one on one calls'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
OVERLAY_TIME_DELAY_SMALL: 100,
|
||||||
OVERLAY_TIME_DELAY: 400,
|
OVERLAY_TIME_DELAY: 400,
|
||||||
WEBRTC_TIME_DELAY: 750,
|
WEBRTC_TIME_DELAY: 750,
|
||||||
WEBRTC_CLEAR_ERROR_DELAY: 15000,
|
WEBRTC_CLEAR_ERROR_DELAY: 15000,
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user