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

Update the text area container when character counting is enabled #488

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

peteryates
Copy link
Member

The update guidance says that the outer character count div should now be merged with the form group, like this:

HTML before:

<div class="govuk-character-count" data-module="govuk-character-count" data-maxlength="100">
  <div class="govuk-form-group">
    <!-- // Label, hint, error and textarea -->
  </div>
  <!-- // Count message -->
</div>

HTML after:

<div class="govuk-form-group govuk-character-count" data-module="govuk-character-count" data-maxlength="100">
  <!-- // Label, hint, error, textarea and count message -->
</div>

This allows us to simplify the code considerably and get rid of the character count container completely.

Copy link

netlify bot commented Mar 27, 2024

Deploy Preview for govuk-form-builder ready!

Name Link
🔨 Latest commit 29e9a02
🔍 Latest deploy log https://app.netlify.com/sites/govuk-form-builder/deploys/6605a391d0d3bf00086868c3
😎 Deploy Preview https://deploy-preview-488--govuk-form-builder.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

The update guidance says that the outer character count div should now
be merged with the form group, like this:

  HTML before:

  <div class="govuk-character-count" data-module="govuk-character-count" data-maxlength="100">
    <div class="govuk-form-group">
      <!-- // Label, hint, error and textarea -->
    </div>
    <!-- // Count message -->
  </div>

  HTML after:

  <div class="govuk-form-group govuk-character-count" data-module="govuk-character-count" data-maxlength="100">
    <!-- // Label, hint, error, textarea and count message -->
  </div>

This allows us to simplify the code considerably and get rid of the
character count container completely.
@peteryates peteryates merged commit 20b70aa into main Mar 28, 2024
17 checks passed
@peteryates peteryates deleted the flatten-govuk-textarea branch March 28, 2024 17:13
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.

1 participant