Skip to content

Add unsaved changes warning in event details#1081

Merged
gregorydlogan merged 11 commits intoopencast:mainfrom
Arnei:unsaved-changes-warning-event-details
May 5, 2025
Merged

Add unsaved changes warning in event details#1081
gregorydlogan merged 11 commits intoopencast:mainfrom
Arnei:unsaved-changes-warning-event-details

Conversation

@Arnei
Copy link
Member

@Arnei Arnei commented Jan 21, 2025

Adds a confirmation modal that warns about unsaved changes to the following tabs of the event details:
Metadata,
Extended Metadata,
Scheduling (for scheduled events),
Workflows (for scheduled events).
Thereby this fixes #982.

Includes #1046, because I was expecting this to be tightly related to modals and did not want to write it twice. The general coding approach would be the same though.

Speaking of approach, I would like feedback on if this makes for a good approach, or if there are better alternatives I've missed. If people agree with this approach it could then be extended to other modals (e.g. series) as well.

Possible future improvements (for another PR?): Currently you are only warned about unsaved changes if you try to close the modal. However, changes are also lost if you switch between tabs (e.g. from Metadata to Assets). Maybe there should be a warning there as well?

How to test this

Can be tested as usual. Make sure the warning only appears if you actually made changes.

Adds a confirmation modal that warns about unsaved changes
to the following tabs of the event details:
Metadata,
Extended Metadata,
Scheduling (for scheduled events),
Workflows (for scheduled events).
Thereby this fixes opencast#982.

Includes opencast#1046, because I was expecting this to be tightly related to
modals and did not want to write it twice. The general coding
approach would be the same though.

Speaking of approach, I would like feedback on if this makes
for a good approach, or if there are better alternatives I've
missed. If people agree with this approach it could then be
extended to other modals (e.g. series) as well.
@Arnei Arnei added the type:bug Something isn't working label Jan 21, 2025
@github-actions
Copy link
Contributor

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-1081

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-1081

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
Copy link
Contributor

github-actions bot commented Jan 21, 2025

This pull request is deployed at test.admin-interface.opencast.org/1081/2025-04-02_07-43-30/ .
It might take a few minutes for it to become available.

@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2025

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

gregorydlogan added a commit to gregorydlogan/opencast-admin-interface that referenced this pull request May 5, 2025
…t-admin-interface into main

Pull request opencast#1081

  Add unsaved changes warning in event details
@gregorydlogan gregorydlogan merged commit 2c63f9a into opencast:main May 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI should prompt user if you change workflow parameters and leave without saving

2 participants