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

Conversation

3lviend
Copy link
Collaborator

@3lviend 3lviend commented Sep 25, 2024

Copy link
Collaborator

@joko3ono joko3ono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I leave small changes request bellow

public/js/hit.js Outdated

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3lviend let's make string concatenation consistent,
'hit ${this.props.hit.number} of query ${this.props.query.number}. ' + meta;

to

'hit ${this.props.hit.number} of query ${this.props.query.number}. ${meta}';

Comment on lines 48 to 49
var length = `length: ${this.queryLength().toLocaleString()}`;
var meta = length.charAt(0).toUpperCase() + length.slice(1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is chartAt(0) is l char in above assignment?

var meta = 'Length: ${this.queryLength().toLocaleString()}'

should be fixed, right?
or did I miss something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's right, just make it simpler with length -> Length. I'll update it 🚀

I thought before, we need dynamic code, without live updates to Length or anything, so I made it like now, so that later whatever the sentence is will always be capitalized.

@3lviend 3lviend requested a review from joko3ono September 27, 2024 02:43
@tadast tadast merged commit 45183e4 into master Sep 30, 2024
7 checks passed
@tadast tadast deleted the fix/capitalisation-punctuation branch September 30, 2024 11:07
@tadast
Copy link
Collaborator

tadast commented Sep 30, 2024

Thanks @3lviend and @joko3ono

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants