Skip to content

PWA-3450 : Commit for initial package after conversion from TypeScrip… #4462

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

del15881
Copy link
Collaborator

@del15881 del15881 commented May 8, 2025

…t to React

Description

This commit marks the Initial PWA LiveSearch Package, after conversion of the Referenced Repository (https://github.com/adobe/storefront-product-listing-page).

Currently It only has the feature to add Live Search Results to Category and Search Results Landing pages.

It currently is missing the Search Autocomplete AKA Search Popover feature.

The commit to work requires the Magento_LiveSearchGraphQlPwa module to be installed on Adobe Commerce Backend.
This module is currently available only for internal use.

Once installed the Live Search to be initialised on PLP and SRLP , it requires changes in local-intercept.js file of PWA Studio.

Example (local-intercept.js) :

`
const { Targetables } = require('@magento/pwa-buildpack');

function localIntercept(targets) {
const liveSearchTargetables = Targetables.using(targets);

//searchPage settings
const VeniaSearchPage = liveSearchTargetables.reactComponent(
    '@magento/venia-ui/lib/components/SearchPage/searchPage.js'
);

const LiveSearchPage = VeniaSearchPage.addImport(
    "import LiveSearchSRLPLoader from '@magento/venia-pwa-live-search/src/containers/LiveSearchSRLPLoader'"
);

VeniaSearchPage.insertBeforeJSX(
    'div className={classes.sidebar}',
    `<${LiveSearchPage} />`
);

VeniaSearchPage.removeJSX('div className={classes.sidebar}');
VeniaSearchPage.removeJSX('div className={classes.searchContent}');

//category page settings
const VeniaCategoryPage = liveSearchTargetables.reactComponent(
    '@magento/venia-ui/lib/RootComponents/Category/categoryContent.js'
);

const LiveCategoryContent = VeniaCategoryPage.addImport(
    "import LiveSearchPLPLoader from '@magento/venia-pwa-live-search/src/containers/LiveSearchPLPLoader'"
);

VeniaCategoryPage.insertBeforeJSX(
    '<Breadcrumbs categoryId={categoryId} />',
    `<${LiveCategoryContent} categoryId={categoryId} />`
);

VeniaCategoryPage.removeJSX('<Breadcrumbs categoryId={categoryId} />');
VeniaCategoryPage.removeJSX('<StoreTitle />');
VeniaCategoryPage.removeJSX('article className={classes.root}');

}

module.exports = localIntercept;

`

Related Issue

https://jira.corp.adobe.com/browse/PWA-3450

Closes #PWA-3450.

Acceptance

Verification Stakeholders

Specification

Verification Steps

Test scenario(s) for direct fix/feature

Test scenario(s) for any existing impacted features/areas

Test scenario(s) for any Magento Backend Supported Configurations

Is Browser/Device testing needed?

Any ad-hoc/edge case scenarios that need to be considered?

Screenshots / Screen Captures (if appropriate)

Breaking Changes (if any)

Checklist

  • I have added tests to cover my changes, if necessary.
  • I have added translations for new strings, if necessary.
  • I have updated the documentation accordingly, if necessary.

@del15881 del15881 requested a review from glo82145 May 8, 2025 13:25
@del15881 del15881 self-assigned this May 8, 2025
@del15881 del15881 added version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump. pkg:extensions labels May 8, 2025
@pwa-studio-bot
Copy link
Collaborator

pwa-studio-bot commented May 8, 2025

Fails
🚫

node failed.

🚫

The following file(s) did not pass ESLint. Execute yarn run lint locally for more details

packages/extensions/venia-pwa-live-search/src/hooks/useAccessibleDropdown.js
packages/extensions/venia-pwa-live-search/src/hooks/useLiveSearchPLPConfig.js
packages/extensions/venia-pwa-live-search/src/hooks/useLiveSearchSRLPConfig.js
packages/extensions/venia-pwa-live-search/src/queries/customerGroupCode.gql.js
packages/extensions/venia-pwa-live-search/src/queries/liveSearchPlpConfigs.gql.js
packages/extensions/venia-pwa-live-search/src/queries/liveSearchPopoverConfigs.gql.js
🚫

The following file(s) were not formatted with prettier. Make sure to execute yarn run prettier locally prior to committing.

packages/extensions/venia-pwa-live-search/src/hooks/useLiveSearchPopoverConfig.js
Messages
📖

Associated JIRA tickets: PWA-3450.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next pr-test build run (assuming they are fixed).
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

Log

ERROR ON TASK: prettierCheck


ERROR ON TASK: eslintCheck


Error:  Danger had errors running. See message(s) above for more details.
danger-results://tmp/danger-results.json

Generated by 🚫 dangerJS against 41e7a4c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:extensions version: Major This changeset includes incompatible API changes and its release necessitates a Major version bump.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants