-
Notifications
You must be signed in to change notification settings - Fork 365
Add character count Intl.Segmenter support with customisable count function
#6995
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
Open
colinrotherham
wants to merge
18
commits into
alphagov:main
Choose a base branch
from
colinrotherham:character-count-segmenter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
00e87e6
Make sure unsupported config property types are dropped
colinrotherham 1906816
Add support for functions in component configs
colinrotherham d1ab61a
Update `initAll()` config types to use `ComponentConfig` generic
colinrotherham 6080d7f
Update character count config override types to show they’re partial …
colinrotherham 0e28909
Fix missing `this.config` in config override function
colinrotherham 75ce0ef
Fix typo
colinrotherham 06ce5bd
Default to `characters` translation key prefix
colinrotherham 7fcbbfb
Deprecate character count `maxwords` and add `countType` option
colinrotherham 3f9a2c0
Update GOV.UK Frontend support error to accept custom message
colinrotherham d014d6d
Add character count support for `countType: "characters"` using Intl.…
colinrotherham 4848496
Expose segmenter for `countType: "words"`
colinrotherham b18ddd1
Add character count support for `countType: "words"` using Intl.Segme…
colinrotherham ad6bf20
Expose character count `countFunctions`
colinrotherham 1692a88
Add character count support for `countFunction` option
colinrotherham 20db8e0
Expose segmenter for `countFunction` option
colinrotherham 647f7a1
Set up 2nd parameter for count function context
colinrotherham 4e3da12
Determine the count function to use in constructor
colinrotherham c24ac3d
Cache the count function context in constructor
colinrotherham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.