DiscussionPage
Extends:
The DiscussionPage
component displays a whole discussion page, including
the discussion list pane, the hero, the posts, and the sidebar.
Member Summary
Public Members | ||
public |
|
|
public |
The discussion that is being viewed. |
|
public |
The number of the first post that is currently visible in the viewport. |
|
public |
stream: * |
|
public |
|
Method Summary
Public Methods | ||
public |
load() Load the discussion from the API or use the preloaded one. |
|
public |
oninit(vnode: *) |
|
public |
onremove(vnode: *) |
|
public |
positionChanged(startNumber: Integer, endNumber: Integer) When the posts that are visible in the post stream change (i.e. |
|
public |
Get the parameters that should be passed in the API request to get the discussion. |
|
public |
show(discussion: Discussion) Initialize the component to display the given discussion. |
|
public |
Build an item list for the contents of the sidebar. |
|
public |
view(): * |
Inherited Summary
From class Page | ||
public |
A class name to apply to the body while the route is active. |
|
public |
Whether we should scroll to the top of the page when its rendered. |
|
public |
Whether the browser should restore scroll state on refreshes. |
|
public |
oncreate(vnode: *) |
|
public |
oninit(vnode: *) |
|
public |
onremove(vnode: *) |
Public Members
public bodyClass: string source
A class name to apply to the body while the route is active.
Override:
Page#bodyClasspublic stream: * source
public useBrowserScrollRestoration: boolean source
Whether the browser should restore scroll state on refreshes.
Override:
Page#useBrowserScrollRestorationPublic Methods
public onremove(vnode: *) source
Override:
Page#onremoveParams:
Name | Type | Attribute | Description |
vnode | * |
public positionChanged(startNumber: Integer, endNumber: Integer) source
When the posts that are visible in the post stream change (i.e. the user scrolls up or down), then we update the URL and mark the posts as read.
Params:
Name | Type | Attribute | Description |
startNumber | Integer | ||
endNumber | Integer |
public requestParams(): Object source
Get the parameters that should be passed in the API request to get the discussion.
public show(discussion: Discussion) source
Initialize the component to display the given discussion.
Params:
Name | Type | Attribute | Description |
discussion | Discussion |