Skip to content

Show registration modal only when unregistered#1600

Open
gregorydlogan wants to merge 17 commits into
opencast:r/19.xfrom
gregorydlogan:t/registration-modal
Open

Show registration modal only when unregistered#1600
gregorydlogan wants to merge 17 commits into
opencast:r/19.xfrom
gregorydlogan:t/registration-modal

Conversation

@gregorydlogan

@gregorydlogan gregorydlogan commented May 4, 2026

Copy link
Copy Markdown
Member

This PR only shows the registraiton modal when the adopter has not already registered.

This PR contains a few extra bits that haven't been turned on yet - notably the warning bell stuff for when the core can't reach the registration server.

This PR now uses the bell if the user is not registered. Notably:
If you haven't registered at all:
Pasted image
If you have registered, but haven't agreed to the latest ToU:
Pasted image (2)

Clicking on either of these notices opens the registration modal.

TODOs:

  • Make the new strings into translatable strings rather than hardcoding them.
  • In the case of an out of date ToU, uncheck the agreed-to-ToU checkbox when presenting the registration modal, and highlight what's wrong.
  • In the case of an out of date ToU, launch the registration modal to the input pane, not the general info pane.

Fixed #1516

@gregorydlogan gregorydlogan added the type:bug Something isn't working label May 4, 2026
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
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/admin-interface:pr-1600

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/admin-interface:pr-1600

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

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

This pull request is deployed at test.admin-interface.opencast.org/1600/2026-05-11_21-10-31/ .
It might take a few minutes for it to become available.

Comment thread src/components/Header.tsx Outdated
Comment thread src/components/Header.tsx Outdated
Comment thread src/slices/registrationSlice.ts
@gregorydlogan
gregorydlogan force-pushed the t/registration-modal branch from 75e3a11 to 298d1a8 Compare June 10, 2026 22:15
@gregorydlogan

Copy link
Copy Markdown
Member Author

Now that the GHA issues are done, I made a final change and I think this is ready for re-review @Arnei

Comment thread src/styles/components/_header.scss Outdated
Comment thread src/components/Header.tsx Outdated
Comment thread src/components/Header.tsx Outdated
Comment thread src/components/Header.tsx Outdated
onClick={() => showAdoptersRegistrationModal()}
>
<span className="wide-text">Registration</span>
<span className="multi-value multi-value-yellow">Unregistered</span>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

multi-value-yellow does not seem to exist (maybe I removed it in my cleaning frenzy?).

Comment thread src/components/Header.tsx Outdated
<ButtonLikeAnchor
onClick={() => showAdoptersRegistrationModal()}
>
<span className="wide-text">Registration</span>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Untranslated strings.

@Arnei Arnei Jul 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The text in the little colored bubbles is now translated. Shouldn't "Registration" be translated too?

Comment thread src/slices/registrationSlice.ts
Comment thread src/slices/registrationSlice.ts Outdated
Comment thread src/slices/registrationSlice.ts Outdated
Comment thread src/slices/registrationSlice.ts Outdated
export type RegistrationState = {
registration: Registration | null,
latestToU: string,
isRegistering: boolean,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like isRegistering is a bit confusingly named? This is not about being in the process of registering, is it? Maybe canRegister would be clearer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I fought with naming here a lot, and I agree that it sucks. This boolean is true if the backend can talk to the main registration server, false otherwise.

What about something like ableToRegister?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ableToRegister sounds good too!

Comment thread src/slices/registrationSlice.ts Outdated
@gregorydlogan
gregorydlogan force-pushed the t/registration-modal branch from 340024a to 3247ac4 Compare July 15, 2026 23:02
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.

2 participants