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

Autocomplete Recent Searches #1539

Merged
merged 2 commits into from
Jul 7, 2023
Merged

Autocomplete Recent Searches #1539

merged 2 commits into from
Jul 7, 2023

Conversation

MRichards99
Copy link
Contributor

Description

This PR partially implements #1471. As discussed in the issue, I have implemented a way for a user to access their recent searches using browser autocompleting:

image

As Louise stated in the issue, "this persists across browser refreshes, but is locked to a single browser". This may not be enough functionality to satisfy DataGateway users (i.e. they might want recent searches to be the same across browsers) but given the low code change in this PR, it seems this is a good first step.

I updated the snapshots for the unit tests and tried to write an e2e test but I wasn't able to get the autofill field to complete in Cypress during the test (it would appear if I did the steps manually after the test) so I was unable to write a test for that.

It's rather simple, but it seems to work.

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage

Agile board tracking

connect to #1471

@MRichards99 MRichards99 changed the title Search history #1471 Autocomplete Recent Searches Jun 21, 2023
@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (3bf6259) 96.26% compared to head (1288b4a) 96.28%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1539      +/-   ##
===========================================
+ Coverage    96.26%   96.28%   +0.01%     
===========================================
  Files          161      161              
  Lines         6860     6867       +7     
  Branches      2126     2128       +2     
===========================================
+ Hits          6604     6612       +8     
+ Misses         236      235       -1     
  Partials        20       20              
Flag Coverage Δ
common 95.53% <ø> (ø)
dataview 96.85% <ø> (ø)
download 96.84% <ø> (+0.11%) ⬆️
search 96.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...teway-search/src/search/searchButton.component.tsx 100.00% <ø> (ø)
...eway-search/src/search/searchTextBox.component.tsx 100.00% <ø> (ø)
...ateway-search/src/searchBoxContainer.component.tsx 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@louise-davies louise-davies left a comment

Choose a reason for hiding this comment

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

LGTM - it might cause some merge conflicts with the lucene PR but nothing too bad and we'll want this change for when we release the search stuff :)

@MRichards99
Copy link
Contributor Author

Brilliant - I think I'll merge this now so I can get (sneakily) ahead of the Lucene PR :)

@MRichards99 MRichards99 merged commit e0c4fe5 into develop Jul 7, 2023
@MRichards99 MRichards99 deleted the search-history-#1471 branch July 7, 2023 11:37
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.

2 participants