Skip to content

Fix bulk gift card re-rendering#5755

Merged
kzuraw merged 2 commits intomainfrom
fix-bulk-gift-card-rerender
Aug 1, 2025
Merged

Fix bulk gift card re-rendering#5755
kzuraw merged 2 commits intomainfrom
fix-bulk-gift-card-rerender

Conversation

@kzuraw
Copy link
Contributor

@kzuraw kzuraw commented Jul 31, 2025

Scope of the change

This PR fixes gift card modal re-rendering issues. I also removed @ts-ignore, barrel file and default export.

Modal:
2025-07-31 at 14 35 47 - CleanShot@2x

@kzuraw kzuraw requested a review from a team as a code owner July 31, 2025 12:36
@changeset-bot
Copy link

changeset-bot bot commented Jul 31, 2025

⚠️ No Changeset found

Latest commit: 7a9dd38

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jul 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
saleor-dashboard-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2025 0:38am

@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.37%. Comparing base (8415693) to head (e4c830d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5755      +/-   ##
==========================================
+ Coverage   66.35%   66.37%   +0.01%     
==========================================
  Files        1456     1457       +1     
  Lines       25366    25381      +15     
  Branches     5004     5204     +200     
==========================================
+ Hits        16832    16847      +15     
+ Misses       8488     7965     -523     
- Partials       46      569     +523     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

onSubmit={handleSubmit}
/>
)}
<GiftCardBulkCreateDialogForm
Copy link
Member

Choose a reason for hiding this comment

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

shouldnt it incldue prop loading={loadingChannelCurrencies}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope - it turns out loading was only for GiftCardCreateMoneyInput - now this component has loading inside.

* This helps avoid unnecessary network requests when the channel currencies data is already available.
*/
export function useChannelCurrenciesWithCache() {
const client = useApolloClient();
Copy link
Member

Choose a reason for hiding this comment

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

why this is not cached with apollo? I mean we can't create a wrapper for every object and appollo supports that

https://www.apollographql.com/docs/react/caching/overview

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH I don't know but if I didn't used custom hook useChannelQuery gets triggered - maybe we should use useQuery instead of custom generated hooks?

@kzuraw kzuraw merged commit 45eb0c4 into main Aug 1, 2025
18 of 19 checks passed
@kzuraw kzuraw deleted the fix-bulk-gift-card-rerender branch August 1, 2025 08:08
kzuraw added a commit that referenced this pull request Aug 1, 2025
* Fix bulk gift card re-rendering

* Add changeset
kzuraw added a commit that referenced this pull request Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants