Skip to content

Conversation

@bartoszherba
Copy link
Collaborator

@bartoszherba bartoszherba commented May 26, 2022

  • remove most obvious and outdated todos
  • fix type issues in the shipping component
  • update customer login and registration types
  • update isInCart method to simplify expected parameters
  • add new method in useWishlist - addOrRemoveItem
  • remove loadWishlistItemsCounr params
  • remove ProductSearchParams interface
  • remove getFormattedPrice getter as it was not used
  • remove AgnosticOrderStatus interface

Related Issue

Motivation and Context

Resolve TODOs

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

- remove most obvious and outdated todos
@bartoszherba bartoszherba marked this pull request as draft May 26, 2022 07:12
ApplyCouponToCartMutationVariables,
} from '../../types/GraphQL';
import applyCouponToCartMutation from './applyCouponToCart';
// @TODO : Add Mutation FROM CodeGEN
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not think that this is important


const moduleOptions = JSON.parse('<%= JSON.stringify(options) %>');

// TODO should be moved to THEME and expose consistent cookie management API
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

By default, all todos in composable package are abandoned

Copy link
Contributor

Choose a reason for hiding this comment

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

this is already done anyway

.addVirtualProductsToCart
.cart as unknown as Cart;
default:
// todo implement other options
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

already done


if (externalCheckout.enable) {
if (userToken && cartToken) {
// @TODO: Implements Multiple Store
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are going to work on the external checkout in dedicated tasks


return bundleProductData?.addProductsToWishlist?.wishlist ?? {};
default:
// todo implement other options
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

obsolete

special: specialPrice || 0,
// @ts-ignore
credit: Math.round(specialPrice / 10),
// @TODO: Who set this installment value?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

By default, all todos in composable package are abandoned

return null;
}

// TODO get correct data from api
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

By default, all todos in composable package are abandoned

() => state.value?.method_code && !isLoading.value,
);
/**
* @TODO: Do not run the setShippingMethodsOnCart mutation on in-store pickup orders.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not really understand this [05.2021]

*/
query: Request;

// TODO: Add code sample
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have the task for this M2-352

const productPrice = computed(() => getGroupedProductPriceCommand(props.product));
const productSpecialPrice = 0; // TODO add logic for special price calculation;
const productSpecialPrice = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will be addressed M2-603

- remove AgnosticOrderStatus interface
- remove getFormattedPrice getter as it was not used
- remove ProductSearchParams interface
- remove loadWishlistItemsCounr params
- add new method in useWishlist - addOrRemoveItem
@bartoszherba bartoszherba force-pushed the M2-535-resolve-all-tod-os-in-code branch from cc5f9bc to ecdc77b Compare May 26, 2022 09:33
- update isInCart method to simplify expected parameters
- update customer login and registration types
@bartoszherba bartoszherba force-pushed the M2-535-resolve-all-tod-os-in-code branch from 9d2a658 to db0d52a Compare May 26, 2022 11:05
- fix type issues in the shipping component
@bartoszherba bartoszherba force-pushed the M2-535-resolve-all-tod-os-in-code branch from db0d52a to 44fc29a Compare May 26, 2022 11:11
const numericAddressId = Number.parseInt(props.addressId, 10); // because in below find(), CustomerAddress['id'] is numeric
useFetch(async () => {
const addressesData = await addressesComposable.load(); // TODO don't fetch all addresses just to pluck one address
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 cannot be done, there is no way to get just one address.

return;
}

if (!app.$vsf.$magento.config.state.getCustomerToken()) { // TODO: replace by value from pinia store after sueCart composable will be refactored
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did, but then I got memory leaks and stack explosion, I left it as it is.

@bartoszherba bartoszherba marked this pull request as ready for review May 26, 2022 11:13
sethidden
sethidden previously approved these changes May 26, 2022
Frodigo
Frodigo previously approved these changes May 27, 2022
@Frodigo Frodigo added this to the 1.0.0-rc.9 milestone May 27, 2022
@bartoszherba bartoszherba dismissed stale reviews from Frodigo and sethidden via 67d9386 May 27, 2022 09:57
@bartoszherba bartoszherba force-pushed the M2-535-resolve-all-tod-os-in-code branch from 67d9386 to f79d67f Compare May 27, 2022 10:29
@bartoszherba bartoszherba merged commit 2fc9a21 into develop May 27, 2022
@bartoszherba bartoszherba deleted the M2-535-resolve-all-tod-os-in-code branch May 27, 2022 11:27
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