Follow up to my previous answer.
I thought CustomFieldEdit
was for inline stuff, but that may not be true.
In my own custom field I currently have the following:
edit
section like described in the docu of thejira.customField
manifest entry.
where the resource isedit: resource: some-resource render: native
resources: - key: some-resource path: src/jira/frontend/edit-field.tsx
- src/jira/frontend/edit-field.tsx
In this file I render the edit dialog like this:// ... Imports export function Edit() { // ... Setup return ( <Form onSubmit={handleSubmit(submit)}> <FormSection> <Text>asdf</Text> </FormSection> <FormFooter> <Stack grow='fill'> <ButtonGroup> <Button onClick={async () => await view.close()}>Close</Button> <Button type='submit' appearance='primary' isDisabled={!editAllowed}>Submit</Button> </ButtonGroup> </Stack> </FormFooter> </Form> ); } ForgeReconciler.render(<Edit />);
This however seems to use a deprecated functionality. (See https://developer.atlassian.com/platform/forge/changelog/#CHANGE-2536 and https://developer.atlassian.com/platform/forge/changelog/#CHANGE-2023)
Reading the changelog, it’s not clear, that this is the functionality they are talking about.
I only realized it when a Red message showed up on our installations.
Now how do you migrate to the new version of doing this???
Absolutely no idea.
From the Documentation:
If you still want to use modal experience in your fields, use the Modal component for UI Kit fields and the Modal bridge API for Custom UI fields.
I did wrap my component in an explicit Modal and set isInline
to true, but that just resulted in a flashing pop-up with the red depreciation message followed by the Modal dialog covering it. Seems like that does not resolve it.
Then I tried to use <CustomFieldEdit>
wrapping a Modal dialog, which resulted in “Error rendering app - encountered unknown component CustomFieldEdit”. (I made sure all forge dependencies were updated first.)
See also: Error rendering app - encountered unknown component CustomFieldEdit
TLDR:
- Edit for
jira.customField
is confusing and the depreciation notice about it is not clear about what is being deprecated. - CustomFieldEdit seems to be broken.
Since this topic is already resolved, I think I will create a new one.