diff --git a/CHANGES.md b/CHANGES.md new file mode 120000 index 00000000..3e111acd --- /dev/null +++ b/CHANGES.md @@ -0,0 +1 @@ +site/CHANGES.md \ No newline at end of file diff --git a/README.md b/README.md index cad404f4..334cc57f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Knowledge Commons Works is a collaborative tool for storing and sharing academic research. It is part of Knowledge Commons and is built on an instance of the InvenioRDM repository system. +Version 0.3.2-beta5 + ## Copyright Copyright 2023-24 Mesh Research. Released under the MIT license. (See the included LICENSE.txt file.) diff --git a/assets/less/site/elements/list.overrides b/assets/less/site/elements/list.overrides index ae37285c..4562f69f 100644 --- a/assets/less/site/elements/list.overrides +++ b/assets/less/site/elements/list.overrides @@ -5,4 +5,10 @@ &:hover { background-color: transparent; } +} + +.details-list { + dd { + overflow-wrap: break-word; + } } \ No newline at end of file diff --git a/assets/less/site/globals/site.overrides b/assets/less/site/globals/site.overrides index 680ec971..bc9feb8e 100644 --- a/assets/less/site/globals/site.overrides +++ b/assets/less/site/globals/site.overrides @@ -364,6 +364,9 @@ html.cover-page { margin-bottom: 0.25rem; margin-top: 1rem; } + dd { + overflow-wrap: break-word; + } } .record-details-tab { &.ui.attached.segment { @@ -680,6 +683,7 @@ html.cover-page { margin-bottom: 1rem; .ui.button.icon.right.labeled { padding-left: 1rem !important; + text-align: left; } } #record-details-download { @@ -717,6 +721,27 @@ html.cover-page { margin-bottom: 1rem; } &#social-sharing { + .button { + margin-bottom: 0.25rem; + .icon { + color: @primaryTextColor; + svg { + height: 1em; + width: 1em; + fill: @primaryTextColor; + } + } + &:hover, + &:focus, + &:active { + .icon { + color: @ivy !important; + svg { + fill: @ivy !important; + } + } + } + } .mastodon-popup { width: 2.75rem; height: 0.25rem; @@ -724,12 +749,18 @@ html.cover-page { position: absolute; background-color: transparent; } - .button { - margin-bottom: 0.25rem; + .icon.bluesky { + svg { + position: relative; + top: 1.5px; + } + } + .icon.mastodon { svg { - height: 1em; - width: 1em; - fill: @primaryColor; + position: relative; + top: -0.5px; + height: 1.15em; + width: 1.15em; } } } diff --git a/invenio.cfg b/invenio.cfg index 566cc902..09108166 100644 --- a/invenio.cfg +++ b/invenio.cfg @@ -548,18 +548,68 @@ RDM_FACETS = { }, } +RDM_SORT_OPTIONS = { + "bestmatch": dict( + title=_("Best match"), + fields=["_score"], # search defaults to desc on `_score` field + ), + "newest": dict( + title=_("Newest"), + fields=["-created"], + ), + "oldest": dict( + title=_("Oldest"), + fields=["created"], + ), + "published-desc": dict( + title=_("Most recently published"), + fields=["-metadata.publication_date"], + ), + "published-asc": dict( + title=_("Earliest published"), + fields=["metadata.publication_date"], + ), + "version": dict( + title=_("Version"), + fields=["-versions.index"], + ), + "updated-desc": dict( + title=_("Recently updated"), + fields=["-updated"], + ), + "updated-asc": dict( + title=_("Least recently updated"), + fields=["updated"], + ), + "mostviewed": dict( + title=_("Most viewed"), fields=["-stats.all_versions.unique_views"] + ), + "mostdownloaded": dict( + title=_("Most downloaded"), fields=["-stats.all_versions.unique_downloads"] + ), +} + RDM_SEARCH = { "facets": ["resource_type", "language", "file_type", "access_status"], "sort": [ "bestmatch", "newest", "oldest", + "published-desc", + "published-asc", "version", "mostviewed", "mostdownloaded", ], } +RDM_SEARCH_USER_COMMUNITIES = { + "facets": ["visibility", "type"], + "sort": ["bestmatch", "newest", "oldest"], + "sort_default": "bestmatch", + "sort_default_no_query": "newest", +} +"""User communities search configuration (i.e list of user communities)""" # Invenio-App-RDM # =============== diff --git a/site/CHANGES.md b/site/CHANGES.md new file mode 100644 index 00000000..84d129a4 --- /dev/null +++ b/site/CHANGES.md @@ -0,0 +1,52 @@ + + + +# Changes + +## 0.3.2-beta5 (2024-12-11) + +- Added Bluesky sharing option to detail page +- Fixed line wrapping of long values in record sidebar details +- Added OpenGraph image metadata property to record detail page + - This allows social media platforms to display the KCWorks logo instead of a random image they might find on the page. + +## 0.3.1-beta4 (2024-12-10) + +- Added sort options for publication date to record search + - This allows users to sort records by the date they were published. + - It also allows publication-date sorting in API requests to the search API. Among other things, this allows users' KC profiles to display records in publication date order. +- Community selection modal bug fixes + - This affects the modal that appears both during record submission on the upload form and during collection management on the detail page. + - Fixed the sort order of search results in the modal. These were being sorted by record creation date, leading to a confusing sort order. It now sorts by "best match". This allows, e.g., "Knowledge Commons" to find the main KC collection. + - Also fixed the handling of '/' in the search query string. This allows, e.g., "ARLIS/NA" to find the ARLIS/NA collection, where previously it would produce an error. + +## 0.3.0-beta3 (2024-11-30) + +- Record detail page + - Added ui for collection management + - A new menu appears in the detail page sidebar when a user has permission to edit a record. This + allows users to manage the record's collections right from the detail page. + - With this menu users can now + - submit a request to have an existing published record added to a collection. + - add a record to multiple collections + - remove a record from some or all of its collections + - view pending collection submissions for the record + - change which collection appears as the primary collection for the record (i.e., the collection whose logo appears in the record's detail page sidebar) + - Refactored record management menu + - Refactored all sidebar menus (including the record management menu) to allow accessible + keyboard navigation + - Fixed display of event metadata + - Added display for work doi as well as version doi + - Each record has at least two DOIs: a work DOI and a version DOI. The work DOI is the DOI for the record as a whole. It always points to the most recent version of the work, even if the user creates new versions in the future. The other identifier is the version DOI, which will always point to the specific version of the work that the user is currently viewing. Previously, only the version DOI was displayed, which could be confusing if the user created a new version of the work. + +- Upload form + - Added proper messages to collections widget for published records + - since collections for published records are now managed from the detail page, the collections widget now displays messages to users pointing them to the detail page to manage collections. + - Added clearer titles to form when editing an existing record + or creating a new version + - Previously, the form would display "Editing Published Record" both when editing the metadata of an existing published version *and* when creating a new version. The header now displays "Creating New Version" when creating a new version, and "Editing Published Record" when editing the metadata of an existing published version. + - Changed default publisher from "unknown" to "Knowledge Commons" + - Previously, the default publisher was "unknown". This was especially confusing for resource types where the publisher field is hidden on the upload form. Now, the default publisher is "Knowledge Commons". + +- Solved collection links bug with custom routes + - This is a back-end technical fix that should not be visible to users. diff --git a/site/kcworks/__init__.py b/site/kcworks/__init__.py index 41a82478..aa7e331d 100644 --- a/site/kcworks/__init__.py +++ b/site/kcworks/__init__.py @@ -17,3 +17,5 @@ # invenio-app-rdm package for more details. """KCWorks customizations to InvenioRDM.""" + +__version__ = "0.3.2-beta5" diff --git a/site/kcworks/dependencies/invenio-communities b/site/kcworks/dependencies/invenio-communities index d2a8391e..4d92f604 160000 --- a/site/kcworks/dependencies/invenio-communities +++ b/site/kcworks/dependencies/invenio-communities @@ -1 +1 @@ -Subproject commit d2a8391e273534f1a99116543a19dcdab6b0dae5 +Subproject commit 4d92f60418ec8fcf92ad3cbc62c3b14b5a615e3e diff --git a/site/kcworks/dependencies/invenio-group-collections-kcworks b/site/kcworks/dependencies/invenio-group-collections-kcworks index d1c9cdf0..30245b2a 160000 --- a/site/kcworks/dependencies/invenio-group-collections-kcworks +++ b/site/kcworks/dependencies/invenio-group-collections-kcworks @@ -1 +1 @@ -Subproject commit d1c9cdf08a737879ac764b3c4f5c756a69db106e +Subproject commit 30245b2ac0d1f0cf8c6884ca90f60527feac7dff diff --git a/site/kcworks/dependencies/invenio-modular-deposit-form b/site/kcworks/dependencies/invenio-modular-deposit-form index 65f5620a..eecf74c4 160000 --- a/site/kcworks/dependencies/invenio-modular-deposit-form +++ b/site/kcworks/dependencies/invenio-modular-deposit-form @@ -1 +1 @@ -Subproject commit 65f5620ae10b1b8ab9b3e6c20bc10e440e51a3dc +Subproject commit eecf74c48fe14059383035619c5976577235c264 diff --git a/site/kcworks/dependencies/invenio-modular-detail-page b/site/kcworks/dependencies/invenio-modular-detail-page index dfeb99b3..c037ec60 160000 --- a/site/kcworks/dependencies/invenio-modular-detail-page +++ b/site/kcworks/dependencies/invenio-modular-detail-page @@ -1 +1 @@ -Subproject commit dfeb99b37531a288e370218d0f4046b252cebc2f +Subproject commit c037ec60a52c9004fee060f8c7d8c870694aabb6 diff --git a/site/kcworks/dependencies/invenio-record-importer-kcworks b/site/kcworks/dependencies/invenio-record-importer-kcworks index 24138f6d..0be83a7f 160000 --- a/site/kcworks/dependencies/invenio-record-importer-kcworks +++ b/site/kcworks/dependencies/invenio-record-importer-kcworks @@ -1 +1 @@ -Subproject commit 24138f6d8a8cdde250ccea92e2f5ad340f682b8e +Subproject commit 0be83a7f6aac8a4f5c8df3d9da1755e8020a5e0c diff --git a/site/kcworks/dependencies/invenio-remote-user-data-kcworks b/site/kcworks/dependencies/invenio-remote-user-data-kcworks index 6e61d345..d74bb67e 160000 --- a/site/kcworks/dependencies/invenio-remote-user-data-kcworks +++ b/site/kcworks/dependencies/invenio-remote-user-data-kcworks @@ -1 +1 @@ -Subproject commit 6e61d345488d83a8a2adc1f85b8ae0f40d5b2ea9 +Subproject commit d74bb67e48450a484dd6693a409f3fc5e369ed4d diff --git a/site/kcworks/views/views.py b/site/kcworks/views/views.py index 6e8afe4a..e50a8fe6 100644 --- a/site/kcworks/views/views.py +++ b/site/kcworks/views/views.py @@ -95,7 +95,9 @@ def create_api_blueprint(app): lambda e: make_response( jsonify( { - "message": "You are not authorized to perform this action", + "message": ( + "You are not authorized to perform this action" + ), "status": 403, } ), diff --git a/site/pyproject.toml b/site/pyproject.toml index e413dddf..4f9f88d4 100644 --- a/site/pyproject.toml +++ b/site/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "kcworks" -dynamic = ["version"] +version = "0.3.2-beta5" [project.optional-dependencies] tests = ["pytest-invenio>=2.1.0,<3.0.0"] diff --git a/static/images/bluesky.svg b/static/images/bluesky.svg new file mode 100644 index 00000000..4cfa0971 --- /dev/null +++ b/static/images/bluesky.svg @@ -0,0 +1,3 @@ + + + diff --git a/static/images/hc-icon.jpg b/static/images/hc-icon.jpg deleted file mode 100644 index 9d3e4099..00000000 Binary files a/static/images/hc-icon.jpg and /dev/null differ diff --git a/templates/semantic-ui/invenio_app_rdm/records/details/meta.html b/templates/semantic-ui/invenio_app_rdm/records/details/meta.html index 88e74938..f49d9428 100644 --- a/templates/semantic-ui/invenio_app_rdm/records/details/meta.html +++ b/templates/semantic-ui/invenio_app_rdm/records/details/meta.html @@ -115,6 +115,7 @@ {# #} {{- meta_opengraph(meta_title, meta_description, url=meta_url) }} + {{- meta_twittercard(meta_title, meta_description) }}