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

components: add affiliations suggestions display component #255

Merged
merged 5 commits into from
Sep 16, 2024

Conversation

carlinmack
Copy link
Contributor

❤️ Thank you for your contribution!

For inveniosoftware/invenio-rdm-records#1804
Closes inveniosoftware/invenio-rdm-records#1805

Description

Please describe briefly your pull request.

Refactored code to display affiliation/name suggestions into component so it can be used everywhere we use this API

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

Comment on lines 114 to 117
<Trans>
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid*/}
Couldn't find your person? You can <a>create a new entry</a>.
</Trans>
Copy link
Contributor Author

@carlinmack carlinmack Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to fix the tests we need to sort the import of react-i18next. In my opinion I think it would be better to shelve introducing i18n to react-invenio-forms and remove it from this PR, rather than introducing the translation mechanism (like so) in this PR.

This is the only translation that we would be supporting by importing react-i18next

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed IRL, we could introduce a prop with a default value to the text without translation. Then, in the places that this component is used we can pass a translatable text as a property.

Copy link
Contributor Author

@carlinmack carlinmack Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did attempt to change this into a component (as this is currently just a function which returns a list of dictionaries) so we could do this, however it would require changing how it is used which is not simple (as it is expecting a list of dictionaries not a react component)

I need to work on other things so I'm removing this translation and shelving this #6, apologies

@slint slint merged commit fe729ac into inveniosoftware:master Sep 16, 2024
2 checks passed
ptamarit added a commit to ptamarit/zenodo-rdm that referenced this pull request Oct 11, 2024
📁 invenio-administration (2.7.2 -> 2.8.2 🌈)

    release: v2.8.2
    webpack: bump react-searchkit due to axios major upgrade
    release: v2.8.1
    setup: bump invenio-search-ui
    release: v2.8.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-app-rdm (13.0.0b1.dev9 -> 13.0.0b1.dev10 )

    release: v13.0.0b1.dev10
    webpack: bump react-searchkit due to axios major upgrade
    setup: bump invenio-search-ui due to axios major upgrade
    assets: fix item description overflow issue

    * addresses mathjax formulas truncation
    browse: fix endpoint name.

📁 invenio-communities (17.0.0 -> 17.1.1 🌈)

    release: v17.1.1
    setup: bump invenio-search-ui
    release: v17.1.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-jobs (0.5.1 -> 1.1.0 ⚠️)

    release: v1.1.0
    webpack: bump react-searchkit due to axios major upgrade
    release: v1.0.0
    run: handle run on the details page
    translations: add translation json to assets
    jobs: rename registred class
    assets: add translations
    run: serialize arguments for celery task
    assets: run action form UX improvement
    administration: customize jobs views
    tasks: add registry of tasks

📁 invenio-rdm-records (15.0.0 -> 15.2.0 🌈)

    release: v15.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v15.1.0
    installation: bump invenio-jobs
    jobs: rename to job type
    jobs: register embargos update

📁 invenio-requests (5.1.1 -> 5.2.0 🌈)

    release: v5.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-search-ui (2.9.1 -> 3.0.0 ⚠️)

    release: v3.0.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-vocabularies (6.0.0 -> 6.2.1 🌈)

    release: v6.2.1
    webpack: bump react-searchkit due to axios major upgrade
    release: v6.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v6.1.0
    installation: add invenio-jobs as dependency
    jobs: adapt naming to main module
    jobs: rename to job type
    jobs: register RoR affiliation job
    awards: remove subj props from jsonschema

📁 react-invenio-forms (4.1.0 -> 4.3.0 🌈)

    release: v4.3.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v4.2.1
    Revert "widgets: propagate initial value field"

    This reverts commit d7c9f5641d464a8add00041429edd3aa81feb6cf.
    Revert "select field: fix passing default value"

    This reverts commit 697d88bb4d0d360055979a9620da87afce20acdf.
    Revert "release: v4.2.0"

    This reverts commit 0971f49e64a3df1f0f42132d532bfe40ab949221.
    release: v4.2.0
    select field: fix passing default value
    widgets: propagate initial value field
    components: add affiliations suggestions display component (inveniosoftware/react-invenio-forms#255)
ptamarit added a commit to ptamarit/zenodo-rdm that referenced this pull request Oct 11, 2024
📁 invenio-administration (2.7.2 -> 2.8.2 🌈)

    release: v2.8.2
    webpack: bump react-searchkit due to axios major upgrade
    release: v2.8.1
    setup: bump invenio-search-ui
    release: v2.8.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-app-rdm (13.0.0b1.dev9 -> 13.0.0b1.dev10 )

    release: v13.0.0b1.dev10
    webpack: bump react-searchkit due to axios major upgrade
    setup: bump invenio-search-ui due to axios major upgrade
    assets: fix item description overflow issue

    * addresses mathjax formulas truncation
    browse: fix endpoint name.

📁 invenio-communities (17.0.0 -> 17.1.1 🌈)

    release: v17.1.1
    setup: bump invenio-search-ui
    release: v17.1.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-jobs (0.5.1 -> 1.1.0 ⚠️)

    release: v1.1.0
    webpack: bump react-searchkit due to axios major upgrade
    release: v1.0.0
    run: handle run on the details page
    translations: add translation json to assets
    jobs: rename registred class
    assets: add translations
    run: serialize arguments for celery task
    assets: run action form UX improvement
    administration: customize jobs views
    tasks: add registry of tasks

📁 invenio-rdm-records (15.0.0 -> 15.2.0 🌈)

    release: v15.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v15.1.0
    installation: bump invenio-jobs
    jobs: rename to job type
    jobs: register embargos update

📁 invenio-requests (5.1.1 -> 5.2.0 🌈)

    release: v5.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-search-ui (2.9.1 -> 3.0.0 ⚠️)

    release: v3.0.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-vocabularies (6.0.0 -> 6.3.0 🌈)

    📦 release: v6.3.0
    awards: get program from CORDIS
    fix: add 'en' title if missing ROR
    fix: since not passed to args
    jobs: add process funders job
    release: v6.2.1
    webpack: bump react-searchkit due to axios major upgrade
    release: v6.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v6.1.0
    installation: add invenio-jobs as dependency
    jobs: adapt naming to main module
    jobs: rename to job type
    jobs: register RoR affiliation job
    awards: remove subj props from jsonschema

📁 react-invenio-forms (4.1.0 -> 4.3.0 🌈)

    release: v4.3.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v4.2.1
    Revert "widgets: propagate initial value field"

    This reverts commit d7c9f5641d464a8add00041429edd3aa81feb6cf.
    Revert "select field: fix passing default value"

    This reverts commit 697d88bb4d0d360055979a9620da87afce20acdf.
    Revert "release: v4.2.0"

    This reverts commit 0971f49e64a3df1f0f42132d532bfe40ab949221.
    release: v4.2.0
    select field: fix passing default value
    widgets: propagate initial value field
    components: add affiliations suggestions display component (inveniosoftware/react-invenio-forms#255)
ptamarit added a commit to ptamarit/zenodo-rdm that referenced this pull request Oct 11, 2024
📁 invenio-administration (2.7.2 -> 2.8.2 🌈)

    release: v2.8.2
    webpack: bump react-searchkit due to axios major upgrade
    release: v2.8.1
    setup: bump invenio-search-ui
    release: v2.8.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-app-rdm (13.0.0b1.dev9 -> 13.0.0b1.dev10 )

    release: v13.0.0b1.dev10
    webpack: bump react-searchkit due to axios major upgrade
    setup: bump invenio-search-ui due to axios major upgrade
    assets: fix item description overflow issue

    * addresses mathjax formulas truncation
    browse: fix endpoint name.

📁 invenio-communities (17.0.0 -> 17.1.2 🌈)

    📦 release: v17.1.2
    subcommunities: moved endpoint to communities resource
    release: v17.1.1
    setup: bump invenio-search-ui
    release: v17.1.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-jobs (0.5.1 -> 1.1.0 ⚠️)

    release: v1.1.0
    webpack: bump react-searchkit due to axios major upgrade
    release: v1.0.0
    run: handle run on the details page
    translations: add translation json to assets
    jobs: rename registred class
    assets: add translations
    run: serialize arguments for celery task
    assets: run action form UX improvement
    administration: customize jobs views
    tasks: add registry of tasks

📁 invenio-rdm-records (15.0.0 -> 15.2.0 🌈)

    release: v15.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v15.1.0
    installation: bump invenio-jobs
    jobs: rename to job type
    jobs: register embargos update

📁 invenio-requests (5.1.1 -> 5.2.0 🌈)

    release: v5.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-search-ui (2.9.1 -> 3.0.0 ⚠️)

    release: v3.0.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-vocabularies (6.0.0 -> 6.3.0 🌈)

    📦 release: v6.3.0
    awards: get program from CORDIS
    fix: add 'en' title if missing ROR
    fix: since not passed to args
    jobs: add process funders job
    release: v6.2.1
    webpack: bump react-searchkit due to axios major upgrade
    release: v6.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v6.1.0
    installation: add invenio-jobs as dependency
    jobs: adapt naming to main module
    jobs: rename to job type
    jobs: register RoR affiliation job
    awards: remove subj props from jsonschema

📁 react-invenio-forms (4.1.0 -> 4.3.0 🌈)

    release: v4.3.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v4.2.1
    Revert "widgets: propagate initial value field"

    This reverts commit d7c9f5641d464a8add00041429edd3aa81feb6cf.
    Revert "select field: fix passing default value"

    This reverts commit 697d88bb4d0d360055979a9620da87afce20acdf.
    Revert "release: v4.2.0"

    This reverts commit 0971f49e64a3df1f0f42132d532bfe40ab949221.
    release: v4.2.0
    select field: fix passing default value
    widgets: propagate initial value field
    components: add affiliations suggestions display component (inveniosoftware/react-invenio-forms#255)
ptamarit added a commit to zenodo/zenodo-rdm that referenced this pull request Oct 11, 2024
📁 invenio-administration (2.7.2 -> 2.8.2 🌈)

    release: v2.8.2
    webpack: bump react-searchkit due to axios major upgrade
    release: v2.8.1
    setup: bump invenio-search-ui
    release: v2.8.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-app-rdm (13.0.0b1.dev9 -> 13.0.0b1.dev10 )

    release: v13.0.0b1.dev10
    webpack: bump react-searchkit due to axios major upgrade
    setup: bump invenio-search-ui due to axios major upgrade
    assets: fix item description overflow issue

    * addresses mathjax formulas truncation
    browse: fix endpoint name.

📁 invenio-communities (17.0.0 -> 17.1.2 🌈)

    📦 release: v17.1.2
    subcommunities: moved endpoint to communities resource
    release: v17.1.1
    setup: bump invenio-search-ui
    release: v17.1.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-jobs (0.5.1 -> 1.1.0 ⚠️)

    release: v1.1.0
    webpack: bump react-searchkit due to axios major upgrade
    release: v1.0.0
    run: handle run on the details page
    translations: add translation json to assets
    jobs: rename registred class
    assets: add translations
    run: serialize arguments for celery task
    assets: run action form UX improvement
    administration: customize jobs views
    tasks: add registry of tasks

📁 invenio-rdm-records (15.0.0 -> 15.2.0 🌈)

    release: v15.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v15.1.0
    installation: bump invenio-jobs
    jobs: rename to job type
    jobs: register embargos update

📁 invenio-requests (5.1.1 -> 5.2.0 🌈)

    release: v5.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-search-ui (2.9.1 -> 3.0.0 ⚠️)

    release: v3.0.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278

📁 invenio-vocabularies (6.0.0 -> 6.3.0 🌈)

    📦 release: v6.3.0
    awards: get program from CORDIS
    fix: add 'en' title if missing ROR
    fix: since not passed to args
    jobs: add process funders job
    release: v6.2.1
    webpack: bump react-searchkit due to axios major upgrade
    release: v6.2.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v6.1.0
    installation: add invenio-jobs as dependency
    jobs: adapt naming to main module
    jobs: rename to job type
    jobs: register RoR affiliation job
    awards: remove subj props from jsonschema

📁 react-invenio-forms (4.1.0 -> 4.3.0 🌈)

    release: v4.3.0
    dependencies: update axios

    * closes inveniosoftware/react-searchkit#278
    release: v4.2.1
    Revert "widgets: propagate initial value field"

    This reverts commit d7c9f5641d464a8add00041429edd3aa81feb6cf.
    Revert "select field: fix passing default value"

    This reverts commit 697d88bb4d0d360055979a9620da87afce20acdf.
    Revert "release: v4.2.0"

    This reverts commit 0971f49e64a3df1f0f42132d532bfe40ab949221.
    release: v4.2.0
    select field: fix passing default value
    widgets: propagate initial value field
    components: add affiliations suggestions display component (inveniosoftware/react-invenio-forms#255)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve display of ROR information in deposit form
4 participants