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

Issue 89: UI to edit non-ui driven xp fields #141

Merged
merged 7 commits into from
Jun 15, 2023

Conversation

djsteinmetz
Copy link
Collaborator

  • Add UI to create/edit/delete non ui related xp fields

@vercel
Copy link

vercel bot commented Jun 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sitecore-commerce-headstart-react-admin ✅ Ready (Inspect) Visit Preview 💬 2 unresolved Jun 15, 2023 7:17pm

Copy link
Collaborator

@crhistianramirez crhistianramirez left a comment

Choose a reason for hiding this comment

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

I left some review comments on here, as well as on vercel. I think if you just look at the preview deployment you should be able to see them in the UI but let me know if that is not the case

Can you please additionally clean up all instances of the XpCard component (old xp builder)

justifyContent={"center"}
minH={"xs"}
>
{Object.values(nonUiXp)?.map((xp, idx) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: can we remove ?. here, not needed

colorScheme="primary"
onClick={() => {
setXpPropertyNameToEdit(Object.keys(nonUiXp)?.[idx])
setXpPropertyValueToEdit(xp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: can we remove ?. here, not needed

textTransform="uppercase"
letterSpacing={1}
>
{Object.keys(nonUiXp)?.[idx]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: can we remove ?. here, not needed

@djsteinmetz
Copy link
Collaborator Author

All comments have been addressed. I also created a new issue related, to use this genericize this xp component and use it for all resources. #144

@robertsoniv
Copy link
Collaborator

robertsoniv commented Jun 15, 2023

@djsteinmetz @crhistianramirez - I realize it probably worked this way before, but do we think that it makes sense to track XP changes the same as other tabs? Where it only saves changes when the user hits the Save button and the "discard changes" will undo anything you changed in Xp tab?

Thinking like if you delete or change a property then want to "discard" those changes. Also less saves / syncs if we save all changes at once - so in theory more performant.

*EDIT

I could be convinced of either way. Though, it does seem the "delete" doesn't actually remove the property. If we don't go with updating product xp on HoC Save button, I think there should be a "confirm" step to removing properties.

@crhistianramirez crhistianramirez merged commit bb42ce1 into Sitecore:development Jun 15, 2023
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.

3 participants