Skip to content

Commit

Permalink
Merge branch 'main' into MERX-930-view-products-link
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloud11PL authored Oct 7, 2024
2 parents a26d2cc + eb5ccbb commit 0e4014f
Show file tree
Hide file tree
Showing 35 changed files with 681 additions and 176 deletions.
5 changes: 0 additions & 5 deletions .changeset/clever-rocks-hide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/curvy-bikes-mate.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/fast-mirrors-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

Comment from tests results will now be displayed for cloud-deployments CORE release PRs
5 changes: 0 additions & 5 deletions .changeset/gentle-seahorses-tease.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/itchy-moose-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Clicking a select channel on a product list and then click close button clear filter state, so when you click again select button, only one channel filter will be selected
5 changes: 0 additions & 5 deletions .changeset/khaki-camels-double.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/perfect-feet-sneeze.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quiet-camels-raise.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quiet-roses-compete.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/silver-items-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

You can now see app's webhooks' event delivery attempts in app settings. These include last 6 failed or pending deliveries with their details: payload, status and date.
5 changes: 5 additions & 0 deletions .changeset/slow-mangos-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

You can now provide 0 variant price value during product creation
5 changes: 5 additions & 0 deletions .changeset/sour-balloons-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Removing not required dropdown attribue value no longer cause error
14 changes: 14 additions & 0 deletions .github/workflows/automation-tests-on-repository-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,18 @@ jobs:
CUSTOM_VERSION: ${{github.event.client_payload.custom_version }}
ADDITIONAL_TITLE: "Core automation test"
secrets: inherit

add-comment-to-release-pr:
needs: run-tests-on-release
runs-on: ubuntu-22.04
steps:
- name: add-comment-to-release-pr
env:
PR_NUMBER: ${{github.event.client_payload.release_pr }}
PR_COMMENT: ${{needs.run-tests-on-release.outputs.PR_COMMENT}}
run: |
export GITHUB_TOKEN=$( \
curl --request GET --url ${{ secrets.VAULT_URL}} --header "Authorization: JWT ${{ secrets.VAULT_JWT }}" | jq -r .token \
)
gh pr comment "$PR_NUMBER" --body "$PR_COMMENT" -R github.com/saleor/saleor-cloud-deployments
4 changes: 4 additions & 0 deletions .github/workflows/run-tests-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ on:
RUN_URL:
value: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
description: Url to job run
PR_COMMENT:
value: ${{ jobs.tests-complete.outputs.PR_COMMENT }}
description: Comment for release PR

jobs:
add-check-and-prepare-instance:
Expand Down Expand Up @@ -233,6 +236,7 @@ jobs:
timeout-minutes: 30
outputs:
TESTS_CONCLUSION: "${{ steps.send-slack-message.outputs.status }}"
PR_COMMENT: "${{ steps.send-slack-message.outputs.status }} - run details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
steps:
- uses: actions/checkout@v4

Expand Down
55 changes: 35 additions & 20 deletions src/apps/components/AppInstallPage/AppInstallPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { AppFetchMutation, AppInstallMutation } from "@dashboard/graphql";
import { SubmitPromise } from "@dashboard/hooks/useForm";
import { buttonMessages } from "@dashboard/intl";
import { useTheme } from "@dashboard/theme";
import { Box, Button, Skeleton, Spinner, Text } from "@saleor/macaw-ui-next";
import { Box, Button, Skeleton, Text } from "@saleor/macaw-ui-next";
import React from "react";
import { FormattedMessage, useIntl } from "react-intl";

Expand Down Expand Up @@ -52,25 +52,31 @@ export const AppInstallPage: React.FC<AppInstallPageProps> = ({
<DashboardCard>
<DashboardCard.Header>
<DashboardCard.Title data-test-id="app-installation-page-header">
{loading ? <Skeleton /> : intl.formatMessage(messages.title, { name })}
{loading ? (
<Skeleton __width="20ch" height={6} />
) : (
intl.formatMessage(messages.title, { name })
)}
</DashboardCard.Title>
</DashboardCard.Header>
<DashboardCard.Content className={classes.installCard}>
{loading ? (
<Spinner />
) : (
<div className={classes.installAppContainer}>
<Box
width={12}
height={12}
display="flex"
placeItems="center"
borderRadius={2}
overflow="hidden"
>
<img src={getSaleorLogoUrl()} alt="Saleor" />
<div className={classes.installAppContainer}>
<Box
width={12}
height={12}
display="flex"
placeItems="center"
borderRadius={2}
overflow="hidden"
>
<img src={getSaleorLogoUrl()} alt="Saleor" />
</Box>
<img src={plusIcon} alt="" />
{loading ? (
<Box width={12} height={12} backgroundColor="default1">
<Skeleton width={12} height={12} />
</Box>
<img src={plusIcon} alt="" />
) : (
<AppAvatar
size={12}
logo={
Expand All @@ -81,8 +87,8 @@ export const AppInstallPage: React.FC<AppInstallPageProps> = ({
: undefined
}
/>
</div>
)}
)}
</div>
</DashboardCard.Content>
</DashboardCard>

Expand All @@ -91,12 +97,21 @@ export const AppInstallPage: React.FC<AppInstallPageProps> = ({
<DashboardCard>
<DashboardCard.Header>
<DashboardCard.Title>
{loading ? <Skeleton /> : intl.formatMessage(messages.permissionsTitle)}
{intl.formatMessage(messages.permissionsTitle)}
</DashboardCard.Title>
</DashboardCard.Header>
<DashboardCard.Content>
{loading ? (
<Skeleton />
<>
<Skeleton __width="30%" height={6} marginBottom={2} />

<Skeleton height={4} __width="150px" marginBottom={2} />
<Skeleton height={4} __width="120px" />

<Hr className={classes.installSpacer} />

<Skeleton height={3} __width="50%" />
</>
) : (
<>
<Text className={classes.installPermissionTitle}>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { DateTime } from "@dashboard/components/Date";
import { EventDeliveryAttemptFragment } from "@dashboard/graphql";
import { Box, Text } from "@saleor/macaw-ui-next";
import React from "react";

interface AppWebhooksAttemptDetailsProps {
attempt: EventDeliveryAttemptFragment;
}

export const AppWebhooksAttemptDetails: React.FC<AppWebhooksAttemptDetailsProps> = ({
attempt,
}) => {
const { createdAt, status, responseStatusCode, response, id } = attempt;

return (
<Box
display="flex"
flexDirection="column"
paddingX={2}
borderRadius={4}
backgroundColor={{
hover: "default1Hovered",
}}
paddingTop={1}
borderWidth={1}
>
<Box display="flex" gap={4} key={id}>
<Text display="block" size={3} fontWeight="bold">
<DateTime plain date={createdAt} />
</Text>

<Box display="block" marginLeft="auto">
<Text color="default2">HTTP</Text>{" "}
<Text color="critical1" fontWeight="bold" marginRight={4}>
{responseStatusCode}
</Text>
<Text color="default2">Status</Text>:{" "}
<Text color={status === "FAILED" ? "critical1" : "default1"} fontWeight="bold">
{status}
</Text>
</Box>
</Box>

<Box paddingTop={4} paddingBottom={2}>
<Text
// @ts-expect-error - "pre" is missing in Text props
as="pre"
wordBreak="break-all"
maxWidth="100%"
size={3}
style={{ whiteSpace: "pre-wrap" }}
>
{response}
</Text>
</Box>
</Box>
);
};
Loading

0 comments on commit 0e4014f

Please sign in to comment.