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 Docking from 'discourse/mixins/docking';
import { observes } from 'ember-addons/ember-computed-decorators'; import { observes } from 'ember-addons/ember-computed-decorators';
const FIXED_POS = 85;
export default MountWidget.extend(Docking, { export default MountWidget.extend(Docking, {
widget: 'topic-timeline-container', widget: 'topic-timeline-container',
dockBottom: null, dockBottom: null,
@ -12,6 +14,7 @@ export default MountWidget.extend(Docking, {
topicTrackingState: this.topicTrackingState, topicTrackingState: this.topicTrackingState,
enteredIndex: this.get('enteredIndex'), enteredIndex: this.get('enteredIndex'),
dockAt: this.dockAt, dockAt: this.dockAt,
top: this.dockAt || FIXED_POS,
dockBottom: this.dockBottom }; dockBottom: this.dockBottom };
}, },
@ -29,10 +32,8 @@ export default MountWidget.extend(Docking, {
const timelineHeight = $timeline.height(); const timelineHeight = $timeline.height();
const footerHeight = $('.timeline-footer-controls').outerHeight(true) || 0; const footerHeight = $('.timeline-footer-controls').outerHeight(true) || 0;
const tTop = 140;
const prev = this.dockAt; const prev = this.dockAt;
const posTop = tTop + info.offset(); const posTop = FIXED_POS + info.offset();
const pos = posTop + timelineHeight; const pos = posTop + timelineHeight;
this.dockBottom = false; this.dockBottom = false;

View File

@ -194,11 +194,7 @@ createWidget('topic-timeline-container', {
}, },
buildAttributes(attrs) { buildAttributes(attrs) {
if (attrs.dockAt !== null) { return { style: `top: ${attrs.top}px` };
return { style: `top: ${attrs.dockAt}px` };
};
return { style: 'top: 140px' };
}, },
html(attrs) { html(attrs) {