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 fomantic api module #30400

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Remove fomantic api module #30400

wants to merge 6 commits into from

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Apr 10, 2024

I'm 95% sure this module is unused. We do not call .api() anywhere in our JS and that seems required for that module to work as far as I can tell. I think the only danger is if another fomantic module depends on it, so we should carefully check everything.

@wxiaoguang do you recall any place where this module could still be used?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 10, 2024
@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Apr 10, 2024
@silverwind silverwind added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Apr 10, 2024
@wxiaoguang
Copy link
Contributor

I am 100% sure it is widely used. apiSettings

@silverwind
Copy link
Member Author

silverwind commented Apr 11, 2024

I see, so we need to shim$.fn.api. 9 uses in total.

web_src/js/features/repo-issue.js:114:      apiSettings: {
web_src/js/features/repo-issue.js:325:      apiSettings: {
web_src/js/features/repo-home.js:87:    apiSettings: {
web_src/js/features/repo-issue-list.js:105:    apiSettings: {
web_src/js/features/comp/SearchUserBox.js:16:    apiSettings: {
web_src/js/features/repo-settings.js:53:    apiSettings: {
web_src/js/features/repo-template.js:26:        apiSettings: {
web_src/js/features/repo-issue-content.js:107:    apiSettings: {
web_src/js/features/org-team.js:22:    apiSettings: {
image

@silverwind silverwind marked this pull request as draft April 11, 2024 00:28
@silverwind
Copy link
Member Author

Guess I revisit later.

@silverwind silverwind closed this Apr 11, 2024
@silverwind silverwind deleted the rmapi branch April 11, 2024 07:08
@silverwind silverwind restored the rmapi branch April 14, 2024 17:34
@silverwind silverwind reopened this Apr 14, 2024
* origin/main: (35 commits)
  Remove fomantic button module (go-gitea#30475)
  Improve "must-change-password" logic and document (go-gitea#30472)
  Fix commitstatus summary (go-gitea#30431)
  Remove fomantic menu module (go-gitea#30325)
  Use `flex-container` for dashboard layout (go-gitea#30214)
  Rewrite and restyle reaction selector and enable no-sizzle eslint rule (go-gitea#30453)
  Pulse page improvements (go-gitea#30149)
  Fix JS error when opening to expanded code comment (go-gitea#30463)
  fix: Fix to delete cookie when AppSubURL is non-empty (go-gitea#30375)
  Add `interface{}` to `any` replacement to `make fmt`, exclude `*.pb.go` (go-gitea#30461)
  Fix network error when open/close organization/individual projects and redirect to project page (go-gitea#30387)
  Avoid losing token when updating mirror settings (go-gitea#30429)
  Fix label rendering (go-gitea#30456)
  Add comment for ContainsRedirectURI about the exact match (go-gitea#30457)
  Update JS and PY deps, lock eslint and related plugins (go-gitea#30452)
  Refactor cache and disable go-chi cache (go-gitea#30417)
  Fix admin notice view-detail (go-gitea#30450)
  Fix mirror error when mirror repo is empty (go-gitea#30432)
  Add `/public/assets/img/webpack` to ignore files again (go-gitea#30451)
  Lock a few tool dependencies to major versions (go-gitea#30439)
  ...
@silverwind
Copy link
Member Author

Pushed some WIP JS, it's not working currently.

@silverwind
Copy link
Member Author

silverwind commented Apr 14, 2024

Current challenge is to find out what dropdown wants in return to query argument:

image

Also, need to restore what the previous patch did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/js size/XXL Denotes a PR that changes 1000+ 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.

None yet

3 participants