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

Remove jQuery #1431

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from
Draft

Remove jQuery #1431

wants to merge 13 commits into from

Conversation

ArtOfCode-
Copy link
Member

@ArtOfCode- ArtOfCode- commented Oct 12, 2024

Removes the jQuery dependency from our code - see #1429.

WIP: Re-write scripts to use vanilla JS instead of jQuery.

Once scripts are rewritten we can remove the dependency itself.

Help wanted!

TODO LIST - please tick a file if you're about to review & update it so we don't duplicate work.

  • micro_auth/apps.js
  • admin.js
  • application.js
  • caret.js (utility, no update needed)
  • categories.js
  • character_count.js
  • closure.js
  • codeblocks.js
  • comments.js
  • donations.js
  • embed.js
  • filters.js
  • flags.js
  • keyboard_tools.js
  • latex_escape.js (utility, update not required)
  • licenses.js
  • markdown.js
  • mod_warning.js
  • modals.js
  • moderator.js
  • notifications.js
  • post_histories.js
  • posts.js
  • preferences.js
  • privileges.js
  • qpixel_api.js
  • qpixel_dom.js
  • reactions.js
  • search.js
  • site_settings.js
  • subscriptions.js
  • suggested_edits.js
  • tag_sets.js
  • tags.js
  • textarea_popup.js
  • tour.js
  • two_factor.js
  • users.js
  • votes.js

@ArtOfCode- ArtOfCode- linked an issue Oct 12, 2024 that may be closed by this pull request
@ArtOfCode-
Copy link
Member Author

ArtOfCode- commented Oct 12, 2024

Slight roadblock: rails-ujs also depends on jQuery. This powers things like remote links/forms, which we use a bunch of. It's not impossible to replace, but it's a bunch more work.

My strategy at the moment is going to be to start by converting everything that doesn't use rails-ujs, leaving those bits as jQuery for the moment.

@ArtOfCode- ArtOfCode- added area: html/css/js Changes to front-end code meta: good first issue Good for newcomers meta: help wanted Extra attention is needed status: in progress This is being worked on type: change request New feature or request priority: low dependencies Pull requests that update a dependency file hacktoberfest This repo participates in Hacktoberfest. For suitable issues and Hacktoberfest-PRs complexity: average Not particularly hard, not particularly trivial. labels Oct 12, 2024
@ArtOfCode-
Copy link
Member Author

ArtOfCode- commented Oct 12, 2024

Roadblock number 2: we use select2 for our interactive <select> elements, which is a jQuery plugin.

@Oaphi Oaphi requested review from a team October 27, 2024 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: html/css/js Changes to front-end code complexity: average Not particularly hard, not particularly trivial. dependencies Pull requests that update a dependency file hacktoberfest This repo participates in Hacktoberfest. For suitable issues and Hacktoberfest-PRs meta: good first issue Good for newcomers meta: help wanted Extra attention is needed priority: low status: in progress This is being worked on type: change request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code style: discuss removing dependency on jQuery
3 participants