UX: Move the timeline up higher on the page

This commit is contained in:
Robin Ward 2016-05-31 16:30:45 -04:00
parent 2d47f144f5
commit 27b499f4dd
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
2 changed files with 5 additions and 8 deletions

View File

@ -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;

View File

@ -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) {