You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "ljmotta (via GitHub)" <gi...@apache.org> on 2024/04/30 23:18:35 UTC

[PR] kie-issue-793: The keyboard shortcuts panel doesn't show the new DMN Editor keyboard shortcuts [incubator-kie-tools]

ljmotta opened a new pull request, #2279:
URL: https://github.com/apache/incubator-kie-tools/pull/2279

   Closes: https://github.com/apache/incubator-kie-issues/issues/793
   
   ## Description
   Move the keyboard shortcuts to the DMN Editor envelope.
   
   ![Uploading image.png…]()
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issue-793: The keyboard shortcuts panel doesn't show the new DMN Editor keyboard shortcuts [incubator-kie-tools]

Posted by "ljmotta (via GitHub)" <gi...@apache.org>.
ljmotta commented on PR #2279:
URL: https://github.com/apache/incubator-kie-tools/pull/2279#issuecomment-2095962326

   @jomarko @tiagobento I've incorporated the review and I've created the issue https://github.com/apache/incubator-kie-issues/issues/1155


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issue-793: The keyboard shortcuts panel doesn't show the new DMN Editor keyboard shortcuts [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento commented on code in PR #2279:
URL: https://github.com/apache/incubator-kie-tools/pull/2279#discussion_r1589673839


##########
packages/dmn-editor/src/commands/CommandsContextProvider.tsx:
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import * as React from "react";
+import { useContext, useRef } from "react";
+
+export interface Commands {
+  hideFromDrd: () => void;
+  toggleHierarchyHighlight: () => void;
+  togglePropertiesPanel: () => void;
+  createGroup: () => void;
+  selectAll: () => void;
+  panDown: () => void;
+  panUp: () => void;
+  paste: () => void;
+  copy: () => void;
+  cut: () => void;
+  cancelAction: () => void;
+  focusOnSelection: () => void;
+  resetPosition: () => void;
+}
+
+const CommandsContext = React.createContext<{
+  commandsRef: React.MutableRefObject<Commands>;
+}>({} as any);
+
+export function useCommands() {
+  return useContext(CommandsContext);
+}
+
+export function CommandsContextProvider(props: React.PropsWithChildren<{}>) {
+  const commandsRef = useRef<Commands>({
+    hideFromDrd: () => {},
+    toggleHierarchyHighlight: () => {},
+    togglePropertiesPanel: () => {},
+    createGroup: () => {},
+    selectAll: () => {},
+    panDown: () => {},
+    panUp: () => {},
+    paste: () => {},
+    copy: () => {},
+    cut: () => {},
+    cancelAction: () => {},
+    focusOnSelection: () => {},
+    resetPosition: () => {},

Review Comment:
   Maybe the default should be throwing an error? I mean, none of these should ever be a no-op.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#793: The keyboard shortcuts panel doesn't show the new DMN Editor keyboard shortcuts [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento merged PR #2279:
URL: https://github.com/apache/incubator-kie-tools/pull/2279


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issue-793: The keyboard shortcuts panel doesn't show the new DMN Editor keyboard shortcuts [incubator-kie-tools]

Posted by "jomarko (via GitHub)" <gi...@apache.org>.
jomarko commented on PR #2279:
URL: https://github.com/apache/incubator-kie-tools/pull/2279#issuecomment-2095384830

   if there is a ticket/epic for tests, please share a link with us, thank you @ljmotta 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org