Now users can text search :D #5938

Closed
TomasGonzalez wants to merge 6 commits from enable-text-search into master
TomasGonzalez commented 2021-04-24 02:26:20 +02:00 (Migrated from github.com)

PR Checklist

Please check all that apply to this PR using "x":

  • [ x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • [ x] I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • [ x] Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

Issue Number:

What is the current behavior?

The user is unable to search while using the desktop app.

What is the new behavior?

If the user presses ctrl-f or command-f while using the desktop app, a floating input field appears that allows the user to search on any page.

Other information

## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [ x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [ x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [ ] Bugfix - [ x] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## Fixes Issue Number: ## What is the current behavior? The user is unable to search while using the desktop app. ## What is the new behavior? If the user presses ctrl-f or command-f while using the desktop app, a floating input field appears that allows the user to search on any page. ## Other information <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
tzarebczan commented 2021-04-25 02:16:15 +02:00 (Migrated from github.com)

Thanks so much for the PR, we'll get a review on this soon! Can we show you some appreciation?

Thanks so much for the PR, we'll get a review on this soon! Can we show you [some appreciation](https://lbry.com/faq/appreciation)?
neb-b (Migrated from github.com) requested changes 2021-04-26 20:04:52 +02:00
neb-b (Migrated from github.com) left a comment

Thanks for the PR. I left a few comments.

Thanks for the PR. I left a few comments.
neb-b (Migrated from github.com) commented 2021-04-26 19:57:02 +02:00

Instead of adding a new useEffect in this component, it should just be added to the SearchScreenInput component. Then it can handle mounting and unmounting in the same area

Instead of adding a new `useEffect` in this component, it should just be added to the `SearchScreenInput` component. Then it can handle mounting and unmounting in the same area
neb-b (Migrated from github.com) commented 2021-04-26 19:56:12 +02:00
{/* @if TARGET='app' */}
  <SearchScreenInput />
{/* @endif */}
``` {/* @if TARGET='app' */} <SearchScreenInput /> {/* @endif */} ```
neb-b (Migrated from github.com) commented 2021-04-26 19:54:23 +02:00

Please remove this

Please remove this
neb-b (Migrated from github.com) commented 2021-04-26 20:04:31 +02:00

To match Chromes behavior window.find should be called with every key press, not just when you click enter. This code can be combined with onChange

To match Chromes behavior `window.find` should be called with every key press, not just when you click enter. This code can be combined with `onChange`
@ -0,0 +33,4 @@
win.webContents.findInPage(searchValue);
e.preventDefault();
}
};
neb-b (Migrated from github.com) commented 2021-04-26 19:54:47 +02:00

The escape key should close this

The escape key should close this
neb-b (Migrated from github.com) commented 2021-04-26 19:55:49 +02:00

Please try to match chromes find in page styling. It exists at the top of the page instead of the bottom. Also use our spacing variables instead of hard coding with 32px. Try var(--spacing-xl)

Please try to match chromes find in page styling. It exists at the top of the page instead of the bottom. Also use our spacing variables instead of hard coding with 32px. Try `var(--spacing-xl)`
TomasGonzalez (Migrated from github.com) reviewed 2021-05-03 05:43:08 +02:00
TomasGonzalez (Migrated from github.com) commented 2021-05-03 05:43:08 +02:00

Hello @seanyesmunt, I have fixed all the request's for this PR except for this one, the reason why I did it this way in the first place is that electron has a weird behavior when using the webContents.findInPage method. Basically every time it is called the input loses focus and I have been unable to fix this on my end. I really would like to finish implementing this feature, so If you have any advice I will take it, or I can implement it as I previously did if you allow me.

Hello @seanyesmunt, I have fixed all the request's for this PR except for this one, the reason why I did it this way in the first place is that electron has a weird behavior when using the `webContents.findInPage` method. Basically every time it is called the input loses focus and I have been unable to fix this on my end. I really would like to finish implementing this feature, so If you have any advice I will take it, or I can implement it as I previously did if you allow me.
TomasGonzalez (Migrated from github.com) reviewed 2021-05-13 04:23:01 +02:00
TomasGonzalez (Migrated from github.com) commented 2021-05-13 04:23:00 +02:00

@seanyesmunt I have re-uploaded the PR with all the other comments fixed, except for this. I gave it a try once again and I was unable to get the desired behavior with the webContents.findInPage method.

@seanyesmunt I have re-uploaded the PR with all the other comments fixed, except for this. I gave it a try once again and I was unable to get the desired behavior with the webContents.findInPage method.
TomasGonzalez (Migrated from github.com) reviewed 2021-05-14 03:33:40 +02:00
TomasGonzalez (Migrated from github.com) commented 2021-05-14 03:33:39 +02:00

@seanyesmunt Am I allowed to install external libraries? found one that might be of help with the misbehavior that I'm facing.

@seanyesmunt Am I allowed to install external libraries? found one that might be of help with the misbehavior that I'm facing.
tzarebczan (Migrated from github.com) reviewed 2021-05-14 22:32:31 +02:00
tzarebczan (Migrated from github.com) commented 2021-05-14 22:32:30 +02:00

I think that's fine. Also, check out some of the comments in https://github.com/lbryio/lbry-desktop/issues/5877 for other feedback.

I think that's fine. Also, check out some of the comments in https://github.com/lbryio/lbry-desktop/issues/5877 for other feedback.
TomasGonzalez (Migrated from github.com) reviewed 2021-05-15 02:00:10 +02:00
TomasGonzalez (Migrated from github.com) commented 2021-05-15 02:00:10 +02:00

I think that's fine. Also, check out some of the comments in #5877 for other feedback.

Mhh... Interesting seems that we are facing the same issues.

> I think that's fine. Also, check out some of the comments in #5877 for other feedback. Mhh... Interesting seems that we are facing the same issues.
kauffj commented 2021-05-24 17:04:42 +02:00 (Migrated from github.com)

@TomasGonzalez are you coming back to finish this?

@TomasGonzalez are you coming back to finish this?
TomasGonzalez commented 2021-05-24 17:18:10 +02:00 (Migrated from github.com)

@TomasGonzalez are you coming back to finish this?

Yes! I have been working on it in the weekends, have been posting my blockers and progress in https://github.com/lbryio/lbry-desktop/issues/5877. Can only work on it on the weekends so might take a while...

> @TomasGonzalez are you coming back to finish this? Yes! I have been working on it in the weekends, have been posting my blockers and progress in https://github.com/lbryio/lbry-desktop/issues/5877. Can only work on it on the weekends so might take a while...

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#5938
No description provided.