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

Remove polluted .ui.right #26825

Merged
merged 4 commits into from
Aug 31, 2023
Merged

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Aug 30, 2023

Each change is tested manually line by line. There are too many changes so I can't share dozens of screenshots.

In short:

  1. ui right could be still used in ui top attached header, because there is a special case.
  2. A lot of ui right are just no-op, so they can be removed safely.
  3. Some of the ui right should be replaced by gt-float-right (to avoid breaking, leave them to the future).
  4. A few of the ui right could be rewritten by flex.

Some examples

The org labels

image

The release edit

image

The webhook history

image

@wxiaoguang wxiaoguang added topic/ui Change the appearance of the Gitea UI type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Aug 30, 2023
@wxiaoguang wxiaoguang added this to the 1.21.0 milestone Aug 30, 2023
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 30, 2023
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 30, 2023
@silverwind
Copy link
Member

silverwind commented Aug 30, 2023

Some of the ui right should be replaced by gt-float-right.

Should get rid of float altogether because it's not possible to properly vertically center with it. Imho every such case is better solved by flexbox, except the case for which float was designed for, which is floating elements besides a text block.

@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Aug 30, 2023

Some of the ui right should be replaced by gt-float-right.

Should get rid of float altogether because it's not possible to properly vertically center with it. Imho every such case is better solved by flexbox, except the case for which float was designed for, which is floating elements besides a text block.

I know. But there are too many. I have refactored some of them but there are still a lot.

To avoid breaking too much, the gt-float-right is exactly the direct replacement for ui right (which was also float: right). I am sure this PR is good enough at the moment, while more improvements could be done in the future.


ps: the main purpose of this PR is: Remove polluted `.ui.right`

@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 Aug 30, 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 Aug 30, 2023
@techknowlogick techknowlogick enabled auto-merge (squash) August 31, 2023 00:43
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 31, 2023
@techknowlogick techknowlogick merged commit 19a1e1b into go-gitea:main Aug 31, 2023
23 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Aug 31, 2023
@wxiaoguang wxiaoguang deleted the fix-float-right branch August 31, 2023 02:30
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 1, 2023
* giteaoffical/main: (22 commits)
  Use case-insensitive regex for all webpack assets (go-gitea#26867)
  restrict certificate type for builtin SSH server (go-gitea#26789)
  feat(API): add secret deletion functionality for repository (go-gitea#26808)
  Avoid double-unescaping of form value (go-gitea#26853)
  Move web/api context related testing function into a separate package (go-gitea#26859)
  Remove some unused CSS styles (go-gitea#26852)
  [skip ci] Updated translations via Crowdin
  Minor dashboard tweaks, fix flex-list margins (go-gitea#26829)
  Update team invitation email link (go-gitea#26550)
  Redirect from `{repo}/issues/new` to `{repo}/issues/new/choose` when blank issues are disabled (go-gitea#26813)
  Remove "TODO" tasks from CSS file (go-gitea#26835)
  User details page (go-gitea#26713)
  Render code blocks in repo description (go-gitea#26830)
  Remove joinPaths function (go-gitea#26833)
  Remove polluted `.ui.right` (go-gitea#26825)
  Sync tags when adopting repos (go-gitea#26816)
  rm comment about hugo (go-gitea#26832)
  Fix filename for .spectral.yaml (go-gitea#26828)
  [skip ci] Updated translations via Crowdin
  Check blocklist for emails when adding them to account (go-gitea#26812)
  ...
lunny pushed a commit that referenced this pull request Sep 18, 2023
Follow  Remove polluted .ui.right #26825 

Remove more `gt-float-right`, remove unnecessary helpers, remove
negative margin tricks.

![image](https://github.com/go-gitea/gitea/assets/2114189/2785c6e6-7823-4699-a4f3-184eef50ceda)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 29, 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants