diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 44a5bb933664..951dca15f0b3 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,8 +4,6 @@ ### Checks -- [ ] Adding/modifying Typescript code? - - [ ] I have used `qs`, `qsa` or `qsr` instead of JQuery selectors. - [ ] Adding quotes? - [ ] Make sure to include translations for the quotes in the description (or another comment) so we can verify their content. - [ ] Adding a language? diff --git a/docs/CONTRIBUTING_ADVANCED.md b/docs/CONTRIBUTING_ADVANCED.md index 5eb1f71220f5..b9b855a986b2 100644 --- a/docs/CONTRIBUTING_ADVANCED.md +++ b/docs/CONTRIBUTING_ADVANCED.md @@ -150,8 +150,6 @@ If you are on a UNIX system and you get a spawn error, run npm with `sudo`. Code formatting is enforced by [Prettier](https://prettier.io/docs/en/install.html), which automatically runs every time you make a commit. -We are currently in the process of converting from JQuery to vanilla JS. When submitting new code, please use the `qs`, `qsa` and `qsr` helper functions. These return a class with a lot of JQuery-like methods. You can read how they work and import them from `frontend/src/ts/utils/dom.ts`. - For guidelines on commit messages, adding themes, languages, or quotes, please refer to [CONTRIBUTING.md](./CONTRIBUTING.md). Following these guidelines will increase the chances of getting your change accepted. ## Questions diff --git a/frontend/__tests__/__harness__/setup-jquery.ts b/frontend/__tests__/__harness__/setup-jquery.ts deleted file mode 100644 index ae671c34afdb..000000000000 --- a/frontend/__tests__/__harness__/setup-jquery.ts +++ /dev/null @@ -1,6 +0,0 @@ -import $ from "jquery"; - -//@ts-expect-error add to global -global["$"] = $; -//@ts-expect-error add to global -global["jQuery"] = $; diff --git a/frontend/__tests__/test/layout-emulator.spec.ts b/frontend/__tests__/test/layout-emulator.spec.ts index 5dc0b902f5b9..e507ba663f8a 100644 --- a/frontend/__tests__/test/layout-emulator.spec.ts +++ b/frontend/__tests__/test/layout-emulator.spec.ts @@ -13,14 +13,11 @@ describe("LayoutEmulator", () => { updateAltGrState(event); }); - const createEvent = ( - code: string, - type: string, - ): JQuery.KeyboardEventBase => + const createEvent = (code: string, type: string): KeyboardEvent => ({ code, type, - }) as JQuery.KeyboardEventBase; + }) as KeyboardEvent; it("should set isAltGrPressed to true on AltRight keydown", () => { const event = createEvent("AltRight", "keydown"); diff --git a/frontend/__tests__/utils/dom.jsdom-spec.ts b/frontend/__tests__/utils/dom.jsdom-spec.ts index 238623106bad..2f2797912172 100644 --- a/frontend/__tests__/utils/dom.jsdom-spec.ts +++ b/frontend/__tests__/utils/dom.jsdom-spec.ts @@ -26,7 +26,6 @@ describe("dom", () => { handler({ target: e.target, childTarget: e.childTarget, - //@ts-expect-error will be added later, check TODO on the ChildEvent currentTarget: e.currentTarget, }), ); @@ -130,10 +129,6 @@ describe("dom", () => { await userEvent.click(clickTarget); //THEN - - //This is the same behavior as jQuery `.on` with selector. - //The handler will be called two times, - //It does NOT call on the
or the parent element itself expect(handler).toHaveBeenCalledTimes(2); //First call is for childTarget inner2 (grand child of parent) diff --git a/frontend/package.json b/frontend/package.json index ac913df2bbf3..bac5f695da18 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -47,7 +47,6 @@ "hangul-js": "0.2.6", "howler": "2.2.3", "idb": "8.0.3", - "jquery": "3.7.1", "konami": "1.7.0", "lz-ts": "1.1.2", "modern-screenshot": "4.6.5", @@ -73,7 +72,6 @@ "@types/chartjs-plugin-trendline": "1.0.1", "@types/damerau-levenshtein": "1.0.0", "@types/howler": "2.2.7", - "@types/jquery": "3.5.14", "@types/node": "24.9.1", "@types/object-hash": "3.0.6", "@types/subset-font": "1.4.3", diff --git a/frontend/src/ts/components/layout/footer/Footer.tsx b/frontend/src/ts/components/layout/footer/Footer.tsx index 1f915b61cb7c..32c4bcee956b 100644 --- a/frontend/src/ts/components/layout/footer/Footer.tsx +++ b/frontend/src/ts/components/layout/footer/Footer.tsx @@ -4,23 +4,14 @@ import { getFocus } from "../../../signals/core"; import { showModal } from "../../../stores/modals"; import { Button } from "../../common/Button"; +import { Keytips } from "./Keytips"; import { ThemeIndicator } from "./ThemeIndicator"; import { VersionButton } from "./VersionButton"; export function Footer(): JSXElement { return (
- +