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

feat: support between predicates #947

Merged
merged 1 commit into from
Mar 20, 2023
Merged

feat: support between predicates #947

merged 1 commit into from
Mar 20, 2023

Conversation

hein-j
Copy link
Contributor

@hein-j hein-j commented Mar 17, 2023

Problem

predicates with operator between are currently not supported because it requires 2 operands.

Solution

  1. add a way to handle 2 operands
  2. resolve between predicates into combined predicate of le and ge

Additional Notes

Alternatives explored:

  • Adding operandList: string[] to StudioComponentPredicate to handle multiple operands: was advised against bloating model.
  • Changing the createDataStorePredicate helper to handle 2 operands: still an option. Breaking down the between predicate just avoided 1) submitting change to amplify-ui and 2) waiting for the release and 3) updating Studio w/ the release and updating CLI dep warning w/ the release

Links

Ticket

GitHub issue _____

Other links

Verification

Manual tests

Automated tests

  • Unit tests added/updated
  • E2E tests added/updated
  • N/A - (provide a reason)
  • deferred - (provide GitHub issue for tracking)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2023

Codecov Report

Merging #947 (9eac9c7) into main (6e1462a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #947      +/-   ##
==========================================
+ Coverage   92.97%   92.98%   +0.01%     
==========================================
  Files         120      120              
  Lines        5238     5248      +10     
  Branches     1549     1552       +3     
==========================================
+ Hits         4870     4880      +10     
  Misses        347      347              
  Partials       21       21              
Impacted Files Coverage Δ
...gen-ui-react/lib/react-studio-template-renderer.ts 91.94% <100.00%> (+0.03%) ⬆️
packages/codegen-ui/lib/renderer-helper.ts 86.95% <100.00%> (+2.74%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e1462a...9eac9c7. Read the comment docs.

@hein-j hein-j marked this pull request as ready for review March 17, 2023 21:15
@hein-j hein-j requested a review from a team as a code owner March 17, 2023 21:15
@hein-j hein-j force-pushed the between-predicate branch from a173180 to 9eac9c7 Compare March 17, 2023 21:57
Copy link
Contributor

@Jshhhh Jshhhh left a comment

Choose a reason for hiding this comment

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

LGTM

@Jshhhh Jshhhh merged commit fa0daaf into main Mar 20, 2023
@Jshhhh Jshhhh deleted the between-predicate branch March 20, 2023 19:34
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.

4 participants