Skip to content

Comments

UHF-12501: Biome ignore refactoring#1468

Merged
teroelonen merged 29 commits intomainfrom
UHF-12501
Jan 13, 2026
Merged

UHF-12501: Biome ignore refactoring#1468
teroelonen merged 29 commits intomainfrom
UHF-12501

Conversation

@teroelonen
Copy link
Contributor

@teroelonen teroelonen commented Jan 8, 2026

UHF-12501

What was done

  • Fix bug in liftup with image paragraph background-version mobile layout.
  • Refactor max-nesting-depth issues scss-files.
  • Refactor low-performance-animations issues on scss-files.
  • Refactor at-function-pattern & at-mixin-pattern issues on scss-files.
  • Refactor number-max-precision issues on scss-files.
  • Refactoring for the javascript and React files to remove biome-ignores.

How to install

  • Make sure your instance is up and running on latest dev-branch
    • git checkout dev && git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-12501
  • Run code updates
    • make drush-locale-update drush-cr

How to test

  •  As you can imagine, this PR touches a lot of places but they shouldn't change any way but instead work as they did before. Check at least these features before approving this PR:
    • Accordions: Make sure they open and close nicely and that he animations are smooth.
    • District and project search: Make sure the search works as it should and the result cards have correct information on project timing.
    • News archive: Make sure that the Results title is still functional (showing the number of results).
    • React searches in general: Check that the empty result block is still working as it should.
    • Language switcher: Make sure the animations still work nicely.
    • Navigation: Check that when hovering over menu link items on the second level (open an item with child items) still has functional animation.
    • Cookie compliance block messages: Check that the messages showing in for example on external video embed block or the Askem-block before accepting cookies look normal.
    • Liftup with image: This feature was broken so check that it now works correctly. Create a liftup image with design: background image left or right. Don't add long title or text for it. The element should look as it does in these layouts: https://www.figma.com/design/ZKi4C7RaTaNk991EL1whE3/Hel.fi-Komponentit?node-id=5199-28624&t=6lmPThFoEgxo6jRS-0 (if you want to see how it was broken, just switch branch to latest main for example. Quite shocking.
  • Check that the code follows our standards.
  • Check that the differences in visual regression tests are appropriate.

…le, refactor some max-nesting-depth and number-max-precision issues
…OnlyClass and noAssignInExpression ignores could be removed
@teroelonen teroelonen marked this pull request as ready for review January 12, 2026 11:04
@github-actions
Copy link

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt-visual-regression/pull/1468/html_report/

Copy link
Contributor

Choose a reason for hiding this comment

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

Using Math.random for key props is antipattern. You could probably just use the _id value of Result for unique id.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added changes!


return (
// biome-ignore lint/a11y/useSemanticElements: @todo UHF-12501
// biome-ignore lint/a11y/useSemanticElements: The semantic element <search> doesn't exist in 'JSX.IntrinsicElements' so we can't use it at this point. If updates allow it later, remove the role and wrap the form in a <search> element.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a typescript issue, so we can use <search> elements. Our typings are lagging behind since our react version is locked. If we want to wrap all search forms in search, we should do so and use // @ts-ignore instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is good idea, commented and lets do this on the next ticket!

@teroelonen teroelonen merged commit e69c946 into main Jan 13, 2026
6 checks passed
@teroelonen teroelonen deleted the UHF-12501 branch January 13, 2026 09:09
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.

2 participants