From 852c0dc4dc02ba298d28c31bac37eda8a7bdcd6d Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Wed, 9 Oct 2024 14:53:12 -0400 Subject: [PATCH 1/8] Add optional chaining to value in isRtl --- src/types/bibDetailsTypes.ts | 2 +- src/utils/bibUtils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/bibDetailsTypes.ts b/src/types/bibDetailsTypes.ts index ed7453e82..0f55d62b9 100644 --- a/src/types/bibDetailsTypes.ts +++ b/src/types/bibDetailsTypes.ts @@ -23,7 +23,7 @@ export interface LinkedBibDetail { export interface BibDetailURL { url: string - urlLabel: string + urlLabel?: string } export interface FieldMapping { diff --git a/src/utils/bibUtils.ts b/src/utils/bibUtils.ts index 17174cd5a..c23180e4b 100644 --- a/src/utils/bibUtils.ts +++ b/src/utils/bibUtils.ts @@ -33,7 +33,7 @@ export const rtlOrLtr = (value: string) => { // The "\u200F" right-to-left mark is found at the beginning of fields known // to be written in a script that reads from right to left -const isRtl = (value: string) => value.substring(0, 1) === "\u200F" +const isRtl = (value: string): boolean => value?.substring(0, 1) === "\u200F" export const isItTheLastElement = (i, array) => !(i < array.length - 1) From 5576c16494a4699dcb1a03dd396f78c299b10c6e Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Wed, 9 Oct 2024 14:57:46 -0400 Subject: [PATCH 2/8] Update changelog --- CHANGELOG | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 890760296..3725968c2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Hotfixes 2024-10-10 + +### Fixed + +- Add optional chaining to to value in isRtl util to fix 500 error when bib detail url is missing a label (SCC-4308) + ## [1.3.2] 2024-10-7 ### Fixed From bedfb83275b117a0b7c212c25035021d0d59bfe1 Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Wed, 9 Oct 2024 14:58:41 -0400 Subject: [PATCH 3/8] Change changelog entry to prerelease --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3725968c2..2a1d77f88 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Hotfixes 2024-10-10 +## Prerelease ### Fixed From 318e3e27d234f43978fdc90ec44138ec4e6af987 Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Wed, 9 Oct 2024 15:53:44 -0400 Subject: [PATCH 4/8] Fix typo in changelog --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 2a1d77f88..85eb27fc7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Add optional chaining to to value in isRtl util to fix 500 error when bib detail url is missing a label (SCC-4308) +- Add optional chaining to value in isRtl util to fix 500 error when bib detail url is missing a label (SCC-4308) ## [1.3.2] 2024-10-7 From a8df1457ee7073621b508d492eac79308332cf7f Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Thu, 10 Oct 2024 11:37:10 -0400 Subject: [PATCH 5/8] Add new version to changelog --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 85eb27fc7..ce3aa4a48 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Prerelease +## [1.3.3] 2024-10-10 ### Fixed From 7ff3a4b03cf5c481a8446051cfa094928be16b46 Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Thu, 10 Oct 2024 12:08:54 -0400 Subject: [PATCH 6/8] Make columns the same width in search results --- CHANGELOG | 1 + styles/components/ItemTable.module.scss | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ce3aa4a48..c0cc0f342 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Add optional chaining to value in isRtl util to fix 500 error when bib detail url is missing a label (SCC-4308) +- Adjust Item table css to make columns the same width in search results (SCC-4299) ## [1.3.2] 2024-10-7 diff --git a/styles/components/ItemTable.module.scss b/styles/components/ItemTable.module.scss index 57ec2a77d..649a85e58 100644 --- a/styles/components/ItemTable.module.scss +++ b/styles/components/ItemTable.module.scss @@ -25,15 +25,19 @@ &.inSearchResult { margin-top: 0; + width: fit-content; tr { border: 0 !important; th, - td, - th:first-of-type, - td:first-of-type { + td { padding-top: 0; + box-sizing: border-box; + + &:nth-child(2) { + padding-left: 0; + } } } } From 142bfbc33228abd583f5f43c7c49c8029add6b76 Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Thu, 10 Oct 2024 12:12:26 -0400 Subject: [PATCH 7/8] Make padding the same on all columns --- styles/components/ItemTable.module.scss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/styles/components/ItemTable.module.scss b/styles/components/ItemTable.module.scss index 649a85e58..10d58aa00 100644 --- a/styles/components/ItemTable.module.scss +++ b/styles/components/ItemTable.module.scss @@ -33,11 +33,12 @@ th, td { padding-top: 0; + padding-left: 0; box-sizing: border-box; - &:nth-child(2) { - padding-left: 0; - } + // &:first-of-type { + // padding-left: 0; + // } } } } From ff2db2a037d5cd0c791925d3822990a65d3c7ae4 Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Thu, 10 Oct 2024 12:15:34 -0400 Subject: [PATCH 8/8] Fix change log and remove commented out styles --- CHANGELOG | 2 +- styles/components/ItemTable.module.scss | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c0cc0f342..c2b8f2aea 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Add optional chaining to value in isRtl util to fix 500 error when bib detail url is missing a label (SCC-4308) -- Adjust Item table css to make columns the same width in search results (SCC-4299) +- Adjust ItemTable CSS to make columns the same width in search results (SCC-4299) ## [1.3.2] 2024-10-7 diff --git a/styles/components/ItemTable.module.scss b/styles/components/ItemTable.module.scss index 10d58aa00..9d0285302 100644 --- a/styles/components/ItemTable.module.scss +++ b/styles/components/ItemTable.module.scss @@ -35,10 +35,6 @@ padding-top: 0; padding-left: 0; box-sizing: border-box; - - // &:first-of-type { - // padding-left: 0; - // } } } }