Skip to content

Conversation

@Michal-Dziedzinski
Copy link
Collaborator

Related issues

closes #2733

Short description and why it's useful

I added a label to the input that tells the user how many products of a given color and size are available. You can not enter a number greater than the quantity of products . When quantity is equal to 0, the input and the button are disabled.

Screenshots of visual changes before/after (if there are any)

Before:

Zrzut ekranu (12)

After:

Zrzut ekranu (11)

Which environment this relates to

Check your case. In case of any doubts please read about Release Cycle

  • Test version (https://test.storefrontcloud.io) - this is a new feature or improvement for Vue Storefront. I've created branch from develop branch and want to merge it back to develop
  • RC version (https://next.storefrontcloud.io) - this is a stabilisation fix for Release Candidate of Vue Storefront. I've created branch from release branch and want to merge it back to release
  • Stable version (https://demo.storefrontcloud.io) - this is an important fix for current stable version. I've created branch from hotfix or master branch and want to merge it back to hotfix

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility and no breaking changes)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

IMPORTANT NOTICE - Remember to update CHANGELOG.md with description of your change

Contribution and currently important rules acceptance

@Michal-Dziedzinski Michal-Dziedzinski added 1: Easy feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can P4: Nice to have Priority mark - it's nice to have and removed 1: Easy P4: Nice to have Priority mark - it's nice to have feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can labels Jul 2, 2019
@patzick patzick changed the base branch from release/v1.10 to develop July 3, 2019 10:21
Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

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

This branch is created from #3157, i've also changed base to develop.
Please always create branch from newest develop if you're adding features. (or newest release with stabilisation branches) read more about this here https://docs.vuestorefront.io/guide/basics/release-cycle.html

I'll hold review till #3157 is not merged.

@patzick patzick added the not ready for merge PR is holded. Needs some clarifications or things that need to be finished. label Jul 3, 2019
Copy link
Contributor

@lukeromanowicz lukeromanowicz left a comment

Choose a reason for hiding this comment

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

It's based on another task so it's hard to tell which files belong to this one and which of them don't. I migth have missed something. The code looks pretty good but again, it needs some refinements here and there

qty: product.stock ? product.stock.qty : 0,
status: product.stock
? product.stock.is_in_stock
? 'ok'
Copy link
Contributor

Choose a reason for hiding this comment

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

could we use consts defined at the top of the file for these statuses?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems to me that this will not improve readability in this case. Unless I do not see something;)

@pkarw
Copy link
Collaborator

pkarw commented Jul 13, 2019

@Michal-Dziedzinski can you please apply the suggested changes and resolve conflicts in order of merging this in?

@Michal-Dziedzinski
Copy link
Collaborator Author

product
It seems to me that we should in some way give the user to know that data on the quantity of products are fetched. It might be worth keeping products of all colors and sizes in memory and update them when switching product parameters/ @filrak @patzick

@pkarw pkarw requested review from lukeromanowicz and patzick July 16, 2019 06:45
@pkarw pkarw added the QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. label Jul 16, 2019
Copy link
Collaborator

@pkarw pkarw left a comment

Choose a reason for hiding this comment

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

I like this change; it's using the stock cache (by using stock/list) so it's cool. As another PR you can optimize it by:

  • adding loader right to the stock quantity fields while the data is loading,
  • use the volatile data from the product.stock (which is cached in elastic) do display the pre-cached info while loading the dynamic stock quantity

@filrak
Copy link
Collaborator

filrak commented Jul 16, 2019

@pkarw I think the loader should be a part of this PR. It's misleading yet simple to add ;)

@pkarw
Copy link
Collaborator

pkarw commented Jul 16, 2019

Ok! Michał can you add It Please?

Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

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

Blocked by #3157

@alinadivante
Copy link
Collaborator

@Michal-Dziedzinski @pkarw I think we should also inform users about the availability of items in group/bundle products. Now the only thing I see is inactive Add to cart button and there is no information why (e.g. For Sprite Yoga Companion Kit blundle product "Sprite Yoga Strap 8 foot" is not available and therefore the customer can not add this product to the cart)

Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

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

Just please change state modification from actions to mutations :)

@patzick patzick removed the not ready for merge PR is holded. Needs some clarifications or things that need to be finished. label Jul 18, 2019
Michal-Dziedzinski and others added 2 commits July 23, 2019 09:18
Co-Authored-By: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
Copy link
Collaborator

@pkarw pkarw left a comment

Choose a reason for hiding this comment

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

The strings needs to be passed thru i18n

Copy link
Collaborator

@patzick patzick left a comment

Choose a reason for hiding this comment

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

Just one thing and we're good to go:) nice job!

Copy link
Collaborator

@pkarw pkarw left a comment

Choose a reason for hiding this comment

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

The loader should be animated gif/svg - placed on the right side of the input box; no input box name to be changed please :-)

Michal-Dziedzinski and others added 2 commits July 23, 2019 09:35
Co-Authored-By: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
@Michal-Dziedzinski Michal-Dziedzinski requested a review from pkarw July 23, 2019 10:23
@ArturDivante
Copy link
Collaborator

Looks ok on branch :)

@ArturDivante ArturDivante added QA approved on branch Testers will add this label after positive check on specific branch. and removed QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. labels Jul 24, 2019
@pkarw pkarw merged commit 665f1e9 into develop Jul 25, 2019
@GabiDivante GabiDivante assigned GabiDivante and filrak and unassigned filrak and GabiDivante Aug 1, 2019
@GabiDivante GabiDivante added the QA approved after merge Testers will add this label after positive check on merged changes label Aug 1, 2019
@andrzejewsky andrzejewsky deleted the feature/2733 branch December 26, 2019 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA approved after merge Testers will add this label after positive check on merged changes QA approved on branch Testers will add this label after positive check on specific branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants