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

add margin top to the top of branches #23002

Merged
merged 5 commits into from
Feb 21, 2023

Conversation

HesterG
Copy link
Contributor

@HesterG HesterG commented Feb 20, 2023

add margin top as mentioned in #22973

delvh

This comment was marked as outdated.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 20, 2023
@HesterG HesterG changed the title fix margin add margin top to the top of branches Feb 20, 2023
@HesterG
Copy link
Contributor Author

HesterG commented Feb 20, 2023

@delvh that's true, thanks for reviewing. Changed list.tmpl and use helper.less to add margin top instead, please review again.

@HesterG HesterG requested a review from delvh February 20, 2023 10:15
web_src/less/_base.less Outdated Show resolved Hide 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 Feb 20, 2023
@@ -5,7 +5,7 @@
{{template "base/alert" .}}
{{template "repo/sub_menu" .}}
{{if .DefaultBranchBranch}}
<h4 class="ui top attached header">
<h4 class="ui top attached header gt-mt-4">
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suppose you still need another change (line 46)

The logic is:

{{if DefaultBranchBranch}}
    <h4 class="ui top attached header gt-mt-4"></h4>
    ...
{{end}}


{{if gt (len .Branches) 1}}
    <h4 class="ui top attached header /* HERE */"></h4>
    ...
{{end}}

Copy link
Contributor

@wxiaoguang wxiaoguang Feb 20, 2023

Choose a reason for hiding this comment

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

Or maybe the " top attached " just means that there is no padding/margin before .... so if you look into details, you may find more clues .....


Update: The Fomantic UI document https://fomantic-ui.com/elements/header.html#attached

Copy link
Contributor Author

@HesterG HesterG Feb 21, 2023

Choose a reason for hiding this comment

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

I would suppose you still need another change (line 46)

The logic is:

{{if DefaultBranchBranch}}
    <h4 class="ui top attached header gt-mt-4"></h4>
    ...
{{end}}


{{if gt (len .Branches) 1}}
    <h4 class="ui top attached header /* HERE */"></h4>
    ...
{{end}}

For the line46, it actually already had margin top, as shown below:

截屏2023-02-21 09 28 09

It matches the following rule defined in _base.less

.ui.attached.segment ~ .ui.top.attached.header {
    margin-top: 1rem;
}

Or is it something other than margin-top that needs to be changed?

Checked the document, i think the original intention of attached header does mean that it is an attached header to other, but here we might not delete attach, because it is used in many selectors.

@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Feb 20, 2023
Copy link
Member

@lunny lunny left a comment

Choose a reason for hiding this comment

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

As a quick fix, I think it's enough.

@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 Feb 21, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 21, 2023
@lunny
Copy link
Member

lunny commented Feb 21, 2023

LG-TM bot

@lunny lunny merged commit e3cffa7 into go-gitea:main Feb 21, 2023
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 21, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 21, 2023
* upstream/main: (23 commits)
  add margin top to the top of branches (go-gitea#23002)
  Add me to maintainers (go-gitea#23026)
  Render access log template as text instead of HTML (go-gitea#23013)
  Use `gt-relative` class instead of the ambiguous `gt-pr` class  (go-gitea#23008)
  Fix intermittent panic in notify issue change content (go-gitea#23019)
  Improve pull_request_template.md (go-gitea#22888)
  Hide 2FA status from other members in organization members list (go-gitea#22999)
  handle deprecated settings (go-gitea#22992)
  Add scopes to API to create token and display them (go-gitea#22989)
  Remove unnecessary and incorrect `find('.menu').toggle()` (go-gitea#22987)
  Improve issues.LoadProject (go-gitea#22982)
  Add 1.18.4 changelog (go-gitea#22991) (go-gitea#22995)
  Fix pull request branch selector visible without clicking Edit (go-gitea#23012)
  Bump golang.org/x/net from 0.4.0 to 0.7.0 (go-gitea#22980)
  Fix panic when call api (/repos/{owner}/{repo}/pulls/{index}/files) (go-gitea#22921)
  only trigger docs build and publish when docs changed (go-gitea#22968)
  Get rules by id when editing branch protection rule (go-gitea#22932)
  Fix hidden commit status on multiple checks (go-gitea#22889)
  Add me to maintainers (go-gitea#22998)
  Add all units to the units permission list in org team members sidebar (go-gitea#22971)
  ...
@HesterG HesterG deleted the fix-margin-issue22937 branch March 1, 2023 06:28
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
@delvh delvh added this to the 1.20.0 milestone May 10, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants