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

Enable standard products #2025

Merged
merged 25 commits into from
Mar 11, 2025
Merged

Enable standard products #2025

merged 25 commits into from
Mar 11, 2025

Conversation

HaGuesto
Copy link
Member

@pylipp functionally almost everything is in there. So, you should be able to test already.
I will still work on it, but the rest should mostly be styling.

@HaGuesto HaGuesto requested a review from pylipp March 11, 2025 11:28
@HaGuesto
Copy link
Member Author

Copy link

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.74%. Comparing base (db294dc) to head (d1ce20e).
Report is 26 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2025   +/-   ##
=======================================
  Coverage   82.74%   82.74%           
=======================================
  Files         257      257           
  Lines       16170    16170           
  Branches     2490     2490           
=======================================
  Hits        13380    13380           
  Misses       2759     2759           
  Partials       31       31           
Flag Coverage Δ
backend 99.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@pylipp pylipp left a comment

Choose a reason for hiding this comment

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

Functional review

It does work per se to enable a standard product.

As you said, styling changes should still be applied, e.g. making the gender/category selectboxes unclickable

Copy link
Member Author

@HaGuesto HaGuesto left a comment

Choose a reason for hiding this comment

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

code reviewed it again

@HaGuesto HaGuesto merged commit db555f6 into master Mar 11, 2025
10 of 11 checks passed
@HaGuesto HaGuesto deleted the feature/enable-standard-products branch March 11, 2025 18:45
.optional()
.transform((value) => (value === "" ? undefined : value)),
inShop: z.boolean().optional(),
price: z
Copy link
Contributor

@pylipp pylipp Mar 12, 2025

Choose a reason for hiding this comment

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

@HaGuesto JS allows a max value of 2^53 for integers but the graphql spec only allows up to 2^31-1: https://spec.graphql.org/October2021/#sec-Int; adding a lower-than validation here would help to avoid throwing an error in the BE

break;
case "InvalidPriceError":
triggerError({
message: "Price must be a positive integer number.",
Copy link
Contributor

Choose a reason for hiding this comment

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

technically non-negative 😉

import { selectedBaseAtom } from "stores/globalPreferenceStore";
import { z } from "zod";

const SingleSelectOptionSchema = z.object({
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing exists in BoxEdit.tsx, maybe combine at some point

isReadOnly
isDisabled
_disabled={{ color: "black" }}
placeholder="Please select a standard product."
Copy link
Contributor

Choose a reason for hiding this comment

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

Placeholders are not correct but are never shown either.

@@ -44,6 +45,10 @@ export const STANDARD_PRODUCT_BASIC_FIELDS_FRAGMENT = graphql(`
id
name
}
sizeRange {
id
label
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI the SizeRange type also has a name field in the API serving as alias for label

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