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
integrations: Assign default logo to integrations #23712
base: main
Are you sure you want to change the base?
Conversation
@nagyem Thanks for the PR! Please add a screenshot of an integration using the logo to the PR description, fix the failing tests, and post a comment when the PR is ready for review. |
2742c2d
to
768a44c
Compare
198e6ce
to
56e233e
Compare
Ready for review! |
templates/corporate/attribution.html
Outdated
@@ -23,6 +23,11 @@ <h1>Website attributions</h1> | |||
<img alt="" src="/static/images/landing-page/companies/software-engineer.svg" /> | |||
<p>"<a href="https://iconscout.com/illustration/software-engineer-2043023">Software engineer Illustration</a>" By <a href="https://iconscout.com/contributors/delesign/illustrations">Delesign Graphic</a> is licensed under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.</p> | |||
</li> | |||
<li> | |||
<b>Default Integration Logo</b> |
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.
Let's use sentence case here, as we generally do at Zulip, and match the formatting above of the other attribution label. I.e.:
Default integration logo:
templates/corporate/attribution.html
Outdated
<b>Default Integration Logo</b> | ||
<img alt="" src="/static/images/integrations/logos/generic.png" /> | ||
<p>"<a href="https://www.flaticon.com/free-icons/technology">Technology icons"</a> created by Freepik - Flaticon.</p> | ||
</li> |
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.
Something seems off with quotation marks here.
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.
Yeah, @nagyem can you add a commit at the top of this PR correcting the quotation marks used here. We should be using <p>"<a href='https://iconscout.com/illustration/software-engineer-2043023'>Software engineer Illustration</a>"
Thanks! I left a couple of small comments. @amanagr , perhaps you could take a look as well? I have not pulled down the PR for manual testing. |
@alya Reviewed your comments and made updates to the text to match the format of the other attribution. Could you help me understand the build fail? I'm not familiar with Puppet. |
Please post a question in the #development help stream in the Zulip development community. Be sure to follow https://zulip.readthedocs.io/en/latest/contributing/asking-great-questions.html. Thanks! |
@nagyem can you provide steps for testing this locally? |
To run the backend tests: To manually test the default logo: (I used the name "alertmanager" because using a random name would cause an import error. "alertmanager" has a logo defined, but the logo path does not follow the default path Navigate to http://localhost:9991/integrations/ to see the generic logo being used. |
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.
@nagyem thanks for the help with testing. LGTM other than the comment I made above. I would have liked for us to use svg format for the generic logo but I would leave it for TIm to comment on.
templates/corporate/attribution.html
Outdated
<b>Default Integration Logo</b> | ||
<img alt="" src="/static/images/integrations/logos/generic.png" /> | ||
<p>"<a href="https://www.flaticon.com/free-icons/technology">Technology icons"</a> created by Freepik - Flaticon.</p> | ||
</li> |
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.
Yeah, @nagyem can you add a commit at the top of this PR correcting the quotation marks used here. We should be using <p>"<a href='https://iconscout.com/illustration/software-engineer-2043023'>Software engineer Illustration</a>"
@nagyem LGTM, can you move the last commit to be the first and improve its commit message based on https://zulip.readthedocs.io/en/latest/contributing/commit-discipline.html#commit-messages. Thanks! |
For some reason the logo shows up twice on the /attribution page. Let's also add a line break after Default integration logo:, so that the logo isn't squashed up against the heading. |
The integrations page looks good to me in manual testing! |
If an integration does not have a logo, then a generic bot logo will be assigned. This allows the use of logos in documentation. Automated tests verifythe creation of a generic logo when one is not given.
@alya I pushed the change and rebased to keep the commit history clean. I added two breaks because one was not sufficient. |
Thanks! Please update the /attributions screenshot in the PR description with the latest version. |
@alya Done! |
@timabbott This PR has been reviewed by @amanagr and me -- please take a look! |
Heads up @nagyem, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
4ec3636
to
88b200c
Compare
If an integration does not have a logo, then a generic bot logo will be assigned. This allows the use of logos in documentation. Automated tests verify the creation of a generic logo when one is not given. My initial implementation made a copy of
static/images/integrations/logos/generic.png
tostatic/images/integrations/logos/{name}.png
. I decided to instead just setself.logo_path=static/images/integrations/logos/generic.png
without making a copy because the django staticfiles manifest was not updated when the file got created, causing a ValueError on line 130 in integrations.pyreturn staticfiles_storage.url(self.logo_path)
The UI for the attribution is not particularly nice to look at. I think there needs to be more padding between the text and the image. Thoughts?
Fixes: #22582
Screenshots and screen captures:
Attribution:
Default logo used for "Generic Bot" in documentation:
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: