Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Closing a repo code overview action modal

josh- December 26, 2023

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:

Screenshot 2023-12-27 at 8.47.36 am.png

however when I use the same code and deploy a `confluence:contentAction`, the following is rendered:

Screenshot 2023-12-27 at 8.49.00 am.png

^ 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!

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 26, 2023

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

josh- December 27, 2023

Thanks so much @Caterina Curti, that sounds great!

Like Caterina Curti likes this
Sebastian Hesse March 5, 2024

@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" ? 😊

Like Steffen Opel _Utoolity_ likes this
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 8, 2024

@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

Like # people like this
Sebastian Hesse March 11, 2024

@Caterina Curti Sure, just added a comment 😉

 

Like Caterina Curti likes this
TAGS
AUG Leaders

Atlassian Community Events