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

Standardise spelling to "falsy" #5061

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Standardise spelling to "falsy" #5061

merged 1 commit into from
Jun 10, 2024

Conversation

domoscargin
Copy link
Contributor

I noticed a typo in some of our tests using falsely instead of falsey. 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.

Copy link

github-actions bot commented Jun 10, 2024

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.37 KiB
dist/govuk-frontend-development.min.js 42.34 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 88.16 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 82.83 KiB
packages/govuk-frontend/dist/govuk/all.mjs 981 B
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.36 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.33 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 4.86 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 78.45 KiB 40.31 KiB
accordion.mjs 22.71 KiB 12.85 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for 39de1c8

Copy link

github-actions bot commented Jun 10, 2024

Other changes to npm package

diff --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

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5061 June 10, 2024 15:38 Inactive
@owenatgov
Copy link
Contributor

Before I review, I wanted to add some extra anecdotal evidence that "falsy" is the way to go

Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

EZ

@domoscargin domoscargin merged commit be1c473 into main Jun 10, 2024
48 checks passed
@domoscargin domoscargin deleted the bk-falsey-fix branch June 10, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants