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

Pay down some tech debt #465

Merged
merged 7 commits into from
Jun 26, 2020
Merged

Pay down some tech debt #465

merged 7 commits into from
Jun 26, 2020

Conversation

leftmostcat
Copy link
Collaborator

Problem

There's a fair bit of tech debt lying around.

Solution

Take an initial crack at paying it down. Delete unused or duplicated code. Clean up lints. Update some doc comments. Do some style work. Introduce subtle yet horrifying bugs.

Areas of Impact

General.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.5%) to 62.965% when pulling 0ba18b1 on tech_debt into cb47939 on master.

Comment on lines -70 to +68
this.setState({from: 0, query: fullQuery});
this.setState({query: fullQuery});
Copy link
Contributor

@prabalsingh24 prabalsingh24 Jun 23, 2020

Choose a reason for hiding this comment

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

This should not be removed. I can see why you did this but actually there is a bug which needs to be fixed first.

Umm. If you go to this https://test.bookbrainz.org/search?q=harry+potter&from=10 , you'll notice the pagination is showing 1-20. It should be showing 11-30

I checked and saw from is missing in the props here

const props = generateProps(req, res, {
				entityTypes,
				from,
				hideSearch: true,
				nextEnabled,
				resultsPerPage: size,
				...searchResults
			});

Then this change won't be required.

Copy link
Contributor

@MonkeyDo MonkeyDo Jun 23, 2020

Choose a reason for hiding this comment

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

As discussed on IRC, from is not needed in the state.
There is another issue that will be solved in a separate PR (#466 )

Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

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

Phew, nice one !
The technical debt gods are assuaged.

Thanks for the cleanup ! Can I go ahead and merge?

@MonkeyDo MonkeyDo merged commit 8941687 into master Jun 26, 2020
@leftmostcat leftmostcat deleted the tech_debt branch June 26, 2020 10:08
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.

4 participants