Skip to content
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

Feature: Migrate result variants selector component #1438

Merged
merged 12 commits into from
Apr 8, 2024

Conversation

annacv
Copy link
Contributor

@annacv annacv commented Mar 27, 2024

Migrate the result variant selector component:

  • Replaced XInject decorator with Vue native one.
  • Add array checking in hybrid inject to return the injected array object as a ref, to be able to watch it.

Motivation and context

Proceed to Vue 3 migration. At least, Vue native inject is being used, otherwise, for some reason using hybrid inject the 'reset the selected variants if the result changes' test was failing.

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-3750.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

It can be tested by using a local build inside oysho's customer's setup and checking result component behavior & events in Vue DevTools:

  • When a color variant is selected, the result's image is updated accordingly and the click event is fired with correct metadata (color's id, name and image).
  • When a size is selected (hovering the add2Cart button a size's variants would be displayed), the SizeAdd2Cart event is fired with the correct metadata (the result and the size objects with the corresponding color and size information).

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@annacv annacv changed the title Feature: Migrate result variants selector & provider Feature: Migrate result variants selector component Apr 2, 2024
@annacv annacv marked this pull request as ready for review April 2, 2024 07:30
@annacv annacv requested a review from a team as a code owner April 2, 2024 07:30
Copy link
Contributor

@lauramargar lauramargar left a comment

Choose a reason for hiding this comment

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

gj!!

@lauramargar lauramargar merged commit 1e6d681 into main Apr 8, 2024
4 checks passed
@lauramargar lauramargar deleted the feature/EMP-3750-Migrate-result-variant-selector branch April 8, 2024 10:38
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.

3 participants