-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Display custom Apps' logos #3749
Conversation
@@ -39,6 +41,18 @@ export const AppInstallPage: React.FC<AppInstallPageProps> = ({ | |||
}) => { | |||
const intl = useIntl(); | |||
const classes = useStyles(); | |||
const { theme } = useTheme(); | |||
|
|||
const getSaleorLogoUrl = () => { |
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.
We already have a themeable Saleor logo in the side navigation. Is the code duplicated, or was there another reason?
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.
Previously it was using a fixed image. In this diff I replaced it to one that is used in the navigation. Its not themable - these are 2 different PNGs
App img during the installation process is not visible on the app list view from the start - default img is visible and then a new one is placed in its place or sometimes new img is not replacing the default one at all Nagranie.z.ekranu.2023-06-13.o.16.44.02.mov |
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.
Removed test. It tests nothing and is very flaky
src/fragments/apps.ts
Outdated
brand { | ||
logo { | ||
default | ||
} | ||
} |
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.
We should set logo thumbnail size
and format
arguments - it can significantly reduce loading times. Something like this should work:
default(size: 64, format:WEBP)
sorry for not mentioning this earlier
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.
TIL :) I will update it
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.
@przlada updated. base64 looks broken to me, please verify
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.
fixed
450d8ee
* wip * implement logo in all contexts * fix types * Improve icons rendering * Reuse App Header in Manage App page * Remove loading fallback icon for official Saleor apps. It will be fetched with manifest now * Imprve app fallback icon * wip fix tests * Remove useless test * Add sizes for logos queries * Fix thumbnail size
Displays logo from Manifest (available from 3.14) in apps list, app installation and app details
To be tested with App with logo:
https://saleor-app-products-feed-git-app-logo-saleorcommerce.vercel.app/api/manifest
or any preview URLs from this PR saleor/apps#552 (comment)
(copy preview URL + add
/api/manifest
QA:
brand.logo.default
field in manifest will not display custom logo - will fallback to generic iconbrand.logo.default
will use this logo in following places: app installation page, app list - during installation, app list - after installation, app detailsOther changes
Screenshots
Pull Request Checklist
data-test-id
are added for new elementsTest environment config
API_URI=https://automation-dashboard.staging.saleor.cloud/graphql/
APPS_MARKETPLACE_API_URI=https://apps.staging.saleor.io/api/v2/saleor-apps
Do you want to run more stable tests?
To run all tests, just select the stable checkbox. To speed up tests, increase the number of containers. Tests will be re-run only when the "run e2e" label is added.
CONTAINERS=1