I'm working on a repo overview action (with UI Kit 2) and was wondering if there were plans to add a Cancel button to the modal in order to close the view?
For example, if I deploy the following code to a Bitbucket `bitbucket:repoCodeOverviewAction`:
import React from "react";
import ForgeReconciler, { Form, TextField } from "@forge/react";
import { view } from "@forge/bridge";
const App = () => {
return (
<Form
onSubmit={() => {
view.close().catch((e) => {
console.log("error closing", e);
});
}}
>
<TextField name="username" label="Username" />
</Form>
);
};
ForgeReconciler.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
the following is rendered:
however when I use the same code and deploy a `confluence:contentAction`, the following is rendered:
^ note the additional "Cancel" button here rendered in Confluence but not Bitbucket.
I was wondering if there there plans to bring this Cancel button to the Bitbucket code overview actions too?
Currently it seems the only way to close this Bitbucket code overview action is for the user to click outside of the modal.
I was also wondering if there was a way to programmatically close the code overview action? (since view.close from the forge bridge doesn't work, as documented here)
Thanks!
Hi @josh- ,
The button should be there and we will look into this.
Here is a ticket to follow about this: BCLOUD-23036
We will post there once the button has been added.
Regarding the following:
I was also wondering if there was a way to programmatically close the code overview action? (since view.close from the forge bridge doesn't work, as documented here)
I think that the best option is for that ticket to be resolved, I don't see any other options available without that suggestion being implemented.
Hope this helps,
Caterina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Caterina Curti The problem also exists for `repoPullRequestAction` (and probably for others as well). It's interesting that the ticket is only prioritized as "Low". Since you're encouraging developers to create Forge apps for Bitbucket and make use of the new capabilities, how do you expect developers to work with these modals that can not be closed? Should we instead show a notice like "This modal does not close automatically due to a bug, please click outside the modal to close it" ? 😊
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sebastian Hesse do you mind posting your comment on the https://jira.atlassian.com/browse/BCLOUD-23036 directly so that the "decision makers" can see it right away?
I'll also flag it with the team this time but it's always better to engage on a BCLOUD directly, when one exists.
Cheers,
Caterina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.