Skip to content

Conversation

@Zettat123
Copy link
Contributor

@Zettat123 Zettat123 commented Oct 21, 2025

This PR moves "no online runner" warning to the runs list.

A job's runs-on may contain expressions like runs-on: [self-hosted, "${{ inputs.chosen-os }}"] so the value of runs-on may be different in each run. We cannot check it through the workflow file.

Screenshots

Before:

3d2a91746271d8b1f12c8f7d20eba550

After:

image

This PR also splits prepareWorkflowDispatchTemplate function into 2 functions:

  • prepareWorkflowTemplate get and check all of the workflows
  • prepareWorkflowDispatchTemplate only prepare workflow dispatch config for workflow_dispatch workflows.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 21, 2025
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Oct 21, 2025
@ChristopherHX ChristopherHX added the topic/gitea-actions related to the actions of Gitea label Oct 21, 2025
@ChristopherHX
Copy link
Contributor

I actually missed a placeholder job log of all queued (waiting) jobs that contains the actual runner label.

The advantage over could be run-list performance, on the other hand it is also nice to not need to go into the job list at all.

@Zettat123
Copy link
Contributor Author

I actually missed a placeholder job log of all queued (waiting) jobs that contains the actual runner label.

The advantage over could be run-list performance, on the other hand it is also nice to not need to go into the job list at all.

Maybe we can add this warning to the job list later as well.

@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 Oct 22, 2025
@lunny lunny added this to the 1.26.0 milestone Oct 22, 2025
<span data-tooltip-content="{{$errMsg}}">
{{svg "octicon-alert" 16 "text red"}}
</span>
{{end}}
Copy link
Member

@silverwind silverwind Oct 22, 2025

Choose a reason for hiding this comment

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

The icon is slightly off-center vertically. I think we can potentially fix it by adding flex-text-block to the flex-item-body element. The icon in the sidebar would need similar treatment as per your screenshot.

Copy link
Contributor Author

@Zettat123 Zettat123 Oct 22, 2025

Choose a reason for hiding this comment

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

I tried adding flex-text-block to flex-item-body but it does not work. In 29652f7, I added two span to vertically center the icons but I'm not sure if this is the correct solution.

New screenshot:
e4a45f423d70c5e8d8f4c61ff42b4b56

Copy link
Member

Choose a reason for hiding this comment

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

Looks better, but still like 1px too high, but I guess that's acceptable.

One last request: Can you add like tw-ml-2 to the elements so they have a bit more space from the text?

Copy link
Contributor

Choose a reason for hiding this comment

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

No tw-ml-2, correct flex-text-block should be able to correctly add the gap

Copy link
Member

@silverwind silverwind Oct 23, 2025

Choose a reason for hiding this comment

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

Yep, probably best to make a structure like this:

<div class="flex-text-block">
  <span>text</span>
  <span><svg/></span>
</div>

That may likely also solve the icon vertical centering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 07fee46

I used this structure:

<span class="flex-text-block" data-tooltip-content="{{$errMsg}}">
	{{svg "octicon-alert" 16 "text red"}}
</span>

But I don't see the gap change. Maybe I'm still incorrectly using flex-text-block and flex-text-inline, or I need to add tw-ml-2?

Copy link
Contributor

@wxiaoguang wxiaoguang Oct 23, 2025

Choose a reason for hiding this comment

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

I think it's worth to spend some time to learn some frontend layouts, how the "display" works, how "flex" works.

If you need to use "align-items: center", then the children nodes should also have "flex" related layout.

The rule is: flex every SVG parent if you used it to align.

<div class="flex-text-block">
  <span>text</span>
  <span class="flex-text-inline"><svg/></span>
</div>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing out this rule. Fixed in fb296a3. I realize that I should use <div class="flex-text-block"> to wrap all the children nodes instead of just the SVG parent. Now the gap and vertical centering should be corrent, see the following screenshot:

fe840b441b036a1413f7f9a2902884f7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files topic/gitea-actions related to the actions of Gitea

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants