opencast / opencast-admin-interface

A modern admin user interface for Opencast
https://admin-interface.opencast.org
Educational Community License v2.0
1 stars 23 forks source link

Fix recursion in effect when fetching series acls #835

Closed dennis531 closed 2 months ago

dennis531 commented 2 months ago

Fixes the mentionied bug in #829.

Due to the React.stric mode, the ACLs are loaded twice and the notification is displayed twice, see https://react.dev/reference/react/StrictMode:

image

This problem could not be solved by simply putting dispatch(removeNotificationWizardForm()); at the beginning of the effect because the fetch is asynchronous. Is this a problem and should we fix it?

Close #829

github-actions[bot] commented 2 months ago

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-835

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-835

It may take a few seconds for the interface to spin up. It will then be available at http://127.0.0.1:3000. For more options you can pass on to the proxy, take a look at the README.md.

github-actions[bot] commented 2 months ago

This pull request is deployed at test.admin-interface.opencast.org/835/2024-07-15_14-55-28/ . It might take a few minutes for it to become available.

dennis531 commented 2 months ago

While you are at it, could you remove the eslint disabling comment? Looks like it really should not be there.

Done. I needed to add dispatch to the list of dependencies, otherwise the warning would be triggered.