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

Exclude contact cards (and other non-editable blocks) from HIX #3281

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

charludo
Copy link
Contributor

@charludo charludo commented Dec 9, 2024

Short description

The contact cards introduced in #3169 have a severe negative impact on the HIX score. This PR excludes them from the HIX calculations.

Proposed changes

  • before sending text to Textlab, remove all divs with contenteditable="false".
  • this currently only affects contacts, but makes it simple to exclude other blocks in the future, should the need arise

Side effects

  • html.text_content() was previously only used to check for empty pages. For convenience, I have changed the code to send the result of this operation to textlab instead of the raw HTML - but I am uncertain if there has been a decision against this in the past when you added the code in question @david-venhoff - are my changes OK?

Resolved issues

Fixes: #3268


Pull Request Review Guidelines

@david-venhoff
Copy link
Member

@david-venhoff - are my changes OK?

I fear that this might change the hix scores of pages again. The last time we did this our service team had quite a nightmare dealing with municipalities that suddenly could not translate their pages anymore because the hix score was too low.
If we do this, we should probably at least do some tests that this change does not decrease the hix score in comparison to right now.

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.

Exclude contact card from HIX score calculation
2 participants