-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Refactor file view & render #30227
Refactor file view & render #30227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've thought for a bit about whether it might make sense to extract the too large
checks above the switch
so that it is always displayed when necessary.
However, since you cannot view binary files anyway, it wouldn't make sense
I have also thought about it. By my understanding, the |
The old code is inconsistent and fragile, and the UI isn't right.
Backport #30227 by wxiaoguang The old code is inconsistent and fragile, and the UI isn't right. Co-authored-by: wxiaoguang <[email protected]>
* giteaofficial/main: Refactor "dump" sub-command (go-gitea#30240) Add -u git to docs when using docker exec with root installation (go-gitea#29314) Show 12 lines in markup code preview (go-gitea#30255) Fixes go-gitea#27605: inline math blocks can't be preceeded/followed by alphanumerical characters (go-gitea#30175) Render embedded code preview by permlink in markdown (go-gitea#30234) Fix missing 0 prefix of GPG key id (go-gitea#30245) Fix spacing in issue navbar (go-gitea#30238) Add unique index for project_issue to prevent duplicate data (go-gitea#30190) [skip ci] Updated translations via Crowdin Refactor commit signature parser (go-gitea#30228) Refactor dropzone (go-gitea#30232) Remove scheduled action tasks if the repo is archived (go-gitea#30224) Refactor file view & render (go-gitea#30227) Refactor DeleteInactiveUsers, fix bug and add tests (go-gitea#30206) [skip ci] Updated licenses and gitignores Add `/options/license` and `/options/gitignore` to `.ignore` (go-gitea#30219)
The old code is inconsistent and fragile, and the UI isn't right.
The old code is inconsistent and fragile, and the UI isn't right.
This PR focuses on refactoring some legacy logic and fix the UI. Some comments are left because it seems to need more time to do deep refactorings in the future.
Before
After