Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix capitalisation and punctuation in report #796

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/css/app.min.css

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions public/js/hit.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ export default class extends Component {
}

headerJSX() {
var meta = `length: ${this.hitLength().toLocaleString()}`;
var meta = `Length: ${this.hitLength().toLocaleString()}`;

if (this.props.showQueryCrumbs && this.props.showHitCrumbs) {
// Multiper queries, multiple hits
meta = `hit ${this.props.hit.number} of query ${this.props.query.number}, ` + meta;
meta = `hit ${this.props.hit.number} of query ${this.props.query.number}. ${meta}`;
}
else if (this.props.showQueryCrumbs && !this.props.showHitCrumbs) {
// Multiple queries, single hit
meta = `the only hit of query ${this.props.query.number}, ` + meta;
meta = `the only hit of query ${this.props.query.number}. ${meta}`;
}
else if (!this.props.showQueryCrumbs && this.props.showHitCrumbs) {
// Single query, multiple hits
meta = `hit ${this.props.hit.number}, ` + meta;
meta = `hit ${this.props.hit.number}. ${meta}`;
}

return <div className="section-header border-b border-seqorange flex flex-col sm:flex-row sm:justify-between w-full">
Expand All @@ -122,7 +122,7 @@ export default class extends Component {
</div>
<span className="ml-1">{this.props.hit.title}</span>
</h4>
<span className="label text-sm font-normal text-inherit cursor-text">{meta}</span>
<span className="label first-letter:capitalize text-sm font-normal text-inherit cursor-text">{meta}</span>
</div>;
}

Expand Down
7 changes: 4 additions & 3 deletions public/js/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ export class ReportQuery extends Component {
return this.props.query.hits.length;
}
headerJSX() {
var meta = `length: ${this.queryLength().toLocaleString()}`;
var meta = `Length: ${this.queryLength().toLocaleString()}`;

if (this.props.showQueryCrumbs) {
meta = `query ${this.props.query.number}, ` + meta;
meta = `query ${this.props.query.number}. ${meta}`;
}
return <div className="section-header border-b border-seqorange justify-between w-full flex flex-col sm:flex-row gap-4">
<h3 className="text-base cursor-pointer flex flex-col sm:flex-row items-start">
<strong>Query=<span className="ml-1">{this.props.query.id}</span></strong>
<span className="ml-1">{this.props.query.title}</span>
</h3>
<span className="label text-sm text-right font-normal text-inherit pt-0 px-0">{meta}</span>
<span className="label first-letter:capitalize text-sm text-right font-normal text-inherit pt-0 px-0">{meta}</span>
</div>;
}

Expand Down
2 changes: 1 addition & 1 deletion public/sequenceserver-report.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/sequenceserver-report.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/sequenceserver-search.min.js.map

Large diffs are not rendered by default.

Loading