Skip to content
This repository has been archived by the owner on May 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #259 from osu-cass/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
tnoelcke committed Oct 30, 2018
2 parents ace8d03 + f0d8418 commit d42091e
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 51 deletions.
28 changes: 7 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/AboutItem/AboutItemRevision.tsx
Expand Up @@ -8,7 +8,7 @@ export class AboutThisItemRevision extends React.Component<
renderField(
label: string,
className: string,
value?: string | number
value?: string | number | undefined
): JSX.Element | null {
return (
<p className={`card-text ${className}`} tabIndex={0}>
Expand Down Expand Up @@ -120,12 +120,16 @@ export class AboutThisItemRevision extends React.Component<
{this.renderField(
"Publication",
"publication",
AboutItemMetadata.standardPublication.primaryStandard
AboutItemMetadata.standardPublication !== null
? AboutItemMetadata.standardPublication.primaryStandard
: undefined
)}
{this.renderField(
"Primary Standard",
"primary-standard",
AboutItemMetadata.standardPublication.publication
AboutItemMetadata.standardPublication !== null
? AboutItemMetadata.standardPublication.primaryStandard
: undefined
)}
{this.renderField(
"associatedTutorial",
Expand Down
2 changes: 1 addition & 1 deletion src/ItemBank/ItemBankContainer.tsx
Expand Up @@ -152,7 +152,7 @@ export class ItemBankContainer extends React.Component<
revisions[0].selected = true;
this.onFetchRevisionsSuccess(revisions);

return revisions;
return revisions.reverse();
}

onFetchRevisionsSuccess(data: RevisionModel[]) {
Expand Down
1 change: 0 additions & 1 deletion src/ItemBank/__tests__/ItemBankContainer.test.tsx
Expand Up @@ -17,7 +17,6 @@ const item: ItemRevisionModel = {
bankKey: 3000,
hasBankKey: true,
namespace: "itemreviewviewer",
section: "math",
revision: "asfe",
isaap: ""
};
Expand Down
Expand Up @@ -14,7 +14,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
},
Object {
"bankKey": 2332,
Expand All @@ -23,7 +22,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asdf",
"section": "math",
},
]
}
Expand Down Expand Up @@ -73,7 +71,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
},
],
],
Expand All @@ -98,7 +95,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
},
Object {
"bankKey": 2332,
Expand All @@ -107,7 +103,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asdf",
"section": "math",
},
]
}
Expand Down Expand Up @@ -209,7 +204,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
}
}
itemUrl="hello"
Expand All @@ -222,7 +216,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
},
Object {
"bankKey": 2332,
Expand All @@ -231,7 +224,6 @@ exports[`ItemBankContainer default wrapper 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asdf",
"section": "math",
},
]
}
Expand Down Expand Up @@ -458,7 +450,6 @@ exports[`ItemBankContainer has item bank viewer 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
}
}
itemUrl="hello"
Expand All @@ -471,7 +462,6 @@ exports[`ItemBankContainer has item bank viewer 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
},
Object {
"bankKey": 2332,
Expand All @@ -480,7 +470,6 @@ exports[`ItemBankContainer has item bank viewer 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asdf",
"section": "math",
},
]
}
Expand Down Expand Up @@ -707,7 +696,6 @@ exports[`ItemBankContainer item bank entry 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asfe",
"section": "math",
},
Object {
"bankKey": 2332,
Expand All @@ -716,7 +704,6 @@ exports[`ItemBankContainer item bank entry 1`] = `
"itemKey": 187,
"namespace": "itemreviewviewer",
"revision": "asdf",
"section": "math",
},
]
}
Expand Down
20 changes: 9 additions & 11 deletions src/Revisions/RevisionContainer.tsx
Expand Up @@ -15,17 +15,15 @@ export class RevisionContainer extends React.Component<
}

render() {
const revisions = this.props.revisions
.reverse()
.map((rev, index) => (
<Revision
{...rev}
selected={rev.selected}
onClick={() => this.props.onRevisionSelect(rev.commitHash)}
key={rev.commitHash}
updateNumber={index + 1}
/>
));
const revisions = this.props.revisions.map((rev, index) => (
<Revision
{...rev}
selected={rev.selected}
onClick={() => this.props.onRevisionSelect(rev.commitHash)}
key={rev.commitHash}
updateNumber={index + 1}
/>
));

return (
<div className="revisions section section-light section-compact">
Expand Down
Expand Up @@ -394,7 +394,7 @@ exports[`Storyshots About This Item Revision displays information about an item
className="card-text-value"
>

SBAC-SH-v1
SBAC-SH-v1:SH-Undesignated
</span>
</p>
<p
Expand Down

0 comments on commit d42091e

Please sign in to comment.