Skip to content

Replace text-align classes with tailwind #33905

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

Merged
merged 6 commits into from
Mar 16, 2025
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Mar 16, 2025

Small refactor to remove these CSS classes in favor of tailwind.

i have ran rg ui | rg text | rg right and rg ui | rg text | rg left and then did the replacement with perl -p -i -e 's#text right#tw-text-right#g' templates/**/* and verified a few places.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 16, 2025
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/frontend labels Mar 16, 2025
@silverwind silverwind added type/refactoring Existing code has been cleaned up. There should be no new functionality. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Mar 16, 2025
@@ -83,7 +83,7 @@
<input id="new_branch_name" name="new_branch_name" required>
</div>

<div class="text right actions">
<div class="tw-text-right actions">
Copy link
Contributor

Choose a reason for hiding this comment

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

All actions for modals, could(should) only keep actions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in 38f4214 and b90fcd3.

There seems to be some needless complexity because some modals (like create branch on commit page) do not match the existing .ui .modal > .actions because they have .modal > form > .actions, so I decided to play it safe and create another selector.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it this case? I do not think we should create a separate selector. Improving existing selectors should be the right thing to do.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I will fix them and add a new example in devtest page

Copy link
Member Author

@silverwind silverwind Mar 16, 2025

Choose a reason for hiding this comment

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

I agree to changing to selector without >, but at least the padding added needs to go I think, and also the background.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Works, thought I'm not super happy with another selector, but ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree to changing to selector without >, but at least the padding added needs to go I think, and also the background.

We need to make it strict here, because there are different styles (eg: padding, background) for different "actions", so we need to define each case explicitly (see the devtest page)

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 16, 2025
silverwind and others added 3 commits March 16, 2025 11:30
@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 16, 2025
@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 16, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) March 16, 2025 11:43
@wxiaoguang wxiaoguang merged commit 1ea5216 into go-gitea:main Mar 16, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Mar 16, 2025
@silverwind silverwind deleted the text-side branch March 16, 2025 18:09
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 17, 2025
* giteaofficial/main: (23 commits)
  [skip ci] Updated translations via Crowdin
  Update tool dependencies (go-gitea#33907)
  Move hooks function to gitrepo and reduce expose repopath (go-gitea#33890)
  Replace text-align classes with tailwind (go-gitea#33905)
  Simplify secure context check (go-gitea#33906)
  Update JS and PY deps, misc tweaks (go-gitea#33903)
  Refactor functions to reduce repopath expose (go-gitea#33892)
  Move git references checking to gitrepo packages to reduce expose of repository path (go-gitea#33891)
  [skip ci] Updated translations via Crowdin
  Add missing translation (go-gitea#33900)
  Give organisation members access to organisation feeds (go-gitea#33508)
  Add lock for a repository pull mirror (go-gitea#33876)
  Fix cannot delete runners via the modal dialog (go-gitea#33895)
  Add file tree to file view page (go-gitea#32721)
  [skip ci] Updated translations via Crowdin
  Feature: Ephemeral action runners (go-gitea#33570)
  Add abstraction layer to delete repository from disk (go-gitea#33879)
  Make SearchMode have default value and add comments (go-gitea#33863)
  Fix maven panic when no package exists (go-gitea#33888)
  Add old svg class name to git entry icon (go-gitea#33884)
  ...

# Conflicts:
#	templates/repo/wiki/revision.tmpl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend modifies/templates This PR modifies the template files skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. 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.

None yet

4 participants