Skip to content

fix tags line no margin #25255

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

Closed
wants to merge 8 commits into from
Closed

fix tags line no margin #25255

wants to merge 8 commits into from

Conversation

hiifong
Copy link
Member

@hiifong hiifong commented Jun 14, 2023

Before:
image

After:
image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 14, 2023
@wolfogre wolfogre added the topic/ui Change the appearance of the Gitea UI label Jun 14, 2023
@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 Jun 14, 2023
@silverwind silverwind added the backport/v1.20 This PR should be backported to Gitea 1.20 label Jun 14, 2023
@@ -54,9 +54,9 @@
{{$description := .DescriptionHTML $.Context}}
{{if $description}}<p>{{$description}}</p>{{end}}
{{if .Topics}}
<div class="ui tags">
<div class="gt-df gt-fw gt-gap-2 gt-mb-3 gt-font-normal gt-font-14">
Copy link
Contributor

Choose a reason for hiding this comment

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

What does "gt-font-normal gt-font-14" do here? Why two font styles.

And, if you think the font is too small, you can just remove the "small" class from the "label", but not use these gt-font-xxx patches.

Copy link
Member

@silverwind silverwind Jun 14, 2023

Choose a reason for hiding this comment

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

Normal is weight, 14 is size, so two classes is correct to override both. It might be that fomantic styles are interfering too much, not sure if there are better solutions. I do agree previous labels were too small.

Copy link
Contributor

@wxiaoguang wxiaoguang Jun 15, 2023

Choose a reason for hiding this comment

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

Then do not use "small label", overwriting styles is really fragile, and it bloats the code.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

yp05327 and others added 6 commits June 15, 2023 14:10
- Don't run DB tests for frontend-only changes
- Build frontend as part of frontend step
- Build everything when actions change
The code can be as simple as:

```html
<div class="flex-text-block">{{svg "octicon-alert"}} {{svg "octicon-x"}} text (block)</div>
<div><div class="flex-text-inline">{{svg "octicon-alert"}} {{svg "octicon-x"}} text</div> (inline)</div>
<div><button class="ui red button">{{svg "octicon-alert" 24}} {{svg "octicon-x" 24}} text</button></div>
```


![image](https://github.com/go-gitea/gitea/assets/2114189/1d3c10f1-0bc7-4c26-b236-bad537d5c465)

---------

Co-authored-by: Giteabot <[email protected]>
The `<div class="ui container">` broke the width of this section - fix
by removing it.
So I found this [linter](https://github.com/Riverside-Healthcare/djlint)
which features a mode for go templates, so I gave it a try and it did
find a number of valid issue, like unbalanced tags etc. It also has a
number of bugs, I had to disable/workaround many issues.

Given that this linter is written in python, this does add a dependency
on `python` >= 3.8 and `poetry` to the development environment to be
able to run this linter locally.

- `e.g.` prefixes on placeholders are removed because the linter had a
false-positive on `placeholder="e.g. cn=Search"` for the `attr=value`
syntax and it's not ideal anyways to write `e.g.` into a placeholder
because a placeholder is meant to hold a sample value.
- In `templates/repo/settings/options.tmpl` I simplified the logic to
not conditionally create opening tags without closing tags because this
stuff confuses the linter (and possibly the reader as well).
@hiifong hiifong closed this Jun 15, 2023
@hiifong hiifong deleted the fix_explore_repo_list_tags_line_margin branch June 15, 2023 06:18
lunny pushed a commit that referenced this pull request Jun 24, 2023
This is my first pr, there are many things I don't understand very well,
I am very sorry, I rearranged the code and opened this new pr.
Now:

![image](https://github.com/go-gitea/gitea/assets/89133723/5acd9d81-2152-4966-9372-1fbf902ed073)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/v1.20 This PR should be backported to Gitea 1.20 lgtm/need 1 This PR needs approval from one additional maintainer to be merged. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants