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

Diff improvements #23553

Merged
merged 29 commits into from
Mar 30, 2023
Merged

Diff improvements #23553

merged 29 commits into from
Mar 30, 2023

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Mar 18, 2023

  • Avoid flash of wrong tree toggle icon on page load by setting icon based on sync state
  • Avoid "pop-in" of tree on page load by leaving space based on sync state
  • Use the same border/box-shadow combo used on comment :target also for file :target.
  • Refactor DiffFileTree.vue to use toggleElem instead of hardcoded class name.
  • Left-align inline comment boxes and make them fit the same amount of markup content on a line as GitHub.
  • Fix height of diff-file-list

Fixes: #23593

Screenshot 2023-03-18 at 00 52 04

Screenshot 2023-03-18 at 00 59 43

Screenshot 2023-03-18 at 01 27 14

Screenshot 2023-03-19 at 21 44 16

(Yes I'm aware the border-radius in bottom corners is suboptimal, but this would be notorously hard to fix without relying on overflow: hidden).

@silverwind silverwind added topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality outdated/backport/v1.19 This PR should be backported to Gitea 1.19 labels Mar 18, 2023
@silverwind silverwind changed the title Diff improvements Diff improvements, fix sticky header position Mar 18, 2023
@silverwind
Copy link
Member Author

silverwind commented Mar 18, 2023

I would say this should go into 1.19.0 release, because the backport #23546 includes the sticky header regression.

Split again into #23554.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 18, 2023
@silverwind silverwind added this to the 1.19.0 milestone Mar 18, 2023
@silverwind silverwind modified the milestones: 1.19.0, 1.20.0 Mar 18, 2023
@silverwind silverwind changed the title Diff improvements, fix sticky header position Diff improvements Mar 18, 2023
web_src/js/components/DiffFileTree.vue Outdated Show resolved Hide resolved
web_src/css/repository.css Outdated Show resolved Hide resolved
@silverwind
Copy link
Member Author

silverwind commented Mar 19, 2023

Another small but useful change: Review comment boxes now left-align and fit the same content per line as GitHub's boxes.

Screenshot 2023-03-19 at 21 44 16

Screenshot 2023-03-19 at 21 44 25

@silverwind
Copy link
Member Author

Ready again.

@silverwind
Copy link
Member Author

silverwind commented Mar 19, 2023

There is one more bug I'll try to fix. With many files in a diff, the tree shrinks to a tiny height. Example page. I have a fix the almost works but the tree scrolls partially out of view when the page end is reached, so it's not ideal.

image

@silverwind
Copy link
Member Author

silverwind commented Mar 25, 2023

Both issues fixed, they were regressions from #23570.

So I'd say this is again ready for review.

@silverwind
Copy link
Member Author

Everything resolved.

@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 Mar 28, 2023
@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 Mar 29, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 30, 2023
@lunny lunny merged commit aa4d1d9 into go-gitea:main Mar 30, 2023
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 30, 2023
@silverwind silverwind deleted the diff-improve branch March 30, 2023 13:14
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 31, 2023
* upstream/main:
  [skip ci] Updated translations via Crowdin
  Fix dropdown direction behavior (go-gitea#23806)
  Fix incorrect/Improve error handle in edit user page (go-gitea#23805)
  Fix "Updating branch by merge" bug in "update_branch_by_merge.tmpl" (go-gitea#23790)
  Fix incorrect visibility dropdown list in add/edit user page (go-gitea#23804)
  Convert issue list checkboxes to native (go-gitea#23596)
  Fix checks for `needs` in Actions (go-gitea#23789)
  Diff improvements (go-gitea#23553)
  [Patch] Fix closed PR also triggers Webhooks and actions (go-gitea#23782)
  Improve backport-locales.go (go-gitea#23807)
  [skip ci] Updated translations via Crowdin
  Refactor commit status for Actions jobs (go-gitea#23786)
  Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (go-gitea#23766)
  Don't apply the group filter when listing LDAP group membership if it is empty (go-gitea#23745)
KN4CK3R pushed a commit that referenced this pull request Apr 6, 2023
Small extract from #23553 for
1.19:

Before:
<img width="1190" alt="Screenshot 2023-04-05 at 21 47 55"
src="https://user-images.githubusercontent.com/115237/230190330-3cee8904-8558-43ea-b9d3-424d807d0b73.png">

After:
<img width="1181" alt="Screenshot 2023-04-05 at 21 47 38"
src="https://user-images.githubusercontent.com/115237/230190315-c1c3cae5-1bc3-4c2d-bd3d-c119fa01be82.png">
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI type/bug type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File picker broken
7 participants