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

Property Panel does not immediately open when clicking a row or node #61

Open
2 tasks done
pogi7 opened this issue May 6, 2024 · 1 comment · Fixed by #62
Open
2 tasks done

Property Panel does not immediately open when clicking a row or node #61

pogi7 opened this issue May 6, 2024 · 1 comment · Fixed by #62
Assignees
Labels
bug Something isn't working v0.3.0 Targeted for version 0.3.0 v0.4.0 Targeted for version 0.4.0

Comments

@pogi7
Copy link
Member

pogi7 commented May 6, 2024

Checklist before submitting a bug report

  • I have reviewed CONTRIBUTING.md document
  • I have done a quick search on the issue tracker to check if the bug report is not redundant

Context

[Give a concise summary of the bug that you have encountered]
Property Panel does not immediately open when clicking a row or node

Steps to reproduce the bug

[List of the steps to reproduce the bug. If relevant, you may add OML Vision code snippets or files that exhibit the bug.]

  1. Start OML Vision for the first time
  2. Click on any row or node
  3. The property panel won't open

Current result

[What currently happens]
The property panel won't open

Expected result

[What is expected to happen instead]
3. The property panel should immediately open when you click a row or node in the TableView, TreeView, or DiagramView.

Additional context

[Any additional context. If applicable, you may provide screenshots and/or error logs.]

Possible fix

[Not required but you can suggest possible fixes for the bug or link a place in the code that could possibly be causing the bug]

context.subscriptions.push(
    vscode.commands.registerCommand(
      "oml-vision.showProperties",
      async (iri: string = "", webviewType: IWebviewType) => {
        let types: string[] = [];
        if (iri !== "") {
          const rawTypesQuery = getIriTypes(iri);
          const sparqlResult = await SparqlClient(rawTypesQuery, "query");
          types = sparqlResult.map((entry: ITableData) => entry.type);
        }

        const propertyData = {
          webviewType: webviewType,
          rowIri: iri,
          tableRowTypes: types,
        };
        provider.setPendingPayload(propertyData);

        // Try to set the properties before focusing.
        // If successful, the pendingPayload that was just set
        // above will be cleared via the receivedProperties acknowledgement
        // in the panel provider. Race condition handling :(
        provider.sendMessage({
          command: Commands.SHOW_PROPERTIES,
          payload: propertyData,
        });
        provider.showPropertyPanel();
      }
    )
  );

the method provider.showPropertyPanel(); should be called before provider.setPendingPayload(payloadData); to open the property panel immediately.

Technical data

  • Operating system: Darwin localhost 22.6.0 Darwin Kernel Version 22.6.0: Sun Dec 17 22:12:45 PST 2023; root:xnu-8796.141.3.703.2~2/RELEASE_ARM64_T6000 arm64
  • Version of the repo: 0db2cc4
  • VSCode version: 1.88.1
@pogi7 pogi7 added the bug Something isn't working label May 6, 2024
@pogi7 pogi7 mentioned this issue May 6, 2024
5 tasks
@UTNAK UTNAK closed this as completed in #62 May 8, 2024
@pogi7 pogi7 added the v0.3.0 Targeted for version 0.3.0 label May 9, 2024
@pogi7 pogi7 self-assigned this May 15, 2024
@pogi7
Copy link
Member Author

pogi7 commented Jun 13, 2024

This ticket should be reopened since the property panel does not immediately open

@pogi7 pogi7 reopened this Jun 13, 2024
@pogi7 pogi7 added the v0.4.0 Targeted for version 0.4.0 label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.3.0 Targeted for version 0.3.0 v0.4.0 Targeted for version 0.4.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant