-
-
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
Restructure issue list template, styles #25750
Conversation
One idea I had in mind is to move from |
@silverwind I plan to merge all the similar & often partially broken 'card styles/templates' into one at some point as most of them use a similar layout: leading icon/image, title, subtitle/body, trailing icons/buttons. I thought it would be better to start with this small refactoring. I would prefer if we could merge this now, and an/some additional PR(s) will follow soon continuing with this approach. |
Yes, of course. Step by step. |
I have started refactoring the other card elements to use this card structure, and it looks like it's easier to do it in one PR so nothing breaks in between... |
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.
It looks clearer than before, and it fixes more SVG alignments.
@denyskon please fix the merge conflicts. 🍵 |
The conflicts are caused by Reformat some templates #25756 That's what I said in #25739 (comment)
|
Maybe if we could get the backend to just "minify" the insignificant HTML whitespace, it would be ideal, but I'm not sure whether the extra the processing cost of such an effort is worth it. |
To help merge this PR, you can do this:
|
Could probably do template optimization as a one-time action on process startup and then cache the result in memory. |
I do not think it's worth to play with these spaces at the moment, neither the spaces between tags nor the spaces between class names. Just like you won't look into the generated assemble code in a binary program, won't look into the generated JS code after packing, nobody would be hurt by the generated HTML code for browsers -- as long as the browser can render it correctly. Code should be written in a developer-friendly style, but not in a generated-content-friendly style. |
Agree it's not worth from a review standpoint, but delivering minimal HTML is worth from performance standpoint. |
Co-authored-by: silverwind <me@silverwind.io>
Fixed the conflicts |
* giteaofficial/main: (31 commits) Fix WORK_DIR for docker (root) image (go-gitea#25738) Avoid amending the Rebase and Fast-forward merge if there is no message template (go-gitea#25779) Show edit title button on commits tab of PR, too (go-gitea#25791) Make "install page" respect environment config (go-gitea#25648) Enable H014 and H023 djlint rules (go-gitea#25786) Restructure issue list template, styles (go-gitea#25750) Fix notification list bugs (go-gitea#25781) Revert package access change from go-gitea#23879 (go-gitea#25707) Make route middleware/handler mockable (go-gitea#25766) Update tool dependencies, lock govulncheck and actionlint (go-gitea#25655) Test if container blob is accessible before mounting (go-gitea#22759) Always pass 6-digit hex color to monaco (go-gitea#25780) Fix the wrong default branch name displayed by checkout (go-gitea#25777) Tweak repo topics bar (go-gitea#25769) docs: rootless docker ssh's default port is 2222 (go-gitea#25771) Repository Archived text title center align (go-gitea#25767) Update JS dependencies, misc tweaks (go-gitea#25768) Clarify "text-align" CSS helpers, fix clone button padding (go-gitea#25763) Switch to `vite-string-plugin` (go-gitea#25762) Newly pushed branches hints on repository home page (go-gitea#25715) ...
This PR introduces a new UI element type for Gitea called `flex-item`. It consists of a horizontal card with a leading, main and trailing part: ![grafik](https://github.com/go-gitea/gitea/assets/47871822/395dd3f3-3906-4481-8f65-be6ac0acbe03) The idea behind it is that in Gitea UI, we have many cases where we use this kind of layout, but it is achieved in many different ways: - grid layout - `.ui.list` with additional hacky flexbox - `.ui.key.list` - looks to me like a style set originally created for ssh/gpg key list, was used in many other places - `.issue.list` - created for issue cards, used in many other places - ... This new style is based on `.issue.list`, specifically the refactoring of it done in #25750. In this PR, the new element is introduced and lots of templates are being refactored to use that style. This allows to remove a lot of page-specific css, makes many of the elements responsive or simply provides a cleaner/better-looking way to present information. A devtest section with the new style is also available. <details> <summary>Screenshots (left: before, right: after)</summary> ![Bildschirmfoto vom 2023-07-09 21-01-21](https://github.com/go-gitea/gitea/assets/47871822/545b7da5-b300-475f-bd6d-b7d836950bb5) ![Bildschirmfoto vom 2023-07-09 21-01-56](https://github.com/go-gitea/gitea/assets/47871822/b6f70415-6795-4f71-a5ea-117d56107ea1) ![Bildschirmfoto vom 2023-07-09 21-02-45](https://github.com/go-gitea/gitea/assets/47871822/47407121-3f2a-4778-8f6d-ad2687c2e7b3) ![Bildschirmfoto vom 2023-07-09 21-03-44](https://github.com/go-gitea/gitea/assets/47871822/76167aaf-c3b2-46f6-9ffd-709f20aa6a34) ![Bildschirmfoto vom 2023-07-09 21-04-52](https://github.com/go-gitea/gitea/assets/47871822/af8fdde5-711e-4524-99cf-fb5d68af85b9) ![Bildschirmfoto vom 2023-07-09 21-05-25](https://github.com/go-gitea/gitea/assets/47871822/ae406946-e3e4-4109-abfe-b3588a07b468) ![Bildschirmfoto vom 2023-07-09 21-06-35](https://github.com/go-gitea/gitea/assets/47871822/2dbacc04-24d6-4f91-9e42-e16d6e4b5f1f) ![Bildschirmfoto vom 2023-07-09 21-09-03](https://github.com/go-gitea/gitea/assets/47871822/d3ca4e56-a72f-4179-adc8-98bfd638025b) ![Bildschirmfoto vom 2023-07-09 21-09-44](https://github.com/go-gitea/gitea/assets/47871822/df1fa689-499c-4e54-b6fb-3b81644b725f) ![Bildschirmfoto vom 2023-07-09 21-10-27](https://github.com/go-gitea/gitea/assets/47871822/b21cac71-a85a-4c8c-bb99-ab90373d8e09) ![Bildschirmfoto vom 2023-07-09 21-11-12](https://github.com/go-gitea/gitea/assets/47871822/89be39cf-0af9-4f2d-9fca-42f9eb5e7824) ![Bildschirmfoto vom 2023-07-09 21-12-01](https://github.com/go-gitea/gitea/assets/47871822/079579ea-1ecb-49c0-b32b-b59ed957caec) ![Bildschirmfoto vom 2023-07-09 21-17-44](https://github.com/go-gitea/gitea/assets/47871822/61ac6ec4-a319-4d5c-9c99-2e02a77295ba) ![Bildschirmfoto vom 2023-07-09 21-18-27](https://github.com/go-gitea/gitea/assets/47871822/5b55b73f-6244-47f7-a3e6-c5e4a7474585) ![Bildschirmfoto vom 2023-07-09 21-19-18](https://github.com/go-gitea/gitea/assets/47871822/c1b7c22e-3e5a-46d4-b8d6-5560db478c0b) ![Bildschirmfoto vom 2023-07-09 21-29-13](https://github.com/go-gitea/gitea/assets/47871822/82ffca8d-ab2e-4a18-9954-5b685bf6a422) ![Bildschirmfoto vom 2023-07-09 21-30-11](https://github.com/go-gitea/gitea/assets/47871822/ad2fdccc-2be8-41bb-bfdc-a084aa387b61) ![Bildschirmfoto vom 2023-07-09 21-32-44](https://github.com/go-gitea/gitea/assets/47871822/2d298ba7-d084-48b5-a139-f86d56262110) ![Bildschirmfoto vom 2023-07-09 21-33-28](https://github.com/go-gitea/gitea/assets/47871822/4cbd838e-9de8-4ad0-8ed9-438da5c9a5cb) </details> --------- Co-authored-by: Giteabot <teabot@gitea.io>
This PR does various modifications on the issue list shared template:
gt-*
patches and other unneeded classes -> use existing css classesBefore:
After: