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

Show dark or light screenshot for address bar search #59

Closed
rugk opened this issue Sep 15, 2019 · 12 comments
Closed

Show dark or light screenshot for address bar search #59

rugk opened this issue Sep 15, 2019 · 12 comments
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@rugk
Copy link
Owner

rugk commented Sep 15, 2019

In the settings:
image

Currently we show a screenshot for the dark version.
IMHO, the screenshot shown should be dependent on whether the user (likely) uses a dark Firefox/OS theme or a light one.

Tip: use https://developer.mozilla.org/docs/Web/CSS/@media/prefers-color-scheme and https://developer.mozilla.org/docs/Web/API/Window/matchMedia

@rugk rugk added the good first issue Good for newcomers label Sep 15, 2019
@rugk rugk changed the title Show dark or light screenshot Show dark or light screenshot for address bar feature Sep 15, 2019
@rugk rugk changed the title Show dark or light screenshot for address bar feature Show dark or light screenshot for address bar search Sep 15, 2019
@rugk rugk added this to To do in Address bar search feature via automation Sep 15, 2019
@rugk rugk added the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Sep 25, 2019
@silvererudite
Copy link
Contributor

Hi...i would like to take a shot on this pls.

@rugk
Copy link
Owner Author

rugk commented Sep 28, 2019

Okay, feel free to take this. 😃

@rugk rugk moved this from To do to In progress in Address bar search feature Sep 28, 2019
@silvererudite
Copy link
Contributor

hey @rugk would you please tell me how I actually use this search bar feature to reproduce the issue ?

Also, where is this screenshot shown to the user ?because I see there's a separate folder of screenshots in the repo. I don't understand where I actually do the work as i can't find the relevant files or place to work on.
Hope you understand my confusion.

@rugk
Copy link
Owner Author

rugk commented Oct 4, 2019

Sure, no problem.
First of all, this feature is not released yet, i.e. in the master branch, see the whole project status: https://github.com/rugk/awesome-emoji-picker/projects/2

Thus, you need use the master branch.
To test out the code, you need to clone the repo locally (with git submodules) and load it into Firefox. Fortunately, that is quite easy without having to install additional tools. In the contributing guide, you can see how to do that.

Then you'll find that feature in the settings of the add-on. I'd suggest you to play around with it a little and see what it does. 😃

@rugk
Copy link
Owner Author

rugk commented Oct 15, 2019

The places to work on are the options (it's a dir) and there you can also find the image in the img dir.

@silvererudite If you need any pointers/help or have questions, feel free to ask.

@silvererudite
Copy link
Contributor

@rugk sorry haven't been much active. I do understand now what needs to be done but need a slight clarification. Do we change the screenshots based on users' browser preference or his OS preference? The CSS property preferes-color-scheme only detects the users' preference on OS not the theme set on browser.

@rugk
Copy link
Owner Author

rugk commented Oct 16, 2019

Yes, for technical reasons we can only detect/change this based on the OS preference, because of the reasons you've mentioned. I guess, there is just no other way, so just do it in this way. 😃

@rugk rugk added this to the 1.2 milestone Oct 16, 2019
@silvererudite
Copy link
Contributor

@rugk actually there is a way to detect theme on Firefox browser. Check out this the Firefox's theme Api for addons would you like me to try sth with this( if you think it's suitable for your project)?

I can ofcourse do it for the OS preference. I'm saying so because to me OS preference seems not so integral when it comes to browser addons. But that's just my opinion, would love to have your perspective on this.

@rugk
Copy link
Owner Author

rugk commented Oct 16, 2019

I think this does not work for the built-in themes and you also hardly can detect whether the theme you get back there is actually dark or light. I've asked this in the forums before.

@silvererudite
Copy link
Contributor

oh...didn't thjnk of that issue. Thanks for pointing that out.

@rugk
Copy link
Owner Author

rugk commented Oct 16, 2019

BTW, also feel free to make a better screenshot of the current English thing there. 😄

E.g. the back button at the left is cropped, this is not so nice.

Just make sure to use the same search, because the alt text is used for the image. 😄

@rugk rugk removed the hacktoberfest Hacktoberfest 2020, https://hacktoberfest.digitalocean.com label Nov 7, 2019
@rugk
Copy link
Owner Author

rugk commented Nov 10, 2019

Fixed by #65

@rugk rugk closed this as completed Nov 10, 2019
Address bar search feature automation moved this from In progress to Done Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
No open projects
Development

No branches or pull requests

2 participants