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

[bukuserver] Favicon #632

Merged
merged 2 commits into from
Dec 4, 2022
Merged

[bukuserver] Favicon #632

merged 2 commits into from
Dec 4, 2022

Conversation

LeXofLeviafan
Copy link
Collaborator

fixes #621:

  • implementing a static bukuserver/favicon.svg file
    note: it has to be 16x16 px to be displayed correctly in browser tabs, and not specifying a font results in a different icon being displayed in different browsers (possibly depending on various user font settings?)
  • adding a /favicon.ico route with permanent redirect to said file
    note: once the browser got a 404 on favicon request, it stops requesting the favicon until you close and reopen the browser itself (private/incognito mode doesn't help); the workaround of loading the icon manually only works in Firefox

also:

  • adding a link to Wiki article on favicons in bukuserver readme file
  • adding test output files to .gitignore to ensure they don't end up committed by accident

Copy link
Collaborator

@rachmadaniHaryono rachmadaniHaryono left a comment

Choose a reason for hiding this comment

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

remove this one too

{% block styles %}
{{super()}}
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
{% endblock %}

@rachmadaniHaryono
Copy link
Collaborator

subfolder .gitignore

any reason not to put it on main .gitignore?

@LeXofLeviafan
Copy link
Collaborator Author

remove this one too

This file is no longer used in the first place; it'd make more sense to remove it entirely (along with other dead code).

@rachmadaniHaryono
Copy link
Collaborator

./bukuserver/server.py:17:1: F401 'flask_paginate.Pagination' imported but unused
./bukuserver/server.py:17:1: F401 'flask_paginate.get_page_parameter' imported but unused
./bukuserver/server.py:17:1: F401 'flask_paginate.get_per_page_parameter' imported but unused
./bukuserver/server.py:29:1: F401 'flask.render_template' imported but unused

@LeXofLeviafan
Copy link
Collaborator Author

…Speaking of running tests locally – one of test_network_handler_with_url runs (corresponding to a Google search query) always fails on my machine due to Google server responding with HTTP 429 Too Many Requests (I get the same response when sending the request with wget).

Not sure why this happens (perhaps it's related to me using a VPN for internet access?), but it certainly results in guaranteed fails every time I run unit tests locally. (…Does it really count as a unit test if the network requests are actually being sent? Normally you'd expect the requests themselves to be mocked or at least extracted to external functionality, in part to avoid such factors from affecting the outcome – after all, I doubt that the goal is to test specifically whether the code can communicate with Google servers.)

@jarun jarun merged commit 73786a1 into jarun:master Dec 4, 2022
@jarun
Copy link
Owner

jarun commented Dec 4, 2022

Thank you!

@LeXofLeviafan LeXofLeviafan deleted the favicon branch December 5, 2022 20:42
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Design an icon for the server
3 participants