Skip to content

Comments

Search for product variants by SKU in quick search, show media#5495

Merged
Cloud11PL merged 22 commits intomainfrom
BCK-1498-sku-search-console
Mar 26, 2025
Merged

Search for product variants by SKU in quick search, show media#5495
Cloud11PL merged 22 commits intomainfrom
BCK-1498-sku-search-console

Conversation

@Cloud11PL
Copy link
Contributor

@Cloud11PL Cloud11PL commented Mar 20, 2025

Scope of the change

  • Shows catalogue's items media (if available)
  • Search by SKU
  • Added product variant items

Normal search:
CleanShot 2025-03-21 at 11 24 20

Query is SKU:
CleanShot 2025-03-21 at 11 48 47

@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2025

🦋 Changeset detected

Latest commit: 66a60ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
saleor-dashboard Patch

Not sure what this means? Click here to learn what changesets are.

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

@codecov
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 43.75000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 63.15%. Comparing base (198743f) to head (66a60ce).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../components/NavigatorSearch/NavigatorThumbnail.tsx 26.66% 11 Missing ⚠️
...ponents/NavigatorSearch/NavigatorSearchSection.tsx 11.11% 8 Missing ⚠️
src/components/NavigatorSearch/modes/catalog.ts 66.66% 4 Missing ⚠️
src/components/NavigatorSearch/modes/customers.ts 0.00% 3 Missing ⚠️
src/components/NavigatorSearch/NavigatorSearch.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5495      +/-   ##
==========================================
+ Coverage   63.14%   63.15%   +0.01%     
==========================================
  Files        1290     1292       +2     
  Lines       22329    22368      +39     
  Branches     4614     4610       -4     
==========================================
+ Hits        14099    14127      +28     
- Misses       7683     8205     +522     
+ Partials      547       36     -511     

☔ 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.

@github-actions github-actions bot temporarily deployed to pr-5495 March 20, 2025 14:14 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 20, 2025 15:13 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2025

Differences Found

✅ No packages or licenses were added.

Summary

Expand
License Name Package Count Packages
0BSD 1
Packages
  • tslib
BlueOak-1.0.0 1
Packages
  • path-scurry
CC0-1.0 1
Packages
  • type-fest
MIT/X11 1
Packages
  • nub
MPL-1.1 1
Packages
  • harmony-reflect
MPL-2.0 1
Packages
  • dompurify
Public Domain 1
Packages
  • jsonify
Python-2.0 1
Packages
  • argparse
WTFPL 1
Packages
  • opener
CC-BY-4.0 2
Packages
  • @saleor/macaw-ui
  • caniuse-lite
<<missing>> 3
Packages
  • busboy
  • saleor-dashboard
  • streamsearch
BSD-2-Clause 24
Packages
  • @typescript-eslint/parser
  • @typescript-eslint/typescript-estree
  • browser-process-hrtime
  • css-select
  • css-what
  • domelementtype
  • domhandler
  • domutils
  • dotenv
  • dotenv-expand
  • entities
  • escodegen
  • eslint-scope
  • espree
  • esprima
  • esrecurse
  • estraverse
  • esutils
  • nth-check
  • stringify-object
  • And 4 more...
BSD-3-Clause 45
Packages
  • @humanwhocodes/object-schema
  • @sentry/cli
  • @sentry/cli-darwin
  • @sentry/cli-linux-arm
  • @sentry/cli-linux-arm64
  • @sentry/cli-linux-i686
  • @sentry/cli-linux-x64
  • @sentry/cli-win32-i686
  • @sentry/cli-win32-x64
  • @sinonjs/commons
  • @sinonjs/fake-timers
  • abab
  • asn1js
  • babel-plugin-istanbul
  • charenc
  • chroma-js
  • crypt
  • diff
  • esquery
  • exenv
  • And 25 more...
Apache-2.0 47
Packages
  • @ampproject/remapping
  • @editorjs/editorjs
  • @humanwhocodes/config-array
  • @humanwhocodes/module-importer
  • @opentelemetry/api
  • @opentelemetry/semantic-conventions
  • @playwright/test
  • @swc/core
  • @swc/core-darwin-arm64
  • @swc/core-darwin-x64
  • @swc/core-linux-arm-gnueabihf
  • @swc/core-linux-arm64-gnu
  • @swc/core-linux-arm64-musl
  • @swc/core-linux-x64-gnu
  • @swc/core-linux-x64-musl
  • @swc/core-win32-arm64-msvc
  • @swc/core-win32-ia32-msvc
  • @swc/core-win32-x64-msvc
  • @swc/counter
  • @swc/types
  • And 27 more...
