This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new d66010f Indicate incompatible choices in the file movement form
d66010f is described below
commit d66010f9980f169e22da0e16b521607f6aca6d03
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed May 21 15:49:41 2025 +0100
Indicate incompatible choices in the file movement form
---
atr/static/js/finish-selected-move.js | 16 +++++++++++++++-
atr/static/ts/finish-selected-move.ts | 16 +++++++++++++++-
atr/templates/finish-selected.html | 6 +++++-
3 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/atr/static/js/finish-selected-move.js
b/atr/static/js/finish-selected-move.js
index 734855d..5351cf5 100644
--- a/atr/static/js/finish-selected-move.js
+++ b/atr/static/js/finish-selected-move.js
@@ -90,7 +90,7 @@ function renderListItems(tbodyElement, items, config) {
itemsToShow.forEach(item => {
const itemPathString = config.itemType === ItemType.Dir && !item ? "."
: String(item || "");
const row = document.createElement("tr");
- row.className = "atr-table-row-interactive";
+ row.className = "page-table-row-interactive";
const buttonCell = row.insertCell();
buttonCell.className = "page-table-button-cell text-end";
const pathCell = row.insertCell();
@@ -98,6 +98,20 @@ function renderListItems(tbodyElement, items, config) {
const span = document.createElement("span");
span.className = "page-file-select-text";
span.textContent = itemPathString;
+ let isIncompatible = false;
+ if (config.itemType === ItemType.File) {
+ if (uiState.currentlyChosenDirectoryPath &&
getParentPath(itemPathString) === uiState.currentlyChosenDirectoryPath) {
+ isIncompatible = true;
+ }
+ }
+ else {
+ if (uiState.currentlySelectedFilePath &&
getParentPath(uiState.currentlySelectedFilePath) === itemPathString) {
+ isIncompatible = true;
+ }
+ }
+ if (isIncompatible) {
+ span.classList.add("page-extra-muted");
+ }
if (itemPathString === config.selectedItem) {
row.classList.add("page-item-selected");
row.setAttribute("aria-selected", "true");
diff --git a/atr/static/ts/finish-selected-move.ts
b/atr/static/ts/finish-selected-move.ts
index 8545381..f54d6fd 100644
--- a/atr/static/ts/finish-selected-move.ts
+++ b/atr/static/ts/finish-selected-move.ts
@@ -130,7 +130,7 @@ function renderListItems(
itemsToShow.forEach(item => {
const itemPathString = config.itemType === ItemType.Dir && !item ? "."
: String(item || "");
const row = document.createElement("tr");
- row.className = "atr-table-row-interactive";
+ row.className = "page-table-row-interactive";
const buttonCell = row.insertCell();
buttonCell.className = "page-table-button-cell text-end";
@@ -141,6 +141,20 @@ function renderListItems(
span.className = "page-file-select-text";
span.textContent = itemPathString;
+ let isIncompatible = false;
+ if (config.itemType === ItemType.File) {
+ if (uiState.currentlyChosenDirectoryPath &&
getParentPath(itemPathString) === uiState.currentlyChosenDirectoryPath) {
+ isIncompatible = true;
+ }
+ } else {
+ if (uiState.currentlySelectedFilePath &&
getParentPath(uiState.currentlySelectedFilePath) === itemPathString) {
+ isIncompatible = true;
+ }
+ }
+ if (isIncompatible) {
+ span.classList.add("page-extra-muted");
+ }
+
if (itemPathString === config.selectedItem) {
row.classList.add("page-item-selected");
row.setAttribute("aria-selected", "true");
diff --git a/atr/templates/finish-selected.html
b/atr/templates/finish-selected.html
index b1af3d8..50de4dc 100644
--- a/atr/templates/finish-selected.html
+++ b/atr/templates/finish-selected.html
@@ -31,9 +31,13 @@
font-weight: 500;
}
- .atr-table-row-interactive {
+ .page-table-row-interactive {
height: 52px;
}
+
+ .page-extra-muted {
+ color: #aaaaaa;
+ }
</style>
{% endblock stylesheets %}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]