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

No Recommended: Reliably select blog carousels via react props #1348

Merged

Conversation

marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Dec 8, 2023

Description

Enough classname targeting.

This uses our timelineObject utility to read the react internal data of recommendation carousels, reliably identifying those which are blog recommendations (as opposed to tag recommendations). This is, of course, fragile to changes in the underlying API data, but it seems better than trying to target a classname, since there aren't any unique "blog recommendation"y ones in this element.

Resolves #1346.

Testing steps

  • Optionally unrevert the test commit for visibility
  • Confirm that No Recommended's blog carousel hiding functionality works on the dashboard and on tag pages and doesn't hide tag recommendations (I did not do the latter; I can't find any)
  • Confirm that No Recommended's blog carousel hiding functionality works on anywhere else blog recommendation carousels can appear, if any; I don't know the full list.

@marcustyphoon
Copy link
Collaborator Author

(Clarification: this isn't the only way to solve the linked issue.)

@marcustyphoon marcustyphoon changed the title No Recommended: Reliably select blog carousels No Recommended: Reliably select blog carousels via react props Dec 8, 2023
Co-Authored-By: April Sylph <[email protected]>
@AprilSylph AprilSylph self-requested a review December 13, 2023 23:47
Copy link
Owner

@AprilSylph AprilSylph left a comment

Choose a reason for hiding this comment

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

  • Blog carousels hidden on the dashboard
  • Blog carousels hidden on hubs
  • Tag carousels not hidden on the dashboard

it's good code

@marcustyphoon marcustyphoon merged commit df5c7b0 into AprilSylph:master Dec 14, 2023
2 checks passed
@marcustyphoon marcustyphoon deleted the recommended-blog-second-fix branch December 14, 2023 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No Recommended: Recommended blogs not hidden on tagged pages
2 participants