This is an automated email from the ASF dual-hosted git repository.

mengw15 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/main by this push:
     new 786f7d75b1 feat: enable text selection by default across the platform 
(#4366)
786f7d75b1 is described below

commit 786f7d75b153cc9057f33c99fdd45c5b56c3ceb7
Author: Xuan Gu <[email protected]>
AuthorDate: Sat Apr 11 14:04:19 2026 -0700

    feat: enable text selection by default across the platform (#4366)
    
    <!--
    Thanks for sending a pull request (PR)! Here are some tips for you:
    1. If this is your first time, please read our contributor guidelines:
    [Contributing to
    Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
      2. Ensure you have added or run the appropriate tests for your PR
      3. If the PR is work in progress, mark it a draft on GitHub.
      4. Please write your PR title to summarize what this PR proposes, we
        are following Conventional Commits style for PR titles as well.
      5. Be sure to keep the PR description updated to reflect all changes.
    -->
    
    ### What changes were proposed in this PR?
    <!--
    Please clarify what changes you are proposing. The purpose of this
    section
    is to outline the changes. Here are some tips for you:
      1. If you propose a new API, clarify the use case for a new API.
      2. If you fix a bug, you can clarify why it is a bug.
      3. If it is a refactoring, clarify what has been changed.
      3. It would be helpful to include a before-and-after comparison using
         screenshots or GIFs.
      4. Please consider writing useful notes for better and faster reviews.
    -->
    This PR enables text selection by default across the platform. The
    changes include:
    1. Remove the global non-selectable rule and restrict non-selectable
    behavior to the following global selectors: .ant-menu-item,
    .ant-menu-submenu-title, img
    
    2. Restore component-level user-select: none declarations removed in
    [#3898](https://github.com/apache/texera/pull/3898):
      - #left-container in left-panel.component.scss
      - #right-container in property-editor.component.scss
      - #result-container in result-panel.component.scss
      - texera-mini-map in workspace.component.scss
    
    3. Layers dropdown: add a rule to prevent text selection in the layers
    dropdown overlay introduced in PR 3898.
    
    **Demonstration:**
    Dataset page:
    <img width="1580" height="868" alt="dataset"
    
src="https://github.com/user-attachments/assets/00a09404-71c4-4cea-8df5-be97320797d8";
    />
    
    <img width="1574" height="869" alt="dataset-page"
    
src="https://github.com/user-attachments/assets/13e493da-66bd-45cb-be4c-60ddc4db18b1";
    />
    
    workflow:
    <img width="1583" height="868" alt="workflow"
    
src="https://github.com/user-attachments/assets/a07f1f6d-ed13-442c-af2a-8d64075abd82";
    />
    
    ### Any related issues, documentation, discussions?
    <!--
    Please use this section to link other resources if not mentioned
    already.
    1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves
    #1234`
    or `Closes #1234`. If it is only related, simply mention the issue
    number.
      2. If there is design documentation, please add the link.
      3. If there is a discussion in the mailing list, please add the link.
    -->
    Closes #4365
    
    ### How was this PR tested?
    <!--
    If tests were added, say they were added here. Or simply mention that if
    the PR
    is tested with existing test cases. Make sure to include/update test
    cases that
    check the changes thoroughly including negative and positive cases if
    possible.
    If it was tested in a way different from regular unit tests, please
    clarify how
    you tested step by step, ideally copy and paste-able, so that other
    reviewers can
    test and check, and descendants can verify in the future. If tests were
    not added,
    please describe why they were not added and/or why it was difficult to
    add.
    -->
    Manually verified
    
    ### Was this PR authored or co-authored using generative AI tooling?
    <!--
    If generative AI tooling has been used in the process of authoring this
    PR,
    please include the phrase: 'Generated-by: ' followed by the name of the
    tool
    and its version. If no, write 'No'.
    Please refer to the [ASF Generative Tooling
    Guidance](https://www.apache.org/legal/generative-tooling.html) for
    details.
    -->
    Generated-by: Claude sonnet 4.6
    
    ---------
    
    Co-authored-by: Meng Wang <[email protected]>
---
 .../src/app/workspace/component/left-panel/left-panel.component.scss  | 1 +
 frontend/src/app/workspace/component/menu/menu.component.html         | 1 +
 frontend/src/app/workspace/component/menu/menu.component.scss         | 4 ++++
 .../component/property-editor/property-editor.component.scss          | 1 +
 .../app/workspace/component/result-panel/result-panel.component.scss  | 1 +
 frontend/src/app/workspace/component/workspace.component.scss         | 1 +
 frontend/src/styles.scss                                              | 4 +++-
 7 files changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/frontend/src/app/workspace/component/left-panel/left-panel.component.scss 
b/frontend/src/app/workspace/component/left-panel/left-panel.component.scss
index 84d962936c..045deb8420 100644
--- a/frontend/src/app/workspace/component/left-panel/left-panel.component.scss
+++ b/frontend/src/app/workspace/component/left-panel/left-panel.component.scss
@@ -30,6 +30,7 @@
   top: calc(-100% + 80px);
   left: 0;
   z-index: 3;
+  user-select: none;
   background: white;
 }
 
diff --git a/frontend/src/app/workspace/component/menu/menu.component.html 
b/frontend/src/app/workspace/component/menu/menu.component.html
index c1c8e8662c..8b2fcd3513 100644
--- a/frontend/src/app/workspace/component/menu/menu.component.html
+++ b/frontend/src/app/workspace/component/menu/menu.component.html
@@ -156,6 +156,7 @@
             nz-dropdown
             [nzDropdownMenu]="menu"
             [nzClickHide]="false"
+            nzOverlayClassName="layers-dropdown"
             nz-button
             title="Layers">
             <i
diff --git a/frontend/src/app/workspace/component/menu/menu.component.scss 
b/frontend/src/app/workspace/component/menu/menu.component.scss
index f1e2b1888f..06c609969f 100644
--- a/frontend/src/app/workspace/component/menu/menu.component.scss
+++ b/frontend/src/app/workspace/component/menu/menu.component.scss
@@ -171,3 +171,7 @@ texera-user-icon {
 texera-coeditor-user-icon {
   margin-left: -10px;
 }
+
+::ng-deep .layers-dropdown {
+  user-select: none;
+}
diff --git 
a/frontend/src/app/workspace/component/property-editor/property-editor.component.scss
 
b/frontend/src/app/workspace/component/property-editor/property-editor.component.scss
index ed92f06644..3a319b4c4a 100644
--- 
a/frontend/src/app/workspace/component/property-editor/property-editor.component.scss
+++ 
b/frontend/src/app/workspace/component/property-editor/property-editor.component.scss
@@ -29,6 +29,7 @@
   position: fixed;
   top: 10vh;
   right: 0;
+  user-select: none;
   background: white;
 }
 
diff --git 
a/frontend/src/app/workspace/component/result-panel/result-panel.component.scss 
b/frontend/src/app/workspace/component/result-panel/result-panel.component.scss
index 9dbdd63dd5..767fe72975 100644
--- 
a/frontend/src/app/workspace/component/result-panel/result-panel.component.scss
+++ 
b/frontend/src/app/workspace/component/result-panel/result-panel.component.scss
@@ -33,6 +33,7 @@
   position: absolute;
   top: -300px;
   left: 0;
+  user-select: none;
   background: white;
   border-radius: 5px;
   box-shadow:
diff --git a/frontend/src/app/workspace/component/workspace.component.scss 
b/frontend/src/app/workspace/component/workspace.component.scss
index a6698316fa..a1eae3421e 100644
--- a/frontend/src/app/workspace/component/workspace.component.scss
+++ b/frontend/src/app/workspace/component/workspace.component.scss
@@ -36,6 +36,7 @@ texera-mini-map {
   bottom: 0;
   right: 0;
   z-index: 3;
+  user-select: none;
 }
 
 texera-workflow-editor {
diff --git a/frontend/src/styles.scss b/frontend/src/styles.scss
index 7ed7614d17..0ef58d8c16 100644
--- a/frontend/src/styles.scss
+++ b/frontend/src/styles.scss
@@ -19,7 +19,9 @@
 
 @import "@ali-hm/angular-tree-component/css/angular-tree-component.css";
 
-* {
+.ant-menu-item,
+.ant-menu-submenu-title,
+img {
   user-select: none;
 }
 

Reply via email to