mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:02:29 +08:00
UX: Move the timeline up higher on the page
This commit is contained in:
parent
2d47f144f5
commit
27b499f4dd
|
@ -2,6 +2,8 @@ import MountWidget from 'discourse/components/mount-widget';
|
|||
import Docking from 'discourse/mixins/docking';
|
||||
import { observes } from 'ember-addons/ember-computed-decorators';
|
||||
|
||||
const FIXED_POS = 85;
|
||||
|
||||
export default MountWidget.extend(Docking, {
|
||||
widget: 'topic-timeline-container',
|
||||
dockBottom: null,
|
||||
|
@ -12,6 +14,7 @@ export default MountWidget.extend(Docking, {
|
|||
topicTrackingState: this.topicTrackingState,
|
||||
enteredIndex: this.get('enteredIndex'),
|
||||
dockAt: this.dockAt,
|
||||
top: this.dockAt || FIXED_POS,
|
||||
dockBottom: this.dockBottom };
|
||||
},
|
||||
|
||||
|
@ -29,10 +32,8 @@ export default MountWidget.extend(Docking, {
|
|||
const timelineHeight = $timeline.height();
|
||||
const footerHeight = $('.timeline-footer-controls').outerHeight(true) || 0;
|
||||
|
||||
const tTop = 140;
|
||||
|
||||
const prev = this.dockAt;
|
||||
const posTop = tTop + info.offset();
|
||||
const posTop = FIXED_POS + info.offset();
|
||||
const pos = posTop + timelineHeight;
|
||||
|
||||
this.dockBottom = false;
|
||||
|
|
|
@ -194,11 +194,7 @@ createWidget('topic-timeline-container', {
|
|||
},
|
||||
|
||||
buildAttributes(attrs) {
|
||||
if (attrs.dockAt !== null) {
|
||||
return { style: `top: ${attrs.dockAt}px` };
|
||||
};
|
||||
|
||||
return { style: 'top: 140px' };
|
||||
return { style: `top: ${attrs.top}px` };
|
||||
},
|
||||
|
||||
html(attrs) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user