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 import from some files #32512

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Nov 14, 2024

Many files do not directly depend on jQuery now.

To clarify the usage: use fomanticQuery to operate Fomantic components.

Then developers could focus on removing the remaining jQuery usages by searching import $ globally.

21 files now:

./components/RepoBranchTagSelector.vue:3:import $ from 'jquery';
./features/admin/common.ts:1:import $ from 'jquery';
./features/admin/emails.ts:1:import $ from 'jquery';
./features/common-button.ts:1:import $ from 'jquery';
./features/comp/ComboMarkdownEditor.ts:3:import $ from 'jquery'; (I am working on it, there will be a new PR)
./features/comp/LabelEdit.ts:1:import $ from 'jquery';
./features/notification.ts:1:import $ from 'jquery';
./features/org-team.ts:1:import $ from 'jquery';
./features/repo-code.ts:1:import $ from 'jquery';
./features/repo-common.ts:1:import $ from 'jquery';
./features/repo-diff.ts:1:import $ from 'jquery';
./features/repo-editor.ts:1:import $ from 'jquery';
./features/repo-issue-content.ts:1:import $ from 'jquery';
./features/repo-issue-list.ts:1:import $ from 'jquery';
./features/repo-issue-sidebar.ts:1:import $ from 'jquery';
./features/repo-issue.ts:1:import $ from 'jquery';
./features/repo-legacy.ts:1:import $ from 'jquery';
./features/repo-new.ts:1:import $ from 'jquery';
./features/repo-projects.ts:1:import $ from 'jquery';
./features/repo-settings.ts:1:import $ from 'jquery';
./features/repo-template.ts:1:import $ from 'jquery';

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 14, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 14, 2024
@wxiaoguang wxiaoguang added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Nov 14, 2024
@wxiaoguang wxiaoguang added this to the 1.23.0 milestone Nov 14, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 14, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 14, 2024
@lunny lunny merged commit 249e676 into go-gitea:main Nov 14, 2024
26 checks passed
@wxiaoguang wxiaoguang deleted the refactor-jquery branch November 14, 2024 23:59
zjjhot added a commit to zjjhot/gitea that referenced this pull request Nov 15, 2024
* giteaofficial/main:
  Fix oauth2 error handle not return immediately (go-gitea#32514)
  Fix incorrect project page CSS class (go-gitea#32510)
  Add avif image file support (go-gitea#32508)
  Reduce integration test overhead (go-gitea#32475)
  Remove jQuery import from some files (go-gitea#32512)
  Trim title before insert/update to database to match the size requirements of database (go-gitea#32498)
  Reimplement GetUserOrgsList to make it simple and clear (go-gitea#32486)
yp05327 added a commit to yp05327/gitea that referenced this pull request Nov 28, 2024
@wxiaoguang
Copy link
Contributor Author

./features/comp/ComboMarkdownEditor.ts:3:import $ from 'jquery'; (I am working on it, there will be a new PR)

This is done. And with other rewritings, now only 17 files left:

./js/features/admin/common.ts:1:import $ from 'jquery';
./js/features/comp/LabelEdit.ts:1:import $ from 'jquery';
./js/features/notification.ts:1:import $ from 'jquery';
./js/features/org-team.ts:1:import $ from 'jquery';
./js/features/repo-code.ts:1:import $ from 'jquery';
./js/features/repo-common.ts:1:import $ from 'jquery';
./js/features/repo-diff.ts:1:import $ from 'jquery';
./js/features/repo-editor.ts:1:import $ from 'jquery';
./js/features/repo-issue-content.ts:1:import $ from 'jquery';
./js/features/repo-issue-list.ts:1:import $ from 'jquery';
./js/features/repo-issue-sidebar.ts:1:import $ from 'jquery';
./js/features/repo-issue.ts:1:import $ from 'jquery';
./js/features/repo-legacy.ts:1:import $ from 'jquery';
./js/features/repo-new.ts:1:import $ from 'jquery';
./js/features/repo-projects.ts:1:import $ from 'jquery';
./js/features/repo-settings.ts:1:import $ from 'jquery';
./js/features/repo-template.ts:1:import $ from 'jquery';

@wxiaoguang
Copy link
Contributor Author

Next removal: Fix file editor & preview #32706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants