From a5eb33849a21f39e486298b4964ad8a2ddf2af92 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Tue, 1 Oct 2024 14:43:04 +0200 Subject: [PATCH 1/3] fix: react warning * Warning: React does not recognize the `labelPosition` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `labelposition` instead. If you accidentally passed it from a parent component, remove it from the DOM element. --- .../user_dashboard/uploads_items/MobileUploadsItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js index 049dca3ea..f44c47206 100644 --- a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js +++ b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js @@ -125,14 +125,14 @@ export const MobileUploadsItem = ({ editRecord()} - labelPosition="left" + labelposition="left" icon="edit" content={i18next.t("Edit")} /> {isPublished && ( Date: Tue, 1 Oct 2024 15:19:32 +0200 Subject: [PATCH 2/3] fix: propsTypes warning * the recordRestrictionGracePeriod is not an object. here https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html#L45 it is converted to number only --- .../semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js index b22bc87f6..4adb19347 100644 --- a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +++ b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js @@ -699,7 +699,7 @@ export class RDMDepositForm extends Component { RDMDepositForm.propTypes = { groupsEnabled: PropTypes.bool.isRequired, config: PropTypes.object.isRequired, - recordRestrictionGracePeriod: PropTypes.object.isRequired, + recordRestrictionGracePeriod: PropTypes.number.isRequired, allowRecordRestriction: PropTypes.bool.isRequired, record: PropTypes.object.isRequired, preselectedCommunity: PropTypes.object, From 6f22448b75fbdc59f69713cddfd9fe9a9ab5674c Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Thu, 10 Oct 2024 22:45:40 +0200 Subject: [PATCH 3/3] fix: Warning '_truncate' is defined but never used --- .../js/invenio_app_rdm/components/RecordsResultsListItem.js | 1 - .../user_dashboard/uploads_items/ComputerTabletUploadsItem.js | 1 - .../user_dashboard/uploads_items/MobileUploadsItem.js | 1 - 3 files changed, 3 deletions(-) diff --git a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js index 6227f166b..c06f75d4c 100644 --- a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js +++ b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js @@ -6,7 +6,6 @@ import { i18next } from "@translations/invenio_app_rdm/i18next"; import _get from "lodash/get"; -import _truncate from "lodash/truncate"; import React, { Component } from "react"; import Overridable from "react-overridable"; import { SearchItemCreators } from "../utils"; diff --git a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js index 48eee929e..2e70f94c4 100644 --- a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js +++ b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js @@ -7,7 +7,6 @@ import { i18next } from "@translations/invenio_app_rdm/i18next"; import React from "react"; import PropTypes from "prop-types"; -import _truncate from "lodash/truncate"; import _get from "lodash/get"; import { Button, Icon, Item, Label } from "semantic-ui-react"; import { SearchItemCreators } from "../../utils"; diff --git a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js index f44c47206..0b1b5d4c7 100644 --- a/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js +++ b/invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js @@ -7,7 +7,6 @@ import { i18next } from "@translations/invenio_app_rdm/i18next"; import React from "react"; import PropTypes from "prop-types"; -import _truncate from "lodash/truncate"; import _get from "lodash/get"; import { Dropdown, Icon, Item, Label } from "semantic-ui-react"; import { SearchItemCreators } from "../../utils";