Skip to content

Commit

Permalink
Extend detail page summary (#1661)
Browse files Browse the repository at this point in the history
* Start reshuffling detail page summary and add some info

* Add more info to publication detail page heading: metadata

* Change sequence, add todo's

* Work on responsiveness

* Add and adapt contributors, title, page count, conference name

* Restructure authors, editors, creators and add summary for datasets

* Refine copy for license and access level

* Refine copy for license and access level

* Add access level, locked, license and reshuffle buttons for dataset detail page

* Align positioning, icons, colours and spacing of licenses

* Start making buttons and line breaks more responsive on detail pages

* Align text behaviour

* Remove superfluous spaces, align indentation, remove publisher for proceedings

* Add colon to separate publication type and classification

* Remove publication status

* Remove superfluous nil checks and simply syntax

* Fix cypress test

* go mod tidy

---------

Co-authored-by: Koen Verheyen <[email protected]>
Co-authored-by: Nicolas Steenlant <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent 84729e4 commit 572eb07
Show file tree
Hide file tree
Showing 12 changed files with 1,510 additions and 624 deletions.
64 changes: 48 additions & 16 deletions cypress/e2e/shared/record-timestamps.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ describe("Record timestamps", () => {
it("should display the date created and edited in the publication detail page", () => {
cy.visitPublication();

assertTimestamp("#summary .c-subline", "Created", "Biblio Researcher1");
assertTimestamp("#summary .c-subline", "Edited", "Biblio Researcher2");
assertTimestamp(
"#summary .c-body-small",
"Created",
"Biblio Researcher1",
);
assertTimestamp(
"#summary .c-body-small",
"Edited",
"Biblio Researcher2",
);
});
});

Expand Down Expand Up @@ -83,8 +91,8 @@ describe("Record timestamps", () => {
});

cy.visitPublication();
assertTimestamp("#summary .c-subline", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-subline", "Edited", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Edited", "Biblio Librarian1");

// as a non-curator
cy.loginAsResearcher("researcher1");
Expand All @@ -105,8 +113,16 @@ describe("Record timestamps", () => {
});

cy.visitPublication();
assertTimestamp("#summary .c-subline", "Created", "a Biblio team member");
assertTimestamp("#summary .c-subline", "Edited", "a Biblio team member");
assertTimestamp(
"#summary .c-body-small",
"Created",
"a Biblio team member",
);
assertTimestamp(
"#summary .c-body-small",
"Edited",
"a Biblio team member",
);

// as a different curator
cy.loginAsLibrarian("librarian2");
Expand All @@ -127,8 +143,8 @@ describe("Record timestamps", () => {
});

cy.visitPublication();
assertTimestamp("#summary .c-subline", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-subline", "Edited", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Edited", "Biblio Librarian1");
});
});

Expand Down Expand Up @@ -173,8 +189,16 @@ describe("Record timestamps", () => {
it("should display the date created and edited in the dataset detail page", () => {
cy.visitDataset();

assertTimestamp("#summary .c-subline", "Created", "Biblio Researcher1");
assertTimestamp("#summary .c-subline", "Edited", "Biblio Researcher2");
assertTimestamp(
"#summary .c-body-small",
"Created",
"Biblio Researcher1",
);
assertTimestamp(
"#summary .c-body-small",
"Edited",
"Biblio Researcher2",
);
});
});

Expand Down Expand Up @@ -204,8 +228,8 @@ describe("Record timestamps", () => {
});

cy.visitDataset();
assertTimestamp("#summary .c-subline", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-subline", "Edited", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Edited", "Biblio Librarian1");

// as a non-curator
cy.loginAsResearcher("researcher1");
Expand All @@ -226,8 +250,16 @@ describe("Record timestamps", () => {
});

cy.visitDataset();
assertTimestamp("#summary .c-subline", "Created", "a Biblio team member");
assertTimestamp("#summary .c-subline", "Edited", "a Biblio team member");
assertTimestamp(
"#summary .c-body-small",
"Created",
"a Biblio team member",
);
assertTimestamp(
"#summary .c-body-small",
"Edited",
"a Biblio team member",
);

// as a different curator
cy.loginAsLibrarian("librarian2");
Expand All @@ -248,8 +280,8 @@ describe("Record timestamps", () => {
});

cy.visitDataset();
assertTimestamp("#summary .c-subline", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-subline", "Edited", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Created", "Biblio Librarian1");
assertTimestamp("#summary .c-body-small", "Edited", "Biblio Librarian1");
});
});

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.33.0
jaytaylor.com/html2text v0.0.0-20230321000545-74c2419ad056
mvdan.cc/xurls/v2 v2.5.0
)

Expand Down Expand Up @@ -115,7 +116,6 @@ require (
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
jaytaylor.com/html2text v0.0.0-20230321000545-74c2419ad056 // indirect
)

require (
Expand Down
Loading

0 comments on commit 572eb07

Please sign in to comment.