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

Allow metadata editing #137

Merged
merged 4 commits into from
Jan 5, 2024
Merged

Conversation

toonalbers
Copy link
Contributor

First of all, thank you for creating this very useful tool. In our case we also needed to be able to edit metadata fields:

image

This PR:

  • Adds editing functionality for metadata_public and metadata_admin
  • Fixes MultilineEdit not re-rendering when deleting an item

The editor will show fields to edit the public and admin metadata if they have been defined in the Identity schema.

@dfoxg dfoxg self-requested a review January 4, 2024 17:17
Copy link
Owner

@dfoxg dfoxg left a comment

Choose a reason for hiding this comment

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

@toonalbers thanks a lot for that PR! I just noticed two small things, could you have a look at it? After that i will create a new release with your changes. Thanks🎉

Comment on lines -139 to +171
adminMedataData: {},
adminMetadata: {},
Copy link
Owner

Choose a reason for hiding this comment

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

I just checked the code, i wasnt able to create a new identity with metadata - the values just get dropped. I think we have to include the code from the lines 163 and 164.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting, I am not able to reproduce that - on our Kratos v1.0.0 installation, creating and updating identities with public or admin metadata works well. Could you perhaps try it with this schema? https://gist.github.com/toonalbers/d4b4fcf2472404066de47061ca37cc3c

kratos-admin-ui/src/index.tsx Show resolved Hide resolved
kratos-admin-ui/src/service/schema-service.test.ts Outdated Show resolved Hide resolved
Copy link
Owner

@dfoxg dfoxg left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@dfoxg dfoxg merged commit c64e86f into dfoxg:main Jan 5, 2024
1 check passed
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