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

Search mode categorization #474

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

ashesbloom
Copy link

@ashesbloom ashesbloom commented Jan 13, 2025

📝 Description

  1. Created a basic search mode categorization
    • added data-category to all the children of search-with-container (index.html)
    • added toggleSearchEngines function in script.js which hides the search options based on search mode
  2. Fixed 'Search With' typo
  3. added Gitignore

⚠️ Important Note ⚠️

Improvements Needed:

  1. Selection Issue

    • When the Search mode changes, the selection should return to default.
  2. Animation Enhancement

    • Animations must be added and polished to improve the overall user experience.

📸 Screenshots / 📹 Videos

Preview.359.mp4

🔗 Related Issues

✅ Checklist

  • I have read and followed the Contributing Guidelines.
  • I have tested my changes by installing them as an extension (not just running via localhost) to ensure it builds, installs, and works as expected.
  • I have tested these changes in at least Chrome and Firefox (other browsers if applicable).
  • Attached visual evidence of changes (screenshots or videos) if applicable.

@prem-k-r prem-k-r added enhancement New feature or request work in progress The issue is on progress to fix labels Jan 13, 2025
@Thunder-Blaze
Copy link
Contributor

I can add the animations, can you explain the 1st one in a bit more detail

@prem-k-r

This comment was marked as outdated.

@Thunder-Blaze
Copy link
Contributor

Oh then I'll be able to add this too 👍🏻
But I'll need a day, since I'm traveling today back to college 🥲

@Thunder-Blaze
Copy link
Contributor

I worked on the 1st problem
umm its working just fine I think
but translations are overwritting again 😢 when I set "search on" as default

any suggestions how to fix ?
current progress -> https://github.com/Thunder-Blaze/MaterialYou-NewTab/tree/Search-Mode-Categorization
once complete @ashesbloom I'll make a PR in your repo

@ashesbloom
Copy link
Author

ashesbloom commented Jan 16, 2025

I worked on the 1st problem umm its working just fine I think but translations are overwritting again 😢 when I set "search on" as default

any suggestions how to fix ? current progress -> https://github.com/Thunder-Blaze/MaterialYou-NewTab/tree/Search-Mode-Categorization once complete @ashesbloom I'll make a PR in your repo

@Thunder-Blaze I Just finished the patch a few seconds ago and then read your comment, I was also facing the same issue and I don't think it can be fixed unless the whole structure is tweaked, because z-index, overflow nothing seems to be working so I intertwined the animation

@ashesbloom
Copy link
Author

ashesbloom commented Jan 16, 2025

@prem-k-r ready to be pushed! 🎉

#❇️Fixes

  • When the Search mode changes, the selection returns to the previously selected option.
    (if left unselected default engines are 1 on search with and 5 on search on)
  • Transitions and animations were added for search options.
  • Fixed width issue when the mode is changed (bug).

#📸Preview

Preview.474.mp4

@Thunder-Blaze
Copy link
Contributor

@prem-k-r ready to be pushed! 🎉

#❇️Fixes

  • When the Search mode changes, the selection returns to default i.e. first selection.
  • Transitions and animations were added for search options.
  • Fixed width issue when the mode is changed (bug).

#📸Preview

Preview.474.mp4

I made a PR, check it
The selection will return to last used one in it

optimized default selection by utilizing the local storage method!
@ashesbloom
Copy link
Author

@prem-k-r ready to be pushed! 🎉

#❇️Fixes

  • When the Search mode changes, the selection returns to default i.e. first selection.
  • Transitions and animations were added for search options.
  • Fixed width issue when the mode is changed (bug).

#📸Preview
Preview.474.mp4

I made a PR, check it The selection will return to last used one in it

I just finished testing works perfectly well done!
merged!

@prem-k-r
Copy link
Collaborator

prem-k-r commented Jan 16, 2025

Great work guys!
can you please make Search With and Search On translatable

umm, also maybe we can add ripple effect on button click

@Thunder-Blaze
Copy link
Contributor

Great work guys! can you please make Search With and Search On translatable

umm, also can we add ripple effect on button click

@ashesbloom are you working on it or should I finish it ?

@ashesbloom
Copy link
Author

ashesbloom commented Jan 17, 2025

Great work guys! can you please make Search With and Search On translatable
umm, also can we add ripple effect on button click

@ashesbloom are you working on it or should I finish it

@Thunder-Blaze sure go ahead I am switching to a new issue, will come back time to time though!

@Thunder-Blaze
Copy link
Contributor

@Thunder-Blaze sure go ahead I am switching to a new issue, will come back time to time though!

ok 👍🏻

@Thunder-Blaze
Copy link
Contributor

@ashesbloom Done, you can check the PR

@prem-k-r I went with simple CSS riple effect otherwise there would've been lots of useless JS added just for one ripple animation

@prem-k-r prem-k-r removed the work in progress The issue is on progress to fix label Jan 17, 2025
@itz-rj-here
Copy link
Collaborator

