Commit 8b2a2bc2 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Rename `StreamContent` -> `StreamView`

parent 2d195fd9
......@@ -13,10 +13,11 @@ import { applyTheme } from '../util/theme';
import { withServices } from '../util/service-context';
import AnnotationView from './annotation-view';
import SidebarView from './sidebar-view';
import StreamView from './stream-view';
import HelpPanel from './help-panel';
import ShareAnnotationsPanel from './share-annotations-panel';
import SidebarView from './sidebar-view';
import StreamContent from './stream-content';
import ToastMessages from './toast-messages';
import TopBar from './top-bar';
......@@ -192,8 +193,8 @@ function HypothesisApp({
{route && (
<main>
{route === 'annotation' && <AnnotationView onLogin={login} />}
{route === 'notebook' && <StreamContent />}
{route === 'stream' && <StreamContent />}
{route === 'notebook' && <StreamView />}
{route === 'stream' && <StreamView />}
{route === 'sidebar' && (
<SidebarView onLogin={login} onSignUp={signUp} />
)}
......
......@@ -10,7 +10,7 @@ import useStore from '../store/use-store';
import ThreadList from './thread-list';
/**
* @typedef StreamContentProps
* @typedef StreamViewProps
* @prop {Object} [api] - Injected service
* @prop {Object} [toastMessenger] - Injected service
*/
......@@ -18,9 +18,9 @@ import ThreadList from './thread-list';
/**
* The main content of the "stream" route (https://hypothes.is/stream)
*
* @param {StreamContentProps} props
* @param {StreamViewProps} props
*/
function StreamContent({ api, toastMessenger }) {
function StreamView({ api, toastMessenger }) {
const addAnnotations = useStore(store => store.addAnnotations);
const annotationFetchStarted = useStore(
store => store.annotationFetchStarted
......@@ -82,11 +82,11 @@ function StreamContent({ api, toastMessenger }) {
return <ThreadList thread={rootThread} />;
}
StreamContent.propTypes = {
StreamView.propTypes = {
api: propTypes.object,
toastMessenger: propTypes.object,
};
StreamContent.injectedProps = ['api', 'toastMessenger'];
StreamView.injectedProps = ['api', 'toastMessenger'];
export default withServices(StreamContent);
export default withServices(StreamView);
......@@ -96,7 +96,7 @@ describe('HypothesisApp', () => {
it('does not render content if route is not yet determined', () => {
fakeStore.route.returns(null);
const wrapper = createComponent();
['main', 'AnnotationView', 'StreamContent', 'SidebarView'].forEach(
['main', 'AnnotationView', 'StreamView', 'SidebarView'].forEach(
contentComponent => {
assert.isFalse(wrapper.exists(contentComponent));
}
......@@ -114,11 +114,11 @@ describe('HypothesisApp', () => {
},
{
route: 'notebook',
contentComponent: 'StreamContent',
contentComponent: 'StreamView',
},
{
route: 'stream',
contentComponent: 'StreamContent',
contentComponent: 'StreamView',
},
].forEach(({ route, contentComponent }) => {
it('renders app content for route', () => {
......
......@@ -4,9 +4,9 @@ import { createElement } from 'preact';
import mockImportedComponents from '../../../test-util/mock-imported-components';
import { waitFor } from '../../../test-util/wait';
import StreamContent, { $imports } from '../stream-content';
import StreamView, { $imports } from '../stream-view';
describe('StreamContent', () => {
describe('StreamView', () => {
let fakeApi;
let fakeUseRootThread;
let fakeSearchFilter;
......@@ -52,7 +52,7 @@ describe('StreamContent', () => {
function createComponent() {
return mount(
<StreamContent api={fakeApi} toastMessenger={fakeToastMessenger} />
<StreamView api={fakeApi} toastMessenger={fakeToastMessenger} />
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment