Repository: OpenRefine/OpenRefine (java)

Issue:
Unfolding triangle in Wikibase edit preview
As I looked through the Preview in my Wikibase edit, I expected to be able to click on the little triangle next where it says **1 references** in the below screenshot and unfold my references right below. Instead I needed to click on the **1 references** text itself. 

Let's make the little triangle itself clickable too.

<img width="1029" alt="1 1" src="https://github.com/OpenRefine/OpenRefine/assets/52141007/476c6371-c8d3-4342-af19-71c97fed0c6d">

<img width="681" alt="1 2" src="https://github.com/OpenRefine/OpenRefine/assets/52141007/164869a3-248d-46ae-b948-06cb5dd9f7e7">



Pull request:
Issue 6304 unfolding triangle bug
Fixes #6304

Changes proposed in this pull request:

In this pull request, I have fixed the bug in which the referenceContainer was not unfolding on clicking of the triangle icon.

PFA Evidence.


https://github.com/OpenRefine/OpenRefine/assets/37299522/841f28db-7f15-4ea2-b07e-5d390574def2



Patch:
diff --git a/.github/workflows/snapshot_release.yml b/.github/workflows/snapshot_release.yml
index 634d7e676..4cd3ce040 100644
--- a/.github/workflows/snapshot_release.yml
+++ b/.github/workflows/snapshot_release.yml
@@ -350,7 +350,7 @@ jobs:
 
     - name: Download build artifact for Windows Installer (with Java)
       id: download-build-artifact-win-with-java
-      uses: actions/download-artifact@v3
+      uses: actions/download-artifact@v4
       with:
         name: installertemp-win-with-java-${{ needs.mac_test_and_deploy.outputs.version_number_string }}
         path: ./packaging/target/openrefine-win-with-java-${{ needs.mac_test_and_deploy.outputs.version_number_string }}
diff --git a/extensions/database/pom.xml b/extensions/database/pom.xml
index 0a294e654..02c073747 100644
--- a/extensions/database/pom.xml
+++ b/extensions/database/pom.xml
@@ -105,7 +105,7 @@
     <dependency>
       <groupId>org.xerial</groupId>
       <artifactId>sqlite-jdbc</artifactId>
-      <version>3.44.1.0</version>
+      <version>3.45.0.0</version>
     </dependency>
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
diff --git a/extensions/gdata/pom.xml b/extensions/gdata/pom.xml
index 159794763..cc0ca6c03 100644
--- a/extensions/gdata/pom.xml
+++ b/extensions/gdata/pom.xml
@@ -84,7 +84,7 @@
     <dependency>
       <groupId>com.google.apis</groupId>
       <artifactId>google-api-services-drive</artifactId>
-      <version>v3-rev20240110-2.0.0</version>
+      <version>v3-rev20240123-2.0.0</version>
     </dependency>
     <dependency>
       <groupId>com.google.apis</groupId>
diff --git a/extensions/wikibase/module/scripts/preview-renderer.js b/extensions/wikibase/module/scripts/preview-renderer.js
index 9f61a6cf3..96bc6ddb9 100644
--- a/extensions/wikibase/module/scripts/preview-renderer.js
+++ b/extensions/wikibase/module/scripts/preview-renderer.js
@@ -238,7 +238,7 @@ EditRenderer._renderStatement = function(json, container) {
   var referencesToggle = $('<a></a>').appendTo(referencesToggleContainer);
   right = $('<div></div>').addClass('wbs-right').appendTo(referencesSection);
   var referenceContainer = $('<div></div>').addClass('wbs-reference-container').appendTo(right);
-  referencesToggle.on('click',function () {
+  referencesToggleContainer.on('click',function () {
       triangle.toggleClass('pointing-down');
       triangle.toggleClass('pointing-right');
       referenceContainer.toggle(100);
diff --git a/extensions/wikibase/pom.xml b/extensions/wikibase/pom.xml
index 697c0dbf5..5a176bcaa 100644
--- a/extensions/wikibase/pom.xml
+++ b/extensions/wikibase/pom.xml
@@ -15,7 +15,7 @@
   </parent>
 
   <properties>
-    <wdtk.version>0.14.6</wdtk.version>
+    <wdtk.version>0.14.7</wdtk.version>
   </properties>
 
   <build>
diff --git a/main/src/com/google/refine/model/Column.java b/main/src/com/google/refine/model/Column.java
index 7c456cec6..7dd296055 100644
--- a/main/src/com/google/refine/model/Column.java
+++ b/main/src/com/google/refine/model/Column.java
@@ -55,6 +55,7 @@ public class Column {
     private ReconStats _reconStats;
 
     transient protected Map<String, Object> _precomputes;
+    private ReconConfig _sourceReconConfig;
 
     @JsonCreator
     public Column(
@@ -95,6 +96,17 @@ public class Column {
         return _reconConfig;
     }
 
+    @JsonProperty("sourceReconConfig")
+    public void setSourceReconConfig(ReconConfig sourceConfig) {
+        this._sourceReconConfig = sourceConfig;
+    }
+
+    @JsonProperty("sourceReconConfig")
+    @JsonInclude(Include.NON_NULL)
+    public ReconConfig getSourceReconConfig() {
+        return _sourceReconConfig;
+    }
+
     @JsonProperty("reconStats")
     public void setReconStats(ReconStats stats) {
         this._reconStats = stats;
diff --git a/main/src/com/google/refine/model/changes/DataExtensionChange.java b/main/src/com/google/refine/model/changes/DataExtensionChange.java
index 8adbcb9b7..1ba0366b5 100644
--- a/main/src/com/google/refine/model/changes/DataExtensionChange.java
+++ b/main/src/com/google/refine/model/changes/DataExtensionChange.java
@@ -220,6 +220,9 @@ public class DataExtensionChange implements Change {
                         _identifierSpace,
                         _schemaSpace,
                         columnType));
+                if (project.columnModel.getColumnByName(_baseColumnName) != null) {
+                    column.setSourceReconConfig(project.columnModel.getColumnByName(_baseColumnName).getReconConfig());
+                }
                 ReconStats reconStats = ReconStats.create(project, cellIndex);
                 if (reconStats.matchedTopics > 0) {
                     column.setReconStats(reconStats);
diff --git a/main/webapp/modules/core/langs/translation-ca.json b/main/webapp/modules/core/langs/translation-ca.json
index 78afd0111..ce642b217 100644
--- a/main/webapp/modules/core/langs/translation-ca.json
+++ b/main/webapp/modules/core/langs/translation-ca.json
@@ -859,5 +859,7 @@
     "core-views/column-join-before-column-picker": "Seleccioneu i ordeneu les columnes a unir",
     "core-views/column-join-before-options": "Selecciona les opcions",
     "core-views/column-join-field-separator": "Separador entre el contingut de cada columna",
-    "core-views/column-join-field-separator-advice": "Introduïu un o més caràcters, o manteniu-lo en blanc per a unir les columnes sense separador."
+    "core-views/column-join-field-separator-advice": "Introduïu un o més caràcters, o manteniu-lo en blanc per a unir les columnes sense separador.",
+    "core-views/see-more": "Veure més",
+    "core-views/see-less": "Veure menys"
 }
diff --git a/main/webapp/modules/core/langs/translation-en.json b/main/webapp/modules/core/langs/translation-en.json
index f07422f56..1c64feb83 100644
--- a/main/webapp/modules/core/langs/translation-en.json
+++ b/main/webapp/modules/core/langs/translation-en.json
@@ -526,6 +526,7 @@
     "core-views/warning-sel-judg": "Please select at least one kind of judgment to copy.",
     "core-views/start-recon": "Start reconciling…",
     "core-views/recon-text-fb": "Reconcile text in this column with items in another data source",
+    "core-views/data-extended-from" : "Data extended from $1",
     "core-views/facets": "Facets",
     "core-views/by-judg": "By judgment",
     "core-views/judgment": "$1: judgment",
diff --git a/main/webapp/modules/core/scripts/views/data-table/column-header-ui.js b/main/webapp/modules/core/scripts/views/data-table/column-header-ui.js
index 2356e9071..1c7f1191f 100644
--- a/main/webapp/modules/core/scripts/views/data-table/column-header-ui.js
+++ b/main/webapp/modules/core/scripts/views/data-table/column-header-ui.js
@@ -94,6 +94,18 @@ DataTableColumnHeaderUI.prototype._render = function() {
       .appendTo(whole);
     }
   }
+  if("sourceReconConfig" in this._column) {
+    if(this._column.sourceReconConfig.service){
+     var service = ReconciliationManager.getServiceFromUrl(this._column.sourceReconConfig.service);
+     var serviceName;
+     if(service) {
+       serviceName=service.name;
+     }
+     if(serviceName){
+      elmts.nameContainer.attr("title",$.i18n('core-views/data-extended-from',service.name));
+      }
+    }
+  }
 };
 
 DataTableColumnHeaderUI.prototype._createMenuForColumnHeader = function(elmt) {
diff --git a/pom.xml b/pom.xml
index e25b50f4e..4098e5c8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,7 +96,7 @@
     <odfdom-java.version>0.12.0</odfdom-java.version> <!-- do not update to 0.10.0, see issue #4397 -->
     <vicino.version>1.2</vicino.version>
     <clojure.version>1.11.1</clojure.version>
-    <httpclient5.version>5.3</httpclient5.version>
+    <httpclient5.version>5.3.1</httpclient5.version>
     <httpcore.version>4.4.16</httpcore.version>
     <univocity-csv.version>2.9.1</univocity-csv.version>
     <swc-parser-lazy.version>3.1.9</swc-parser-lazy.version>
@@ -108,7 +108,7 @@
     <httpmime.version>4.5.14</httpmime.version>
     <owasp-encoder.version>1.2.3</owasp-encoder.version>
     <jasypt.version>1.9.3</jasypt.version>
-    <mockito.version>5.9.0</mockito.version>
+    <mockito.version>5.10.0</mockito.version>
 
     <!-- plugin versions -->
     <build-helper-maven-plugin.version>3.5.0</build-helper-maven-plugin.version>
@@ -123,7 +123,7 @@
     <maven-clean-plugin.version>3.3.2</maven-clean-plugin.version>
     <git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
     <maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
-    <license-plugin.version>2.3.0</license-plugin.version>
+    <license-plugin.version>2.4.0</license-plugin.version>
     <org-jvnet-localizer-plugin.version>1.31</org-jvnet-localizer-plugin.version>
   </properties>
 


Test patch:
diff --git a/main/tests/server/src/com/google/refine/model/ColumnTests.java b/main/tests/server/src/com/google/refine/model/ColumnTests.java
index 0d34c1cef..7aa7c2523 100644
--- a/main/tests/server/src/com/google/refine/model/ColumnTests.java
+++ b/main/tests/server/src/com/google/refine/model/ColumnTests.java
@@ -60,6 +60,19 @@ public class ColumnTests {
                 + "      {\"column\":\"organization_id\",\"propertyName\":\"SPARQL: P3500|P2427\",\"propertyID\":\"P3500|P2427\"}"
                 + "    ],"
                 + "    \"limit\":0},"
+                + "\"sourceReconConfig\":{"
+                + "   \"mode\":\"standard-service\","
+                + "   \"service\":\"https://tools.wmflabs.org/openrefine-wikidata/en/api\","
+                + "   \"identifierSpace\":\"http://www.wikidata.org/entity/\","
+                + "   \"schemaSpace\":\"http://www.wikidata.org/prop/direct/\","
+                + "   \"type\":{\"id\":\"Q43229\",\"name\":\"organization\"},"
+                + "   \"autoMatch\":true,"
+                + "   \"batchSize\":10,"
+                + "   \"columnDetails\":["
+                + "      {\"column\":\"organization_country\",\"propertyName\":\"SPARQL: P17/P297\",\"propertyID\":\"P17/P297\"},"
+                + "      {\"column\":\"organization_id\",\"propertyName\":\"SPARQL: P3500|P2427\",\"propertyID\":\"P3500|P2427\"}"
+                + "    ],"
+                + "    \"limit\":0},"
                 + "\"reconStats\":{"
                 + "    \"nonBlanks\":299,"
                 + "    \"newTopics\":0,"
diff --git a/main/tests/server/src/com/google/refine/operations/recon/ExtendDataOperationTests.java b/main/tests/server/src/com/google/refine/operations/recon/ExtendDataOperationTests.java
index b7e191ba0..b3067160d 100644
--- a/main/tests/server/src/com/google/refine/operations/recon/ExtendDataOperationTests.java
+++ b/main/tests/server/src/com/google/refine/operations/recon/ExtendDataOperationTests.java
@@ -68,6 +68,7 @@ import com.google.refine.model.Project;
 import com.google.refine.model.Recon;
 import com.google.refine.model.ReconCandidate;
 import com.google.refine.model.Row;
+import com.google.refine.model.recon.DataExtensionReconConfig;
 import com.google.refine.model.recon.ReconciledDataExtensionJob;
 import com.google.refine.model.recon.ReconciledDataExtensionJob.DataExtensionConfig;
 import com.google.refine.operations.EngineDependentOperation;
@@ -154,6 +155,9 @@ public class ExtendDataOperationTests extends RefineTest {
     public void SetUp() throws IOException, ModelException {
         OperationRegistry.registerOperation(getCoreModule(), "extend-reconciled-data", ExtendDataOperation.class);
         project = createProjectWithColumns("DataExtensionTests", "country");
+        project.columnModel.getColumnByName("country").setReconConfig(new DataExtensionReconConfig(RECON_SERVICE,
+                RECON_IDENTIFIER_SPACE,
+                RECON_SCHEMA_SPACE, null));
 
         options = mock(Properties.class);
         engine = new Engine(project);
@@ -284,6 +288,9 @@ public class ExtendDataOperationTests extends RefineTest {
 
             // Make sure we did not create any recon stats for that column (no reconciled value)
             Assert.assertTrue(project.columnModel.getColumnByName("ISO 3166-1 alpha-2 code").getReconStats() == null);
+            // adding an assertion for sourceReconConfig
+            Assert.assertTrue(project.columnModel.getColumnByName("ISO 3166-1 alpha-2 code").getSourceReconConfig() != null);
+
         }
     }