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 content warnings for videos/links #457

Merged
merged 1 commit into from
Jun 22, 2024
Merged

Conversation

sea-kelp
Copy link
Collaborator

@sea-kelp sea-kelp commented Jun 6, 2024

Description of Changes

Fixes #197.

Adds content warnings to links and videos!

Notes for Deployment

There's an alembic migration that will need to be run

Screenshots (if appropriate)

New checkbox "Include content warning?" which is checked by default per lucyparsons#493 (comment)
1

How links and videos will look when a content warning is added:
2

Tests and linting

  • I have rebased my changes on main

  • just lint passes

  • just test passes

@sea-kelp sea-kelp requested a review from a team as a code owner June 6, 2024 02:31
"has_content_warning",
sa.Boolean(),
nullable=False,
server_default="false",
Copy link
Collaborator Author

@sea-kelp sea-kelp Jun 6, 2024

Choose a reason for hiding this comment

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

This migration does not add content warnings to existing links and videos, so users will need to mark those manually

michplunkett added a commit to lucyparsons/OpenOversight that referenced this pull request Jun 18, 2024
## Fixes issue
Fixes #493

## Description of Changes
*This change is cherry-picked from
OrcaCollective#457

Adds content warnings to links and videos

## Notes for Deployment
There's an alembic migration that will need to be run

## Screenshots (if appropriate)
New checkbox "Include content warning?" which is checked by default per
#493 (comment)

![1](https://github.com/lucyparsons/OpenOversight/assets/66500457/9ea246c7-3f08-48c0-8940-181b676f8c34)

How links and videos will look when a content warning is added:

![2](https://github.com/lucyparsons/OpenOversight/assets/66500457/b4d815bc-9919-47f0-ab00-e5fa7bdea024)


## Tests and Linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.

---------

Co-authored-by: michplunkett <5885605+michplunkett@users.noreply.github.com>
Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

This looks great! I've tested the various video types locally and each one looks solid 🚀

const hide = $('<button type="button" class="btn btn-lg">Show video</button>')
hide.click(() => overlay.css("display", "none"))

const wrapper = $("<div>")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to add a </div> to this or does jquery handle it for us?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Edit: This is the case based on the Jquery documentation!

@AetherUnbound AetherUnbound merged commit 3c90393 into main Jun 22, 2024
2 checks passed
@AetherUnbound AetherUnbound deleted the feature/content-warnings branch June 22, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Implement content warnings
2 participants