Skip to content

Conversation

@wagnerlduarte
Copy link
Collaborator

@wagnerlduarte wagnerlduarte commented Sep 22, 2021

What problem is this solving?

Added a new option to you make a math expression to sort sellers on Buybox Context. You can use this document to create expressions with seller variables.
Now it's possible use the productPrice and shippingPrice seller variables to create a expression to sort sellers.
We are working to add more variables in the next implementations. This is an initial implementation to test the solution.

How to test it?

Workspace

You can access Site Editor and create your expression like image bellow:

image

How does this PR make you feel? 🔗

@wagnerlduarte wagnerlduarte self-assigned this Sep 22, 2021
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Sep 22, 2021

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Sep 22, 2021

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@github-actions
Copy link

github-actions bot commented Sep 22, 2021

Fails
🚫

We follow keepachangelog standards.

Please, change the file CHANGELOG.md adding a small summary of your changes under the [Unreleased] section. Example:

 ## [Unreleased]

+ ### Fixed
+ - Issue with image sizing in the SKU Selector.

Possible types of changes:

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for soon-to-be removed features.
  • Removed for now removed features.
  • Fixed for any bug fixes.
  • Security in case of vulnerabilities.

Generated by 🚫 dangerJS against c22d4f7

Base automatically changed from feature/BRPA-340-seller-table to master September 22, 2021 17:06
)

const parser = new Parser()
const expr = parser.parse(expression)

Choose a reason for hiding this comment

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

What does the parse function do if the expression is invalid? (very interesting solution btw; sorting sellers by a custom expression seems to be a very customizable/powerful approach 😄)

Oh, and by invalid, I mean a non-empty but incorrect expression.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question! Apparently the application breaks with a invalid expression 😆😢
I will think about a solution for this problem 👨‍🦯

Copy link

@ConradoClark ConradoClark left a comment

Choose a reason for hiding this comment

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

LGTM

@wagnerlduarte wagnerlduarte merged commit 30e4649 into master Sep 23, 2021
@wagnerlduarte wagnerlduarte deleted the feature/BRPA-352-sort-by-expression branch September 23, 2021 16:24
@vtex-io-docs-bot
Copy link

Beep boop 🤖 That's ok, I created an issue for this so we don't forget

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