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(dashboard): metadata component #7117

Merged
merged 8 commits into from May 2, 2024
Merged

Conversation

fPolic
Copy link
Contributor

@fPolic fPolic commented Apr 22, 2024

What

  • add new metadata component

Note

  • example of usage on customer edit form
  • we are not handling update metadata case in the internal module service so for now delete case doesn't work properly

Screen.Recording.2024-04-22.at.12.36.25.mov

Copy link

changeset-bot bot commented Apr 22, 2024

⚠️ No Changeset found

Latest commit: 1699e90

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Apr 22, 2024

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

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 7:03am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) May 2, 2024 7:03am
docs-ui ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 7:03am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview May 2, 2024 7:03am

# Conflicts:
#	packages/medusa/src/api-v2/admin/customers/query-config.ts
Copy link
Contributor

@kasperkristensen kasperkristensen left a comment

Choose a reason for hiding this comment

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

LGTM

Maybe confirm with @ludvig18, but I think the intended behaviour is the same as what we have in the current admin. So when a user hovers a row, it should show a menu button, where from the user can delete the row, insert an empty row above and below.

Re inferring the type based on the input: I think its a cool idea, but also a bit dangerous as someone might write "true" and want the string and not boolean value. If we added the menu as we have in the existing component, we could potentially have a submenu called "Type", which has options based on what the value could be cast as. So if the user writes "true" the submenu would have the options "String" and "Boolean". In that case we would properly also need some kind of visual indication what the field is currently cast to.

@fPolic
Copy link
Contributor Author

fPolic commented May 2, 2024

Think we can merge this now since the API of the component won't change so we can start adding this to UIs. I discussed with Ludvig and we will add a context menu with (Delete, Add row below/above) instead of the current delete action but this isn't blocking.

@kodiakhq kodiakhq bot merged commit 155e276 into develop May 2, 2024
24 checks passed
@kodiakhq kodiakhq bot deleted the feat/metadata-component branch May 2, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants