Skip to content

Commit

Permalink
Clean up some workarounds for old upstream bugs (#40199)
Browse files Browse the repository at this point in the history
* We no longer need to care about nanoid v3 thinking "browser === esm",
  because the GB package that had that dep no longer does.
* Various `jsx-a11y/label-has-associated-control` ignores referring to
  jsx-eslint/eslint-plugin-jsx-a11y#869 seem to be fixed now that #39736
  requires we use `htmlFor`. The one place still needing an ignore is
  jsx-eslint/eslint-plugin-jsx-a11y#578 instead.
* Remove reference to deleted renovate issue.
* Move reference to a Storybook bug to the code actually implementing
  the workaround.
* Update Storybook FAQ reference.
* Remove TODO references to a fixed Storybook bug (and fix a wrong prop
  in one story).
* Remove workaround for WordPress/WordPress-Coding-Standards#2390.

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11896972496

Upstream-Ref: Automattic/jetpack@62e385b
  • Loading branch information
anomiex authored and matticbot committed Nov 18, 2024
1 parent 3088443 commit 295982b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [3.1.13-alpha] - unreleased

This is an alpha version! The changes listed here are not final.

### Changed
- Update example with ids for jsx-a11y/label-has-associated-control.

## [3.1.12] - 2024-11-14
### Changed
- Update dependencies.
Expand Down Expand Up @@ -172,6 +179,7 @@

- Build: Refactored (aligned build system with Gridicons).

[3.1.13-alpha]: https://github.com/Automattic/social-logos/compare/v3.1.12...v3.1.13-alpha
[3.1.12]: https://github.com/Automattic/social-logos/compare/v3.1.11...v3.1.12
[3.1.11]: https://github.com/Automattic/social-logos/compare/v3.1.10...v3.1.11
[3.1.10]: https://github.com/Automattic/social-logos/compare/v3.1.9...v3.1.10
Expand Down
2 changes: 1 addition & 1 deletion build/react/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ function SocialLogosExample() {
setShowIconNames(e.target.checked);
}, [setShowIconNames]);
const allSocialLogos = social_logo_data_1.SocialLogoData.map(logo => ((0, jsx_runtime_1.jsx)(SocialLogoItemExample, { name: logo.name, iconSize: iconSize, showIconNames: showIconNames }, logo.name)));
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "social-logos-example" }, { children: [(0, jsx_runtime_1.jsx)("h1", { children: "Social Logos" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control-group" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control" }, { children: [(0, jsx_runtime_1.jsx)("h4", { children: "Small icons" }), (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "switch" }, { children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", onChange: handleSmallIconsToggle, checked: useSmallIcons }), (0, jsx_runtime_1.jsx)("span", { className: "handle" })] }))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control" }, { children: [(0, jsx_runtime_1.jsx)("h4", { children: "Icon names" }), (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "switch" }, { children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", onChange: handleIconNamesToggle, checked: showIconNames }), (0, jsx_runtime_1.jsx)("span", { className: "handle" }), (0, jsx_runtime_1.jsx)("span", { className: "switch-label", "data-on": "On", "data-off": "Off" })] }))] }))] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "icons" }, { children: allSocialLogos })), (0, jsx_runtime_1.jsx)("p", { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: "https://github.com/Automattic/social-logos" }, { children: "GitHub" })) })] })));
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "social-logos-example" }, { children: [(0, jsx_runtime_1.jsx)("h1", { children: "Social Logos" }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control-group" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control" }, { children: [(0, jsx_runtime_1.jsx)("h4", { children: "Small icons" }), (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "switch", htmlFor: "useSmallIcons" }, { children: [(0, jsx_runtime_1.jsx)("input", { id: "useSmallIcons", type: "checkbox", onChange: handleSmallIconsToggle, checked: useSmallIcons }), (0, jsx_runtime_1.jsx)("span", { className: "handle" })] }))] })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "display-control" }, { children: [(0, jsx_runtime_1.jsx)("h4", { children: "Icon names" }), (0, jsx_runtime_1.jsxs)("label", Object.assign({ className: "switch", htmlFor: "showIconNames" }, { children: [(0, jsx_runtime_1.jsx)("input", { id: "showIconNames", type: "checkbox", onChange: handleIconNamesToggle, checked: showIconNames }), (0, jsx_runtime_1.jsx)("span", { className: "handle" }), (0, jsx_runtime_1.jsx)("span", { className: "switch-label", "data-on": "On", "data-off": "Off" })] }))] }))] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "icons" }, { children: allSocialLogos })), (0, jsx_runtime_1.jsx)("p", { children: (0, jsx_runtime_1.jsx)("a", Object.assign({ href: "https://github.com/Automattic/social-logos" }, { children: "GitHub" })) })] })));
}
exports.default = SocialLogosExample;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "social-logos",
"version": "3.1.12",
"version": "3.1.13-alpha",
"description": "A repository of all the social logos used on WordPress.com.",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/social-logos/",
"bugs": {
Expand Down

0 comments on commit 295982b

Please sign in to comment.