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

Boosts carousel renders 'hide completely' filtered posts as empty elements #350

Open
MaddyUnderStars opened this issue Dec 9, 2023 · 5 comments
Labels
bug Something isn't working need investigation

Comments

@MaddyUnderStars
Copy link

MaddyUnderStars commented Dec 9, 2023

Describe the bug

In the boosts carousel, posts with content warnings are rendered as 1px tall with no content.
Clicking the 1px tall element does bring up the correct post and is properly rendered.

  • Which site: Both
  • Which instance: aus.social but this should be instance agnostic

To Reproduce

  1. View a post with a content warning in the boost carousel

Expected behavior
For the standard "show content warning", blurred text, cw description, and username to be displayed.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10, Ubuntu
  • Browser Firefox
  • Version: 120.0.1

Smartphone (please complete the following information):

  • Device: Pixel 4
  • OS: Android 13
  • Browser: Firefox
  • Version: 121.069
@MaddyUnderStars
Copy link
Author

MaddyUnderStars commented Dec 9, 2023

I've realised that not all CW'd posts experience this bug.

For example: https://transmom.love/@elilla/111524776145758292 renders properly:
image

For my original example, the rendered html for this element is just empty:
image

oh and here's the post that experiences this bug. it's a request for mutual aid, so if you can chip in, it would help them a lot. https://comms.thedigitallancabin.net/objects/3675c771-d013-4ad8-a69f-4f3fd34f88e3

@cheeaun cheeaun added bug Something isn't working need investigation labels Dec 9, 2023
@cheeaun
Copy link
Owner

cheeaun commented Dec 10, 2023

@MaddyUnderStars may I know what's the version of Phanpy you're using? On Phanpy, go to Settings and scroll to bottom to see the version in About section.

@MaddyUnderStars
Copy link
Author

dev.phanpy.social is running 2023.12.05.8009a8d, and phanpy.social is running 2023.12.06.efca016. it occurs on both.

@MaddyUnderStars
Copy link
Author

I've found another example of this behaviour.
image
This time, it's not the last element of the carousel.
More importantly, this post doesn't even have a content warning. It's another aid request, so any and all support is welcome. https://heckin.how/notes/9ni8lkusb9qu8q1e

Here's a copy of the /home response for this boost

{
	"id": "111616402264784483",
	"created_at": "2023-12-21T03:58:56.783Z",
	"in_reply_to_id": null,
	"in_reply_to_account_id": null,
	"sensitive": false,
	"spoiler_text": "",
	"visibility": "public",
	"language": null,
	"uri": "https://bungle.online/notes/9ni8m8zzax/activity",
	"url": null,
	"replies_count": 0,
	"reblogs_count": 0,
	"favourites_count": 0,
	"edited_at": null,
	"favourited": false,
	"reblogged": false,
	"muted": false,
	"bookmarked": false,
	"content": "",
	"filtered": [
		{
			"filter": {
				"id": "3296",
				"title": "#mutualaid",
				"context": [
					"home"
				],
				"expires_at": null,
				"filter_action": "hide"
			},
			"keyword_matches": [
				"MutualAid"
			],
			"status_matches": null
		}
	],
	"reblog": {
		"id": "111616400134269650",
		"created_at": "2023-12-21T03:58:25.492Z",
		"in_reply_to_id": null,
		"in_reply_to_account_id": null,
		"sensitive": false,
		"spoiler_text": "",
		"visibility": "public",
		"language": "en",
		"uri": "https://heckin.how/notes/9ni8lkusb9qu8q1e",
		"url": "https://heckin.how/notes/9ni8lkusb9qu8q1e",
		"replies_count": 0,
		"reblogs_count": 4,
		"favourites_count": 0,
		"edited_at": null,
		"favourited": false,
		"reblogged": false,
		"muted": false,
		"bookmarked": false,
		"content": "removed by me to remove the scroll bar",
		"filtered": [
			{
				"filter": {
					"id": "3296",
					"title": "#mutualaid",
					"context": [
						"home"
					],
					"expires_at": null,
					"filter_action": "hide"
				},
				"keyword_matches": [
					"MutualAid"
				],
				"status_matches": null
			}
		],
		"reblog": null,
		"account": {
			// not going to archive this
		}
	},
	"account": {
		// not going to archive this
	},
	"media_attachments": [],
	"mentions": [],
	"tags": [],
	"emojis": [],
	"card": null,
	"poll": null
}

After looking through this, I believe it might be due to my filter for "#mutualaid" set to hide completely (they just make me sad and I'm poor). So I guess the post renderer or whatever is returning null to not render the filtered post, but the boost carousel is wrapping the null in an li, without respecting the filter.

@MaddyUnderStars
Copy link
Author

I can confirm that setting the filter to hide with a warning instead renders correctly.

@MaddyUnderStars MaddyUnderStars changed the title Boosts carousel renders CW'd posts as 1px tall with no content Boosts carousel renders 'hide completely' filtered posts as empty elements Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need investigation
Projects
None yet
Development

No branches or pull requests

2 participants