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

UHF-9690 Character counter #704

Merged
merged 13 commits into from
Mar 6, 2024
Merged

UHF-9690 Character counter #704

merged 13 commits into from
Mar 6, 2024

Conversation

khalima
Copy link
Contributor

@khalima khalima commented Mar 4, 2024

UHF-9690

What was done

  • Added character counter specific field widgets for text field, text area and formatted text fields.
  • Added theme hook suggestion and preprocessing for the character counter form elements.
  • Translated field widget texts.
  • Applied character counter widgets to basic page title and lead in fields hero paragraph title and description fields.
  • Added patch to Drupal core options; Allow updating lists when switching from allowed values to allowed values function

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the Helfi Platform config and HDBT Admin theme
    • composer require drupal/helfi_platform_config:dev-UHF-9690 drupal/hdbt_admin:dev-UHF-9690 -W
    • If the Drupal core was not patched, run composer i again to patch it
  • Run make drush-updb drush-cr
  • Import translations. Run make shell
    • In shell, run: drush locale:check; drush locale:update; drush cr

How to test

  • Go to create a basic page and check that the following fields have character counter enabled
    • Title
    • Lead in
    • Hero paragraph title
    • Hero paragraph description
  • Go to create a landing page and add a hero paragraph. Check that the hero title and description have the character counter functionality.
    • Hero paragraph title
    • Hero paragraph description
  • Check that code follows our standards

Other PRs

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 13.01%. Comparing base (cf18f5c) to head (c6b5f88).

❗ Current head c6b5f88 differs from pull request most recent head 99003be. Consider uploading reports for the commit 99003be to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #704   +/-   ##
=========================================
  Coverage     13.01%   13.01%           
  Complexity      242      242           
=========================================
  Files            28       28           
  Lines           945      945           
=========================================
  Hits            123      123           
  Misses          822      822           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

This works frighteningly well 🦖

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.

3 participants