Need to add a delay to the Search With button. cause it is continuously clickable if someone wants too.

@ashesbloom
Copy link
Author

It's working fine overall. I'm a bit iffy about some animations, let's wait for Xengshi.
And I think the toggle between "Search with" and "Search on" should be temporary, with "Search with" as the default. Need more opinions on this.

If we make it temp maybe we can also avoid animation when page reloaded/NewTab opened

@prem-k-r @itz-rj-here Okay so I will make it optional for the users, and all animation actions triggered
However, as the search modes increase like search on: LinkedIn, Instagram, etc, making it optional will defeat the purpose of categorization but I do agree that in the current patch, most of the users won't even notice that the 'search with' is clickable
need your opinion on this maybe some hover or something could help!

@prem-k-r
Copy link
Collaborator

prem-k-r commented Jan 19, 2025

most of the users won't even notice that the 'search with' is clickable

Maybe we can add it in the menu without toggle, just text: title and info.. like in chrome v2.5 branch bookmark hint.
3d0cc65

@prem-k-r

This comment was marked as outdated.

@prem-k-r

This comment was marked as outdated.

@ashesbloom
Copy link
Author

And toggled between Search On and With, maybe change the animation starting direction to show search engines to right side instead from left side . We have Vertical divider on right side, so I think it will be better

@prem-k-r I was also going for that only, but the animation is overlapping with other elements, tried fixing that and even took some drastic measures but didn't work, I think that whole structure has to be tweaked, will see what I can do.

ps: One patch I ready I'll commit in a second

fixed ripple effect leaking out of the button
fixed bugs
@ashesbloom
Copy link
Author

@prem-k-r

#❇️Fixes

  • Fixed animations on search engines and search with button when the page is loaded or reloaded.
  • Added performance buff
  • Fixed ripple effect leak
  • Fixed small bugs here and there

#📸Preview

Preview.474.mp4

ps:
I found many bugs that need to be addressed, will list them later today.

@ashesbloom
Copy link
Author

ashesbloom commented Jan 19, 2025

In my opinion when we open a new tab, we should see no animation on search engines, just plain like now without YouTube. And suppose we switch to Search On, then if we open new tab it still shows Search On.. Search On YouTube.. they are not search engines so I don't think it would be good, so Stay on Search With, so don't save toggle state of On and With.. Later after this PR merges, I can add Google Images and Wikipedia in Search On.

Yeah! it would be nice I idea to add Google images and Wikipedia to that, one thing we can do is we can tag the thing we want to search in eg: @youtube followed by the query

Screenshot 2025-01-19 152539

most of the users won't even notice that the 'search with' is clickable

Maybe we can add it in the menu without toggle, just text: title and info.. like in chrome v2.5 branch bookmark hint. 3d0cc65

need more elaboration on this!

@prem-k-r
Copy link
Collaborator

most of the users won't even notice that the 'search with' is clickable

Maybe we can add it in the menu without toggle, just text: title and info.. like in chrome v2.5 branch bookmark hint. 3d0cc65

need more elaboration on this!

image

<div class="ttcont">
                            <div class="texts">
                                <div class="bigText">Switch between Search Modes</div>
                                <div class="infoText">Click on 'Search With' card to toggle the mode</div>
                            </div>
                        </div>

@prem-k-r
Copy link
Collaborator

one thing we can do is we can tag the thing we want to search in eg: @youtube followed by the query

Screenshot 2025-01-19 152539

maybe we can.. after this #474 and #479 merges

prem-k-r

This comment was marked as resolved.

@prem-k-r

This comment was marked as resolved.

@ashesbloom
Copy link
Author

image
Only text is changing after reload, not search engines

yeah, I have been aware of this bug, It occurs when local storage functionality was added (710cd01), I was planning to fix all bugs in one commit after this.

I will provide a new patch later today.

@prem-k-r
Copy link
Collaborator

prem-k-r commented Jan 19, 2025

ok, thanks :)

@prem-k-r prem-k-r added the work in progress The issue is on progress to fix label Jan 19, 2025
@XengShi
Copy link
Owner

XengShi commented Jan 19, 2025

Currently, it includes only YouTube, which limits its usefulness; it would be great to include additional platforms such as Stack Overflow, Quora, ChatGPT (if possible), Amazon, Instagram, X (formerly Twitter), and GitHub.

@prem-k-r

This comment was marked as outdated.

@prem-k-r
Copy link
Collaborator

let's fix the issues :)

@ashesbloom
Copy link
Author

let's fix the issues :)

I will provide a patch on the weekend, as I am quite busy with exams right now

@prem-k-r
Copy link
Collaborator

ok, take your time...
I am also trying.. all the css.. cant get desired outcome

@prem-k-r
Copy link
Collaborator

Added Google Images and Wikipedia, and did some fixes..
still there are some minor bugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request work in progress The issue is on progress to fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Typo error and UI Enhancement for Search Bar Dropdowns
5 participants