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

Add configurable "terms and conditions" popup #1112

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

LukasKalbertodt
Copy link
Member

Supersedes #1103
Closes #1023

The consent is stored in local storage, and thus is bound to a device (+ browser & OS) and not to a (logged-in) user. We need this functionality anyway for users that never log in. In #1023 it was suggested that we also store the consent in the DB for logged-in users. In theory that means logged-in users never see the prompt again, but in practice this is not useful: since the prompt is in front of everything, the user has to agree to it before logging in. So the DB-stored value would never be used, except in very rare cases.

Tobira asks for consent again once the configured texts change. Or more specifically: the texts in the language shown to the user when clicking "Agree". That means new languages can be added without re-prompting all users.

@LukasKalbertodt LukasKalbertodt added the changelog:user User facing changes label Feb 20, 2024
LukasKalbertodt and others added 2 commits February 20, 2024 13:11
This holds configurable title, text and button label
for the terms and conditions prompt.

Co-Authored-By: Ole Wieners <olewieners@yahoo.com>
This is a really basic consent modal, that is only
closeable by agreeing to the configured terms and
conditions. Users are prompted when first visiting
Tobira.

The consent is saved in local storage, meaning it is
done on a per-device basis rather than per-user.
Users are re-prompted once any texts change in the language they 
originally agreed to.

It is slightly annoying that the logic isn't fully contained in one 
file, but the async nature of the `digest` function is annoying. This
is the easiest way to do this that avoids one-frame flickering of the
popup dialog, for example.
@LukasKalbertodt LukasKalbertodt changed the title Terms and conditions Add configurable "terms and conditions" popup Feb 20, 2024
@github-actions github-actions bot temporarily deployed to test-deployment-pr1112 February 20, 2024 12:17 Destroyed
Copy link
Member

@owi92 owi92 left a comment

Choose a reason for hiding this comment

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

lgtm

@github-actions github-actions bot temporarily deployed to test-deployment-pr1112 February 20, 2024 13:33 Destroyed
@owi92 owi92 merged commit a683184 into elan-ev:master Feb 20, 2024
5 checks passed
@LukasKalbertodt LukasKalbertodt deleted the terms-and-conditions branch February 20, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:user User facing changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consent to Terms and Conditions on first use
2 participants