-
Notifications
You must be signed in to change notification settings - Fork 903
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
* Update top nav search input to direct to channel panel when channel URL provided #1221
* Update top nav search input to direct to channel panel when channel URL provided #1221
Conversation
|
||
return extractors.reduce((a, c) => a || c(), null) || false | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
acdb07e
to
457696e
Compare
Extracted a function (but not the entire Tested with https://youtu.be/WDH11NVtxek (Top nav search box entry) https://www.youtube.com/channel/UCeqUUXaM75wrK5Aalo6UorQ (Top nav search box entry) |
src/renderer/App.js
Outdated
const v = this | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're using an arrow function for the callback, you can get rid of the v
identifier and replace it with this
.
Right now, there's a mixture of the two.
|
||
case 'invalid_url': | ||
default: { | ||
router.push({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be this.$router
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks pretty good to me :)
The only thing that's really itching at me is the fact that a lot of the result logic is repeated in the two callbacks used in the getYoutubeUrlInfo
dispatches.
But the only thing that came to mind in order to "fix" it was gimmicky hacks like passing this
to the dispatch and making use of errors and catch
callbacks, so I'm just gonna ignore the itching entirely.
In theory yes, but when looking at the proportion of code deleted and code added, I would argue this is fair enough. Also it is not like I have never seen stuff like that in other parts of the code / modules before |
Code looks good in total. So if you could add the changes @Svallinn annotated, I would test it a last time and then merge it |
d0211cd
to
74c0701
Compare
74c0701
to
04d29c4
Compare
04d29c4
to
4460cb3
Compare
Requested changes made Generally I keep this kind of "duplicate" code around (with slight difference) until there is too much copy & paste happening. For |
Thanks for putting in the work and changes, appreciate it a lot. Works great for all channel types :) |
Pull Request Type
Please select what type of pull request this is:
Related issue
#1218
Description
This PR makes channel URL input in search input box in top nav handled by redirecting to channel view.
Instead of searching with it
Channel URL expected to be like
/channel/{channelID}
Screenshots (if appropriate)
Apr-22-2021.10-01-22.mp4
Testing (for code that is not small enough to be easily understandable)
Desktop (please complete the following information):
development
actually)Additional context
Add any other context about the problem here.