-
Notifications
You must be signed in to change notification settings - Fork 319
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
Standardise spelling to "falsy" #5061
Merged
Merged
Conversation
This file contains 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
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 39de1c8 |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/accordion/fixtures.json b/packages/govuk-frontend/dist/govuk/components/accordion/fixtures.json
index e563b00b7..bbb340a24 100644
--- a/packages/govuk-frontend/dist/govuk/components/accordion/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/accordion/fixtures.json
@@ -315,9 +315,9 @@
"html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-heading-html\">\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-heading-html-heading-1\">\n <span class=\"myClass\">Section A</span>\n </span>\n </h2>\n </div>\n <div id=\"accordion-heading-html-content-1\" class=\"govuk-accordion__section-content\">\n <p class=\"govuk-body\">\n Some content\n </p>\n </div>\n </div>\n</div>"
},
{
- "name": "with falsey values",
+ "name": "with falsy values",
"options": {
- "id": "accordion-falsey",
+ "id": "accordion-falsy",
"items": [
{
"heading": {
@@ -344,7 +344,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-falsey\">\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-falsey-heading-1\">\n Section A\n </span>\n </h2>\n </div>\n <div id=\"accordion-falsey-content-1\" class=\"govuk-accordion__section-content\">\n <p class=\"govuk-body\">\n Some content\n </p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-falsey-heading-5\">\n Section B\n </span>\n </h2>\n </div>\n <div id=\"accordion-falsey-content-5\" class=\"govuk-accordion__section-content\">\n <p class=\"govuk-body\">\n Some content\n </p>\n </div>\n </div>\n</div>"
+ "html": "<div class=\"govuk-accordion\" data-module=\"govuk-accordion\" id=\"accordion-falsy\">\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-falsy-heading-1\">\n Section A\n </span>\n </h2>\n </div>\n <div id=\"accordion-falsy-content-1\" class=\"govuk-accordion__section-content\">\n <p class=\"govuk-body\">\n Some content\n </p>\n </div>\n </div>\n <div class=\"govuk-accordion__section\">\n <div class=\"govuk-accordion__section-header\">\n <h2 class=\"govuk-accordion__section-heading\">\n <span class=\"govuk-accordion__section-button\" id=\"accordion-falsy-heading-5\">\n Section B\n </span>\n </h2>\n </div>\n <div id=\"accordion-falsy-content-5\" class=\"govuk-accordion__section-content\">\n <p class=\"govuk-body\">\n Some content\n </p>\n </div>\n </div>\n</div>"
},
{
"name": "with remember expanded off",
diff --git a/packages/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json b/packages/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json
index d8fca82ec..dd60af5f1 100644
--- a/packages/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json
@@ -931,7 +931,7 @@
"html": "<div class=\"govuk-form-group\">\n <div class=\"govuk-checkboxes\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"nationality\" name=\"example-name\" type=\"checkbox\" value=\"1\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"nationality\">\n Option 1\n </label>\n </div>\n <div class=\"govuk-checkboxes__item\">\n <input class=\"govuk-checkboxes__input\" id=\"nationality-2\" name=\"example-name\" type=\"checkbox\" value=\"2\">\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"nationality-2\">\n Option 2\n </label>\n </div>\n </div>\n</div>"
},
{
- "name": "with falsey values",
+ "name": "with falsy values",
"options": {
"name": "example-name",
"items": [
diff --git a/packages/govuk-frontend/dist/govuk/components/radios/fixtures.json b/packages/govuk-frontend/dist/govuk/components/radios/fixtures.json
index 517088717..b72059485 100644
--- a/packages/govuk-frontend/dist/govuk/components/radios/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/radios/fixtures.json
@@ -957,7 +957,7 @@
"html": "<div class=\"govuk-form-group\">\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name\" name=\"example-name\" type=\"radio\" value=\"yes\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name\">\n Yes\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"example-name-2\" name=\"example-name\" type=\"radio\" value=\"no\">\n <label class=\"govuk-label govuk-radios__label\" for=\"example-name-2\">\n No\n </label>\n </div>\n </div>\n</div>"
},
{
- "name": "with falsey items",
+ "name": "with falsy items",
"options": {
"name": "example-name",
"items": [
diff --git a/packages/govuk-frontend/dist/govuk/components/select/fixtures.json b/packages/govuk-frontend/dist/govuk/components/select/fixtures.json
index 2c3f42040..086a44a17 100644
--- a/packages/govuk-frontend/dist/govuk/components/select/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/select/fixtures.json
@@ -303,10 +303,10 @@
"html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-item-attributes\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"with-item-attributes\" name=\"with-item-attributes\">\n <option value=\"1\" data-attribute=\"ABC\" data-second-attribute=\"DEF\">Option 1</option>\n <option value=\"2\" selected data-attribute=\"GHI\" data-second-attribute=\"JKL\">Option 2</option>\n </select>\n</div>"
},
{
- "name": "with falsey items",
+ "name": "with falsy items",
"options": {
- "id": "with-falsey-items",
- "name": "with-falsey-items",
+ "id": "with-falsy-items",
+ "name": "with-falsy-items",
"label": {
"text": "Label text goes here"
},
@@ -328,7 +328,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-falsey-items\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"with-falsey-items\" name=\"with-falsey-items\">\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Options 2</option>\n </select>\n</div>"
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-falsy-items\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"with-falsy-items\" name=\"with-falsy-items\">\n <option value=\"1\">Option 1</option>\n <option value=\"2\">Options 2</option>\n </select>\n</div>"
},
{
"name": "hint",
@@ -488,10 +488,10 @@
"html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"colors\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"colors\" name=\"colors\">\n <option>Red</option>\n <option selected>Green</option>\n <option>Blue</option>\n </select>\n</div>"
},
{
- "name": "with falsey values",
+ "name": "with falsy values",
"options": {
- "name": "falsey-values",
- "id": "falsey-values",
+ "name": "falsy-values",
+ "id": "falsy-values",
"label": {
"text": "Label text goes here"
},
@@ -514,7 +514,7 @@
"description": "",
"previewLayoutModifiers": [],
"screenshot": false,
- "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"falsey-values\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"falsey-values\" name=\"falsey-values\">\n <option value=\"\">Empty string</option>\n <option value=\"false\">Boolean false</option>\n <option value=\"0\">Number zero</option>\n </select>\n</div>"
+ "html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"falsy-values\">\n Label text goes here\n </label>\n <select class=\"govuk-select\" id=\"falsy-values\" name=\"falsy-values\">\n <option value=\"\">Empty string</option>\n <option value=\"false\">Boolean false</option>\n <option value=\"0\">Number zero</option>\n </select>\n</div>"
},
{
"name": "item selected overrides value",
diff --git a/packages/govuk-frontend/dist/govuk/components/summary-list/fixtures.json b/packages/govuk-frontend/dist/govuk/components/summary-list/fixtures.json
index b77058937..f56cc3e22 100644
--- a/packages/govuk-frontend/dist/govuk/components/summary-list/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/summary-list/fixtures.json
@@ -1203,7 +1203,7 @@
"html": "<dl class=\"govuk-summary-list\" data-attribute-1=\"value-1\" data-attribute-2=\"value-2\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Name\n </dt>\n <dd class=\"govuk-summary-list__value\">\n Firstname Lastname\n </dd>\n </div>\n</dl>"
},
{
- "name": "with falsey values",
+ "name": "with falsy values",
"options": {
"rows": [
{
diff --git a/packages/govuk-frontend/dist/govuk/components/table/fixtures.json b/packages/govuk-frontend/dist/govuk/components/table/fixtures.json
index 25c9a5d59..e82c9d4fd 100644
--- a/packages/govuk-frontend/dist/govuk/components/table/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/table/fixtures.json
@@ -553,7 +553,7 @@
"html": "<table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <th scope=\"row\" class=\"govuk-table__header\" data-fizz=\"buzz\">Foo</th>\n </tr>\n </tbody>\n</table>"
},
{
- "name": "with falsey items",
+ "name": "with falsy items",
"options": {
"rows": [
[
diff --git a/packages/govuk-frontend/dist/govuk/components/tabs/fixtures.json b/packages/govuk-frontend/dist/govuk/components/tabs/fixtures.json
index edc0d33c0..c8ee18c19 100644
--- a/packages/govuk-frontend/dist/govuk/components/tabs/fixtures.json
+++ b/packages/govuk-frontend/dist/govuk/components/tabs/fixtures.json
@@ -219,7 +219,7 @@
"html": "<div class=\"govuk-tabs\" data-module=\"govuk-tabs\">\n <h2 class=\"govuk-tabs__title\">\n Contents\n </h2>\n</div>"
},
{
- "name": "with falsey values",
+ "name": "with falsy values",
"options": {
"items": [
{
Action run for 39de1c8 |
745a56f
to
bb4873f
Compare
bb4873f
to
39de1c8
Compare
Before I review, I wanted to add some extra anecdotal evidence that "falsy" is the way to go |
owenatgov
approved these changes
Jun 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EZ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I noticed a typo in some of our tests using
falsely
instead offalsey
. Then I noticed we use both falsy and falsey across the codebase.There were more examples of
falsy
, and we have methods using this spelling. It also seems to be generally preferred.