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

feat: author searching #42

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

scallaway
Copy link
Contributor

This commit adds commit searching based on the name of the author, utilising fuzzy matching.

I initially thought about just adding a basic search, but quickly realise that GitHub usernames can be a pain to type, so any help getting to the search destination faster is a bonus - hence the fuzzy matching.

I didn't do too much digging into the fuzzy searching library, but Fuse.JS seemed to be a sensible choice. The trade-off for performance is a complex balance of the setup, search and teardown times.

@scallaway scallaway changed the title feat: author seraching feat: author searching Oct 17, 2023
This commit adds commit searching based on the name of the author,
utilising fuzzy matching.

I initially thought about just adding a basic search, but quickly
realise that GitHub usernames can be a pain to type, so any help getting
to the search destination faster is a bonus - hence the fuzzy matching.

I didn't do too much digging into the fuzzy searching library, but
Fuse.JS seemed to be a sensible choice. The trade-off for performance is
a complex balance of the setup, search and teardown times.
tommilligan
tommilligan previously approved these changes Oct 17, 2023
qvet-web/src/components/CommitSummary.tsx Outdated Show resolved Hide resolved
qvet-web/src/components/CommitSummary.tsx Outdated Show resolved Hide resolved
We were recreating the list of users that we pick for deployment on each
render and, due to the way the input works, each keypress causes a
render.

This means that we need to memoise `developerCommits` so that it's only
recreated when the relevant information changes (or on refresh).

However, we _also_ need to memoise `<DeploymentUsers />` otherwise the
order of the users _could_ change with each render.
@scallaway
Copy link
Contributor Author

@tommilligan

Just re-requesting a review from you again as I've made a few more changes based on a slight issue that I discovered with re-rendering (classic React).

Copy link
Collaborator

@tommilligan tommilligan left a comment

Choose a reason for hiding this comment

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

Oh well done. Yep very happy to see that fixed, I noticed it and thought "no refactoring!"

@tommilligan tommilligan merged commit c8afd57 into qvet:master Oct 17, 2023
1 check passed
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.

None yet

2 participants