Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2024 1 0 #840

Merged
merged 54 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
17b4caa
Open a loan modal when clicking on a non-stacked loan card
Adamik10 Dec 6, 2023
cfe8235
Add a keyboard listener to stackable fees card to improve accessibility
Adamik10 Dec 7, 2023
2da7690
Make sure not to trigger parent events in MaterialInfo component
Adamik10 Dec 7, 2023
c61fc45
Merge branch 'release/2023-50-0' into fix/group-loan-modal
Adamik10 Dec 13, 2023
9a5a4fe
Show fees after payment change date on the fees page
Adamik10 Dec 16, 2023
6b41ed5
Removed placeholder for mobile input
JacobArrow Dec 19, 2023
d44c124
Introduce payment configuration for useConf()
Adamik10 Dec 19, 2023
8396448
Use payment configuration in getFeesInRelationToPaymentChangeDate helper
Adamik10 Dec 19, 2023
e5065f2
Merge pull request #787 from danskernesdigitalebibliotek/fix/invisibl…
Adamik10 Dec 19, 2023
dd6901f
Merge branch 'release/2024-1-0' into fix/group-loan-modal
Adamik10 Dec 20, 2023
fdcea52
Merge branch 'develop' into release/2024-1-0
Dresse Dec 20, 2023
4d10edf
Merge pull request #795 from danskernesdigitalebibliotek/DDFLSBP-249-…
JacobArrow Dec 20, 2023
7ff6955
Use correct semantics for header
JacobArrow Dec 20, 2023
5099c60
Merge pull request #798 from danskernesdigitalebibliotek/merge-develo…
Dresse Dec 21, 2023
9d1c209
Update dpl-design-system package to have fee list modal container update
Adamik10 Dec 21, 2023
db02787
Add materialNumberText to fee list app & remove unused amountText
Adamik10 Dec 21, 2023
b87984b
Use materialNumberText in stackable fees list to display material number
Adamik10 Dec 21, 2023
c11cdae
Remove the option to pay from fee details content & connected elements
Adamik10 Dec 21, 2023
82c2624
Show reason for getting the fee in stacked fee group modal red rectangle
Adamik10 Dec 21, 2023
4e77ffc
Update fee list test not to look for elements that have been removed
Adamik10 Dec 27, 2023
8581c58
Merge branch 'release/2024-1-0' into fix/group-loan-modal
Adamik10 Dec 27, 2023
33ce86e
Removed invalid role
JacobArrow Dec 27, 2023
f629c07
Take default interest period from library config in UserListItems comp
Adamik10 Dec 27, 2023
76e61b8
Convert interest period values to strings before comparing them
Adamik10 Dec 27, 2023
30f1084
Create a helper function to handle material info details click
Adamik10 Dec 27, 2023
7a4cb1e
Merge pull request #754 from danskernesdigitalebibliotek/fix/group-lo…
Adamik10 Dec 27, 2023
4608c9c
Update advancedSearchIndexes & advancedSearchFilters to match new specs
Adamik10 Dec 28, 2023
0c72478
Make sure shouldShowResultHeadline is a boolean in advancedSearchResults
Adamik10 Dec 28, 2023
924c47e
Update cypress tests for advanced search with new FBI API filters
Adamik10 Dec 28, 2023
6a9fade
Open group modal, not material details modal on title click of a loan
Adamik10 Dec 29, 2023
baa4580
Add arrow arrow__hover--right-small classes to stackable material
Adamik10 Dec 29, 2023
93d63a9
Add arrow-button class to arrow button elem so it behaves consistently
Adamik10 Dec 29, 2023
b63c640
Add arrow class to dashboard-notification to be implemented consistently
Adamik10 Dec 29, 2023
e2e20c8
Add arrow & arrow__hover--right-small classes to resetvation-material
Adamik10 Dec 29, 2023
9563ed5
Expanding fetching system for FBI to handle multiple urls
spaceo Dec 19, 2023
adc9a67
Merge branch 'develop' into release/2024-1-0
spaceo Jan 2, 2024
71c8fc7
Merge pull request #825 from danskernesdigitalebibliotek/release/2024…
spaceo Jan 2, 2024
8a3f7a2
Merge pull request #813 from danskernesdigitalebibliotek/fix/single-v…
Adamik10 Jan 2, 2024
f8e847a
Merge pull request #812 from danskernesdigitalebibliotek/update-advan…
Adamik10 Jan 2, 2024
c771f0d
Accept selectedInterest prop in PickupModal as string or number
Adamik10 Jan 2, 2024
6ce9142
Removing accidentally added work-in-progress fbi url changes
spaceo Jan 2, 2024
5c31634
Merge pull request #826 from danskernesdigitalebibliotek/remove-accid…
spaceo Jan 2, 2024
618c7bc
Merge pull request #799 from danskernesdigitalebibliotek/DDFLSBP-177-…
JacobArrow Jan 2, 2024
4f04cfb
Don't throw a missing translation error for empty strings
Adamik10 Jan 2, 2024
98c2684
Write a unit test for useText translations where the string is empty
Adamik10 Jan 2, 2024
a0c7fa7
Merge pull request #828 from danskernesdigitalebibliotek/fix/translat…
Adamik10 Jan 2, 2024
7932e50
Uncapitalize FeeDetailsModalCloseModalAriaLabelText & FeeDetailsModal
Adamik10 Jan 2, 2024
4b092c9
Order FeeListProps aphabetically & add missing strings
Adamik10 Jan 2, 2024
f4d75c2
Merge pull request #829 from danskernesdigitalebibliotek/add-missing-…
Adamik10 Jan 2, 2024
befce1a
Merge pull request #809 from danskernesdigitalebibliotek/fix/interest…
Adamik10 Jan 3, 2024
27d34df
Remove usage of the non-existing "arrow" class throughout the code
Adamik10 Jan 3, 2024
790a247
Update dpl-design-system package
Adamik10 Jan 3, 2024
63b2271
Fix failinf search header text - look for visible autosuggest text items
Adamik10 Jan 4, 2024
acc8e26
Merge pull request #814 from danskernesdigitalebibliotek/fix/arrows
Adamik10 Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"prop-types": "Since we use former ddb-react components that depend on prop-types we keep this. Should be removed when usage of prop-types is deprecated."
},
"dependencies": {
"@danskernesdigitalebibliotek/dpl-design-system": "2023.51.0-cd7e0937a067366392e60d85a9831b7d1cdf363e",
"@danskernesdigitalebibliotek/dpl-design-system": "0.0.0-53111dc1d5d35ee254a8e231f1e3721088240a4a",
"@reach/alert": "^0.17.0",
"@reach/dialog": "^0.18.0",
"@reduxjs/toolkit": "^1.9.7",
Expand Down
15 changes: 9 additions & 6 deletions src/apps/advanced-search/AdvancedSearchResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const AdvancedSearchResult: React.FC<AdvancedSearchResultProps> = ({
}, [data, page]);

const shouldShowSearchResults = isLoading || (!isLoading && hitcount > 0);
const shouldShowResultHeadline = hitcount && !isLoading;
const shouldShowResultHeadline = !!(hitcount && !isLoading);

useEffect(() => {
if (copiedLinkToSearch) {
Expand All @@ -108,11 +108,14 @@ const AdvancedSearchResult: React.FC<AdvancedSearchResultProps> = ({
/* ID is used to scroll to the results upon hitting the search button. */
id="advanced-search-result"
>
{isLoading && t("loadingResultsText")}
{shouldShowResultHeadline &&
t("showingMaterialsText", {
placeholders: { "@hitcount": hitcount }
})}
{isLoading && <>{t("loadingResultsText")}</>}
{shouldShowResultHeadline && (
<>
{t("showingMaterialsText", {
placeholders: { "@hitcount": hitcount }
})}
</>
)}
</h2>
{!showContentOnly && (
<button
Expand Down
4 changes: 2 additions & 2 deletions src/apps/advanced-search/advanced-search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("Search Result", () => {
cy.getBySel("advanced-search-material-types").first().click();
cy.getBySel("preview-section", true).should(
"contain",
"'Harry' AND 'Prince' AND generalmaterialtype='bøger'"
"'Harry' AND 'Prince' AND term.generalmaterialtype='bøger'"
);
});

Expand Down Expand Up @@ -170,7 +170,7 @@ describe("Search Result", () => {
.eq(1)
.within(() => {
cy.get("input").should("have.value", "Rowling");
cy.get("select").should("have.value", "creator");
cy.get("select").should("have.value", "term.creatorcontributor");
});
// We currently have no good way to identify selected options in the
// multiselect so checking the text of the button is the best we can do.
Expand Down
62 changes: 29 additions & 33 deletions src/apps/advanced-search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,36 @@ import { MultiselectOption } from "../../components/multiselect/types";

export const advancedSearchIndexes = [
"all",
"creator",
"subject",
"genre",
"language",
"date",
"mainCreator",
"mainTitle",
"source",
"dateFirstEdition",
"decimaldk5",
"type",
"audience",
"publisher",
"identifier",
"acSource"
"term.creatorcontributor",
"term.subject",
"term.genreandform",
"term.mainlanguage",
"datefirstedition",
"term.creator",
"term.title",
"term.source",
"dk5",
"term.specificmaterialtype",
"term.childrenoradults",
"term.publisher",
"term.isbn"
] as const;

export const advancedSearchIndexTranslations = {
all: "advancedSearchAllIndexesText",
creator: "advancedSearchCreatorText",
subject: "advancedSearchSubjectText",
genre: "advancedSearchGenreText",
language: "advancedSearchLanguageText",
date: "advancedSearchDateText",
mainCreator: "advancedSearchMainCreatorText",
mainTitle: "advancedSearchMainTitleText",
source: "advancedSearchSourceText",
dateFirstEdition: "advancedSearchDateFirstEditionText",
decimaldk5: "advancedSearchDecimalDk5Text",
type: "advancedSearchTypeText",
audience: "advancedSearchAudienceText",
publisher: "advancedSearchPublisherText",
identifier: "advancedSearchIdentifierText",
acSource: "advancedSearchAcSourceText"
"term.creatorcontributor": "advancedSearchCreatorText",
"term.subject": "advancedSearchSubjectText",
"term.genreandform": "advancedSearchGenreText",
"term.mainlanguage": "advancedSearchLanguageText",
datefirstedition: "advancedSearchDateText",
"term.creator": "advancedSearchMainCreatorText",
"term.title": "advancedSearchMainTitleText",
"term.source": "advancedSearchSourceText",
dk5: "advancedSearchDecimalDk5Text",
"term.specificmaterialtype": "advancedSearchTypeText",
"term.childrenoradults": "advancedSearchAudienceText",
"term.publisher": "advancedSearchPublisherText",
"term.isbn": "advancedSearchIdentifierText"
} as const;

export type AdvancedSearchIndex = typeof advancedSearchIndexes[number];
Expand Down Expand Up @@ -106,7 +102,7 @@ export const advancedSearchFiction: MultiselectOption[] = [
];

export const advancedSearchFilters = {
materialTypes: "generalmaterialtype",
fiction: "fictionnonfiction",
accessibility: "accesstype"
materialTypes: "term.generalmaterialtype",
fiction: "term.fictionnonfiction",
accessibility: "term.accesstype"
};
12 changes: 6 additions & 6 deletions src/apps/fee-list/FeeList.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ export default {
defaultValue: "Total @total,-",
control: { type: "text" }
},
amountText: {
defaultValue: "@amount,-",
control: { type: "text" }
},
expirationWarningDaysBeforeConfig: {
defaultValue: "6",
control: { type: "text" }
Expand Down Expand Up @@ -126,11 +122,11 @@ export default {
defaultValue: "You have 0 unpaid fees or replacement costs",
control: { type: "text" }
},
FeeDetailsModalCloseModalAriaLabelText: {
feeDetailsModalCloseModalAriaLabelText: {
defaultValue: "Close fee details modal",
control: { type: "text" }
},
FeeDetailsModalDescriptionText: {
feeDetailsModalDescriptionText: {
defaultValue:
"Modal containing information about this element or group of elements fees",
control: { type: "text" }
Expand Down Expand Up @@ -166,6 +162,10 @@ export default {
paymentOverviewUrl: {
defaultValue: "https://unsplash.com/photos/yjI3ozta2Zk", // Open source image of a fluffy floofer
control: { type: "text" }
},
materialNumberText: {
defaultValue: "# @materialNumber",
control: { type: "text" }
}
},
decorators: [withQuery]
Expand Down
53 changes: 28 additions & 25 deletions src/apps/fee-list/FeeList.entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,40 @@ export interface IntermedateListEntryConfigProps {
}

export interface FeeListProps {
totalFeeAmountText: string;
otherMaterialsText: string;
materialByAuthorText: string;
materialAndAuthorText: string;
alreadyPaidText: string;
availablePaymentTypesUrl: string;
emptyFeeListText: string;
etAlText: string;
feeCreatedText: string;
feeDetailsModalScreenReaderText: string;
feeDetailsModalCloseModalAriaLabelText: string;
feeDetailsModalDescriptionText: string;
feeListBodyText: string;
feeListDaysText: string;
payText: string;
totalText: string;
iAcceptText: string;
termsOfTradeText: string;
termsOfTradeUrl: string;
feeListHeadlineText: string;
feeListBodyText: string;
viewFeesAndCompensationRatesText: string;
etAlText: string;
viewFeesAndCompensationRatesUrl: string;
unpaidFeesFirstHeadlineText: string;
unpaidFeesSecondHeadlineText: string;
alreadyPaidText: string;
feePaymentModalHeaderText: string;
feePaymentModalBodyText: string;
feePaymentModalNoticeText: string;
feePaymentModalGotoText: string;
feePaymentModalCancelText: string;
feeDetailsModalScreenReaderText: string;
emptyFeeListText: string;
turnedInText: string;
plusXOtherMaterialsText: string;
feePaymentModalGotoText: string;
feePaymentModalHeaderText: string;
feePaymentModalNoticeText: string;
iAcceptText: string;
itemFeeAmountText: string;
feeCreatedText: string;
availablePaymentTypesUrl: string;
materialAndAuthorText: string;
materialByAuthorText: string;
materialNumberText: string;
otherMaterialsText: string;
paymentOverviewUrl: string;
payText: string;
plusXOtherMaterialsText: string;
termsOfTradeText: string;
termsOfTradeUrl: string;
totalFeeAmountText: string;
totalText: string;
turnedInText: string;
unpaidFeesFirstHeadlineText: string;
unpaidFeesSecondHeadlineText: string;
viewFeesAndCompensationRatesText: string;
viewFeesAndCompensationRatesUrl: string;
}

const FeeListEntry: FC<
Expand Down
2 changes: 1 addition & 1 deletion src/apps/fee-list/FeeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const FeeList: FC = () => {
}
const feesPostPaymentChange = getFeesInRelationToPaymentChangeDate(
fbsFees,
true
false
).length;
if (feesPostPaymentChange > 0) {
setItemsPostPaymentChange(
Expand Down
28 changes: 0 additions & 28 deletions src/apps/fee-list/fee-list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,41 +253,13 @@ describe("Fee list", () => {
.click();

// 5. modal
// counter number
cy.get("div.modal-loan__header")
.find("div")
.find(".counter")
.find(".counter__value")
.should("have.text", "32");

// counter text
cy.get("div.modal-loan__header")
.find("div")
.find(".counter")
.find(".counter__label")
.should("exist")
.should("have.text", "Days");

// header
cy.get("div.modal-loan__header")
.find("div")
.find(".modal-loan__title")
.should("exist")
.should("have.text", "Turned in 6. April 2022");

// "i accept the Terms of trade*"
cy.getBySel("checkbox_id__fee_details").should("exist");

cy.get(".modal")
.find(".checkbox__label")
.should("have.text", "I accept the Terms of trade*");

// pay button
cy.get(".button-box")
.find("button")
.should("exist")
.should("have.text", "Pay");

// book list
cy.get(".modal-loan__list-materials")
.find("li")
Expand Down
4 changes: 2 additions & 2 deletions src/apps/fee-list/modal/fee-details-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const FeeDetailsModal: FC<FeeDetailsModalProps> = ({ modalId, children }) => {
<Modal
modalId={modalId || ""}
classNames="modal-details"
closeModalAriaLabelText={t("FeeDetailsModalCloseModalAriaLabelText")}
screenReaderModalDescriptionText={t("FeeDetailsModalDescriptionText")}
closeModalAriaLabelText={t("feeDetailsModalCloseModalAriaLabelText")}
screenReaderModalDescriptionText={t("feeDetailsModalDescriptionText")}
>
{children}
</Modal>
Expand Down
Loading
Loading