-
-
Notifications
You must be signed in to change notification settings - Fork 44
Fix formatting table icons #1016
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
Conversation
Co-authored-by: Barry Pollard <[email protected]>
src/js/techreport/tableLinked.js
Outdated
@@ -96,12 +95,13 @@ class TableLinked { | |||
cell.classList.add('app-cell'); | |||
|
|||
const img = document.createElement('span'); | |||
const imgUrl = `https://cdn.httparchive.org/static/icons/${formattedApp}.png`; | |||
const imgUrl = `https://cdn.httparchive.org/static/icons/${encodeURI(app)}.png`; |
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.
@sarahfossheim please use the icon name from the technology data.
It is not always equal to technology name.
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.
@max-ostapenko I see the example you linked to ends with .svg
, does this mean the file format is expected to come from there as well? Because not all of them seem to have the correct format.
For example:
{
"technology": "1C-Bitrix",
"category": "CMS, Ecommerce",
"description": "1C-Bitrix is a system of web project management, universal software for the creation, support and successful development of corporate websites and online stores.",
"icon": "1C-Bitrix.svg",
"origins": {
"mobile": 85308,
"desktop": 58771
}
}
"icon": "1C-Bitrix.svg"
would turn into:
https://cdn.httparchive.org/static/icons/1C-Bitrix.svg
But that gives the following error:
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>
Whereas https://cdn.httparchive.org/static/icons/1C-Bitrix.png loads the image:
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.
Oh, you're right.
Let's use the full name WITH extension.
I'll fix the extension in tech data.
The icon property comes from a submitted detection rule, but then we do conversion to PNG.
At first, I thought I could adjust the icon names to your approach with technology names, but there are a number of icons that are reused by multiple technologies.
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.
Now live.
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.
Will update tomorrow to use the icon name with extension then 💯
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.
@max-ostapenko Is it normal that some techs still return an error? I guess some we just don't have an icon for?
For example this still gives an error:
https://cdn.httparchive.org/static/icons/Skilldo.png
{
"technology": "Skilldo",
"category": "CMS",
"description": "Skilldo is a content management system written in PHP and paired with a MySQL or MariaDB database.",
"icon": "Skilldo.png",
"origins": {
"mobile": 2027,
"desktop": 1573
}
}
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's an issue on icons pipeline - icon exists, but wasn't picked up in the conversion step.
Need to adjust github action to keep all in sync - a couple of days for that.
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.
LGTM, once @max-ostapenko answers your question.
@sarahfossheim when I try this branch all the icons are broken. Does it need an update? |
It may be a backend issue: path in API inconsistent with location. |
Yes but the |
@tunetheweb I have a mixed set of results when I test:
So seemed to be a combo of the front-end like you mentioned (fixed now 🤞🏻) and the API like @max-ostapenko suggested. Doesn't work31 techs: (URL)
![]() Works30 techs: (URL)
![]() |
@tunetheweb also I see there's a conflict with the main branch meanwhile, will solve after our call today |
@sarahfossheim I resynced the icons. Do you still notice issues? |
@max-ostapenko icons work for me :) Also updated the dropdowns to |
Fixes: #1012
Name of the icons is now formatted differently, changing
to
%20
. Example from the issues (Framer Sites) shows an icon in the table now.