ISC 49
Packages
  • @istanbuljs/load-nyc-config
  • @saleor/app-sdk
  • anymatch
  • boolbase
  • browser-stdout
  • cli-width
  • cliui
  • electron-to-chromium
  • fastq
  • flatted
  • fs.realpath
  • get-caller-file
  • get-own-enumerable-property-symbols
  • glob
  • glob-parent
  • graceful-fs
  • inflight
  • inherits
  • ini
  • isexe
  • And 29 more...
MIT 1146
Packages
  • @adobe/css-tools
  • @apollo/client
  • @ardatan/relay-compiler
  • @ardatan/sync-fetch
  • @babel/code-frame
  • @babel/compat-data
  • @babel/core
  • @babel/generator
  • @babel/helper-annotate-as-pure
  • @babel/helper-compilation-targets
  • @babel/helper-create-class-features-plugin
  • @babel/helper-member-expression-to-functions
  • @babel/helper-module-imports
  • @babel/helper-module-transforms
  • @babel/helper-optimise-call-expression
  • @babel/helper-plugin-utils
  • @babel/helper-replace-supers
  • @babel/helper-simple-access
  • @babel/helper-skip-transparent-expression-wrappers
  • @babel/helper-string-parser
  • And 1126 more...

@github-actions github-actions bot temporarily deployed to pr-5495 March 20, 2025 15:50 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 21, 2025 10:54 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 21, 2025 11:05 Destroyed
@Cloud11PL Cloud11PL added the run pw-e2e Run e2e (basic suite from PR automation) label Mar 21, 2025
@github-actions github-actions bot temporarily deployed to pr-5495 March 21, 2025 11:23 Destroyed
@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2025

merge-reports: Run #5091

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
235 235 0 0 0 0 0 5m20s

🎉 All tests passed!

Github Test Reporter by CTRF 💚

🔄 This comment has been updated

@github-actions github-actions bot temporarily deployed to pr-5495 March 21, 2025 11:40 Destroyed
@Cloud11PL Cloud11PL marked this pull request as ready for review March 21, 2025 12:08
@Cloud11PL Cloud11PL requested a review from a team March 21, 2025 12:08
@github-actions github-actions bot temporarily deployed to pr-5495 March 21, 2025 13:40 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 21, 2025 14:20 Destroyed
witoszekdev
witoszekdev previously approved these changes Mar 21, 2025
Comment on lines 108 to 111
variant: {
defaultMessage: "Variant",
id: "OK5+Fh",
},
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: I think we might have string "Variant" somewhere else for translations, so maybe we can re-use it here?

@github-actions github-actions bot temporarily deployed to pr-5495 March 24, 2025 09:16 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 24, 2025 09:27 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 24, 2025 09:51 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 24, 2025 14:14 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 25, 2025 09:25 Destroyed
poulch
poulch previously approved these changes Mar 25, 2025
display="flex"
alignItems="center"
justifyContent="center"
__padding="2px"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
__padding="2px"
padding={0.5}


import { searchInCatalog } from "./catalog";

describe("searchInCatalog", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
describe("searchInCatalog", () => {
describe("NavigatorSearch / modes / searchInCatalog", () => {

Comment on lines 7 to 9
const intl = {
formatMessage: ({ defaultMessage }) => defaultMessage,
} as IntlShape;
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: use intlMock

@github-actions github-actions bot temporarily deployed to pr-5495 March 25, 2025 10:50 Destroyed
@github-actions github-actions bot temporarily deployed to pr-5495 March 25, 2025 11:11 Destroyed
@Cloud11PL Cloud11PL requested a review from poulch March 25, 2025 11:19
@Cloud11PL Cloud11PL enabled auto-merge (squash) March 25, 2025 16:33
@github-actions github-actions bot temporarily deployed to pr-5495 March 25, 2025 16:35 Destroyed
@Cloud11PL Cloud11PL merged commit d4f082e into main Mar 26, 2025
16 of 17 checks passed
@Cloud11PL Cloud11PL deleted the BCK-1498-sku-search-console branch March 26, 2025 09:01
poulch added a commit that referenced this pull request Mar 27, 2025
* add variant search by SKU

* show media if available

* changeset + json messages

* add test

* cleanup

* add loading state to thumbnails

* small UI changes

* properly hide sku

* handle label as react node

* fix type issues

* i18n

* Add missing commments

* restore original cmd

* add description to messages

* cr fixes

---------

Co-authored-by: Paweł Chyła <chyla1988@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run pw-e2e Run e2e (basic suite from PR automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants