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

Administration: make main components overridable #125

Closed

Conversation

Pineirin
Copy link
Contributor

Remove unused components
Add missing translations
closes: #102

@Pineirin Pineirin force-pushed the overridable-administration branch 2 times, most recently from 4509ee0 to fab6b2a Compare September 27, 2022 14:08
@Pineirin Pineirin force-pushed the overridable-administration branch 9 times, most recently from ae69df7 to 56221eb Compare October 6, 2022 15:03
* remove unused components
* add missing translations
* closes: inveniosoftware#102
@Pineirin
Copy link
Contributor Author

Pineirin commented Oct 17, 2022

I didn't manage to fix the tests. Currently, for jest to work, we need to specify the dependencies needed for the tests in the file https://github.com/inveniosoftware/invenio-administration/blob/main/invenio_administration/assets/semantic-ui/js/invenio_administration/package.json.

The issue lays in the translations, as we cannot define in the package.json the alias we use for importing the translations, as can be seen in the error.
In theory the solution is to mock the import using Mock Functions (https://jestjs.io/docs/mock-function-api#mockfnmockreturnvaluevalue), but I don't properly understand how mock functions can be used to mock an import of an import.

@kpsherva
Copy link
Contributor

closing due to changed naming policy of overridable ids

@kpsherva kpsherva closed this Nov 22, 2022
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.

frontend: wrap React components in overridable component
2 participants