From 16b79fc023a18147cace29293ae10a283adf50ff Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Mon, 2 Nov 2026 19:21:56 -0800
Subject: [PATCH] Fixhancement: doc detail mobile ux tweaks (#14664)
---
.../document-detail.component.html | 27 ++++++++++++++-----
.../document-detail.component.scss | 7 +++--
.../document-detail.component.spec.ts | 20 +++++++-------
3 files changed, 35 insertions(+), 19 deletions(-)
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html
index 66b22d481f..4faef55df9 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.html
+++ b/src-ui/src/app/components/document-detail/document-detail.component.html
@@ -13,7 +13,7 @@
(versionsUpdated)="onVersionsUpdated($event)"
/>
-
+
-
+
@@ -69,7 +69,7 @@
-
+
@@ -438,13 +438,26 @@
-
+
@if (hasNext()) {
-
+
} @else {
-
+
}
-
+
+
+
+
+ @if (hasNext()) {
+
+ }
+
+
+
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.scss b/src-ui/src/app/components/document-detail/document-detail.component.scss
index 91c49eebfb..3d7f6c5bb6 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.scss
+++ b/src-ui/src/app/components/document-detail/document-detail.component.scss
@@ -64,8 +64,11 @@ textarea.rtl {
.btn-group .btn.order-3 {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
- border-top-right-radius: var(--bs-border-radius-sm);
- border-bottom-right-radius: var(--bs-border-radius-sm);
+
+ @media screen and (min-width: 768px) {
+ border-top-right-radius: var(--bs-border-radius-sm);
+ border-bottom-right-radius: var(--bs-border-radius-sm);
+ }
}
.preview-sticky img {
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
index c89c9b89fb..a9f6ccb675 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
@@ -890,31 +890,31 @@ describe('DocumentDetailComponent', () => {
fixture.detectChanges()
expect(
fixture.debugElement
- .queryAll(By.css('button'))
- .find((b) => b.nativeElement.textContent === 'Save')
+ .queryAll(By.css('button.btn'))
+ .find((b) => b.nativeElement.textContent.trim() === 'Save')
).not.toBeUndefined()
expect(
fixture.debugElement
- .queryAll(By.css('button'))
- .find((b) => b.nativeElement.textContent === 'Save & close')
+ .queryAll(By.css('button.btn'))
+ .find((b) => b.nativeElement.textContent.trim() === 'Save & close')
).not.toBeUndefined()
expect(
fixture.debugElement
- .queryAll(By.css('button'))
- .find((b) => b.nativeElement.textContent === 'Save & next')
+ .queryAll(By.css('button.btn'))
+ .find((b) => b.nativeElement.textContent.trim() === 'Save & next')
).toBeUndefined()
nextSpy.mockReturnValue(true)
component.networkActive.set(true)
fixture.detectChanges()
expect(
fixture.debugElement
- .queryAll(By.css('button'))
- .find((b) => b.nativeElement.textContent === 'Save & close')
+ .queryAll(By.css('button.btn'))
+ .find((b) => b.nativeElement.textContent.trim() === 'Save & close')
).toBeUndefined()
expect(
fixture.debugElement
- .queryAll(By.css('button'))
- .find((b) => b.nativeElement.textContent === 'Save & next')
+ .queryAll(By.css('button.btn'))
+ .find((b) => b.nativeElement.textContent.trim() === 'Save & next')
).not.toBeUndefined()
})