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

Fix:the rounded corners of the folded file are not displayed correctly #29953

Merged
merged 7 commits into from
Mar 29, 2024

Conversation

HEREYUA
Copy link
Contributor

@HEREYUA HEREYUA commented Mar 21, 2024

Fix: #29933

Before

image

After

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 21, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 21, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Mar 21, 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 Mar 21, 2024
@silverwind
Copy link
Member

silverwind commented Mar 21, 2024

How does it look in expanded state? I recall this was a tricky fix because the CSS needed to deal with expanded state differently, and I think there might be some dead CSS lying around for this.

@HEREYUA
Copy link
Contributor Author

HEREYUA commented Mar 21, 2024

It appears to be showing normally in the expanded state, but I've only modified this spot, and I'm not sure if there are places I haven't noticed
image

@silverwind
Copy link
Member

silverwind commented Mar 21, 2024

Looks okay, but I will check in detail later if this can be improved further so it only targets the collapsed state. Also I will try to use blame to find my old change so any unused CSS can be removed.

@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 21, 2024
Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block until I have investigated.

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Mar 21, 2024
* main: (106 commits)
  Relax generic package filename restrictions (go-gitea#30135)
  Remove jQuery class from the common admin functions (go-gitea#30137)
  Remove jQuery class from the reaction selector (go-gitea#30138)
  Forbid jQuery `.attr` (go-gitea#30116)
  Refactor render (go-gitea#30136)
  Fix: Organization Interface Display Issue (go-gitea#30133)
  Remove jQuery `.attr` from the Fomantic dropdowns (go-gitea#30114)
  Remove jQuery `.attr` from the common admin functions (go-gitea#30115)
  Remove jQuery from the create/rename branch modals (except Fomantic) (go-gitea#30109)
  Remove fomantic label module (go-gitea#30081)
  Fix bug for markdown rendering of blockquote (go-gitea#30130)
  Fix: The interface is broken when modifying  code comments under mobile devices  (go-gitea#30125)
  When the title in the issue has a value, set the text cursor at the end of the text. (go-gitea#30090)
  Load attachments for code comments (go-gitea#30124)
  Upgrade fabric to 6.0.0-beta20 (go-gitea#30121)
  Fix click handler in job-step-summary (go-gitea#30122)
  Put an edit file button on pull request files to allow a quick operation (go-gitea#29697)
  Remove jQuery `.attr` from the Fomantic modal cancel buttons (go-gitea#30113)
  Remove jQuery `.attr` from the code comments (go-gitea#30112)
  Remove jQuery calls that have no effect on `showElem` and `hideElem` (go-gitea#30110)
  ...
@silverwind
Copy link
Member

silverwind commented Mar 27, 2024

I pushed an alternative fix:

.ui.segments:not(.horizontal) > .segment:has(~ .tw-hidden) {
  border-radius: 0.28571429rem;
}

This selector means "any segment that is followed by one or more hidden elements". In a situation with no hidden elements, .ui.segments:not(.horizontal) > .segment:last-child would match but with hidden elements, the method breaks because then the element is no longer the last child:

image

@wxiaoguang fyi, this is another case where selecting for .tw-hidden is the only way to fix an issue. A better fix would be if the collapsed children would be removed from DOM, then :last-child would work, of course.

@github-actions github-actions bot removed the modifies/templates This PR modifies the template files label Mar 27, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged labels Mar 27, 2024
@silverwind silverwind requested review from lunny and delvh March 27, 2024 20:03
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Mar 27, 2024
wxiaoguang

This comment was marked as outdated.

@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 28, 2024
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 28, 2024
@wxiaoguang wxiaoguang self-assigned this Mar 28, 2024
@silverwind
Copy link
Member

silverwind commented Mar 28, 2024

The only cleaner solution that I see it to remove collapsed elements from the DOM, after which fomantic styles will work as expected. It may be possible because I think this toggling is happening in our JS.

Another solution may be to create a new generic expander element with <details> element but I think then we have to remove fomantic styles.

@wxiaoguang wxiaoguang removed their assignment Mar 29, 2024
@silverwind
Copy link
Member

silverwind commented Mar 29, 2024

Let's merge it imho, I think the solution is good as long as we have a single class to hide elements. I also commented on StackOverflow on this topic. The other solutions on there are all garbage imho.

@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 29, 2024
@silverwind silverwind enabled auto-merge (squash) March 29, 2024 15:35
@silverwind silverwind added backport/v1.21 This PR should be backported to Gitea 1.21 backport/v1.22 This PR should be backported to Gitea 1.22 type/bug and removed backport/v1.21 This PR should be backported to Gitea 1.21 labels Mar 29, 2024
@silverwind silverwind merged commit c9068ef into go-gitea:main Mar 29, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Mar 29, 2024
@GiteaBot GiteaBot added backport/done All backports for this PR have been created and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Mar 29, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 30, 2024
* giteaofficial/main:
  Include encoding in signature payload (go-gitea#30174)
  Add `stylelint-value-no-unknown-custom-properties` and convert stylelint config to js (go-gitea#30117)
  Remove jQuery class from the commit button (go-gitea#30178)
  Remove jQuery class from the diff view (go-gitea#30176)
  Remove jQuery class from the notification count (go-gitea#30172)
  Remove jQuery class from the code range selection (go-gitea#30173)
  Fix:the rounded corners of the folded file are not displayed correctly (go-gitea#29953)
  Add setting to disable user features when user login type is not plain (go-gitea#29615)

# Conflicts:
#	models/user/user.go
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The corners of the folded review files in pull request conversation page are not right.
6 participants