Custom UI & Macro module

Is there a way to create a Macro module with Custom UI?

Checking the “forge create” command is not an option to select.

Thanks!

1 Like

It is. Check out the tutorial at https://developer.atlassian.com/platform/forge/build-a-hello-world-app-in-confluence/ and the subsequent pages for a walk through.

Hi @ImanolObaldia,

Custom UI macros will be rolling out very soon. We’ll send out an announcement when they become available.

For now, the only option is to build with UI kit in editor macros.

2 Likes

Hi @danielwinterw, are we talking very soon as in days, weeks, or months? I’m currently evaluating forge for use in several of our products and macro support with CustomUI is a big thing for us. If it’ll be a while I need to shift gears and come back to it later. I know you can’t be specific but a ballpark idea would be helpful. Thanks.

2 Likes

Hey @jeffryan,

My team is working on the rollout for macros currently. We expect it to be live within a couple of weeks.

6 Likes

@danielwinterw, Do you have a Jira ticket we could track?

For Vendors, it is easier for track and follow up through Jira tickets as opposted to forum threads.

Regards,

Roberto

1 Like

@danielwinterw Any plans to support custom UI for macro configurations. We are developing a Forge diagramming tool and want to open a diagram editor when the macro is edited similar to how we do with connect. Thanks

Hey @roberto, @jeffryan, @jcarter, and @ImanolObaldia!

Some good news, custom UI macro support just shipped. See https://developer.atlassian.com/platform/forge/changelog/ (22 December 2020) for the changelog entry. :slight_smile:

6 Likes

Hey @ashraf.teleb85,

Currently we do not support this, although I will send this feedback on to the team :slight_smile:

Hey @danielwinterw thanks for rolling out this feature in such a timely fashion, great effort!
As documentation is still a bit sparse (which is farther down the to-do list, understandably), is there a way to leverage the MacroConfig with custom UI resolvers? Could you provide a short example here?
I imagine that it must be possible to leverage the useConfig hook inside of UI resolvers.

All the best, happy holidays

Hey @danielwinterw (and potentially others wanting to build on this feature), following through. The way to go is by using context.extensionContext.config. It was quite tedious to find out indeed. Please add it to your documentation.
All the best, happy new year.

5 Likes

Thanks for your feedback and apologies for the delayed response over the holiday season :slight_smile:

I’ll share this with the team and get it updated.

Hey! I´m having issues on trying to retrieve the configuration of a macro when having it with CustomUI. I have tried the solution from @lennardberger but failed.

Can you elaborate with an example the way to use this hooks (useConfig() or useProductContext() not sure) along with the resolvers.

Thanks!

Hi @ImanolObaldia,

Currently, macro configuration must be defined using UI Kit, regardless of whether the macro itself is defined with Custom UI or UI Kit.

See https://developer.atlassian.com/platform/forge/add-configuration-to-a-macro/ for how to define the macro configuration function.

The Use the configuration section in that page refers only to UI Kit macros. To use configuration in Custom UI macros, you should be able to access it from your resolver.

resolver.define("exampleFunctionKey", ({ payload, context }) => {
  const { config } = context.extensionContext;

  // do something with config
  return ...;
});

If you need the config in the frontend, you currently need to define and invoke a resolver which returns the config object (or the part of it you need). However, we are currently working on passing the config directly to the Custom UI frontend via the Custom UI Bridge.

I’ll make sure to get this added to the docs page soon.

1 Like

Is there a way to adjust the macro width & height dynamically other than using the viewportSize: property in the manifest ?

I have a custom UI macro and want to adjust the width using the macro settings property

1 Like

Hi @ajay

At this stage, it’s not possible to dynamically adjust macro width/height. It’s under consideration, but not on any concrete timeline at the moment.

Hi @RyanBraganza ,

thanks for the feedback. Dynamic width/height adjustment is critical for us. Otherwise we cannot create any more advanced macros.

2 Likes