go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.95k stars 5.48k forks source link

Confusing icon for skipped actions #24020

Closed bilogic closed 1 year ago

bilogic commented 1 year ago

Description

If an action was skipped, it gets a green tick on the Closed page image But on the code page, it gets a cross image

Maybe a red bent arrow like a missed phone call will be better, see below? image image

Gitea Version

1.19.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Using docker

Database

MySQL

silverwind commented 1 year ago

Does octicons have something suitable?

bilogic commented 1 year ago

@silverwind

They use this to represent skip https://primer.github.io/octicons/skip-24

But I think the ones I googled convey meaning better.. I'm in a dilemma myself over the bent arrow or over the empty box

Anyway, the issue is the inconsistent icon, if it is easier to just use https://primer.github.io/octicons/skip-24, then it would also solve the problem.

silverwind commented 1 year ago

We use only 16px, so it'd be https://primer.github.io/octicons/skip-16

wolfogre commented 1 year ago

~Related to~ Duplicated with #23599.

The point is that there is no skipped for commit status, and it has been treated as success in #23786

silverwind commented 1 year ago

Shouldn't we not use octicon-skip?

bilogic commented 1 year ago

@wolfogre

Thanks, I understand gitea's approach of following github entirely, but also gave this some thought:

It's pretty confusing to:

  1. Show the commit status icon + commit message on the actions page

  2. But show action status icon + commit message on the code page

  3. Since the intention on code page is to show the last commit, it should stay the same regardless whether actions are enabled or not

  4. Instead of prefixing the action status icon to the commit message, I feel it is better to append that icon to the commit message followed by the job name, which is consistent on the actions page image

  5. Based on my OP, that would be

    c001449e78 updated action X linux_tests

    where X is the icon, and linux_tests is the job name, which is what is shown when hovering over the code page's action status icon today

I can elaborate with more images if the above is not clear.

wolfogre commented 1 year ago

Shouldn't we not use octicon-skip?

I have no objection to using a better icon to replace

image

But I don't think it is the point.

wolfogre commented 1 year ago

@bilogic Sorry I'm confused.

  1. Show the commit status icon + commit message on the actions page

I think it's action status icon + commit message on the actions page now

  1. But show action status icon + commit message on the code page

I think it's commit status icon + commit message on the code page now

  1. Since the intention on code page is to show the last commit, it should stay the same regardless whether actions are enabled or not

Sorry, what do you mean by "should stay the same"? The commit status could be used even without Actions.

  1. Instead of prefixing the action status icon to the commit message, I feel it is better to append that icon to the commit message followed by the job name, which is consistent on the actions page image

"prefixing the action status icon to the commit message", could you show me where?


Update:

To be clear.

When those are commit status with commit status icons.

image

And those are actions status with actions status icons.

image
bilogic commented 1 year ago

@wolfogre yes thanks, let me show you what i'm seeing here

This is code page when actions are disabled: hash + commit message (No icons)

image

When actions are enabled and have ran, code page inserts an icon (red): hash + iconRed + commit message

image

On actions page, we see a different icon (blue): iconBlue + commit message

image

Clicking into the commit message, we see a 3rd different icon (green): iconGreen + job_name

image image

so what I'm trying to ask here is:

  1. Can we make all 3 icons the same, based on the Completed job?

  2. To put it in context of my OP (skipped job), it currently shows iconGreen + job_name. Why not also make iconBlue and iconRed show the same icon consistently?

  3. I also wondered, how many statuses does a git commit have? There are no icon/status when actions are disabled. And for me, it is either a committed or could not commit, and if it could not be committed, there are actually no records of it in git. So why do we have commit icon/status now? Could it actually be something else? Thus, my suggestion to place this icon elsewhere instead of prepending to the commit message

  4. Now, I must say, I'm very new to actions, I tried hard to see if I missed any scenarios, but could not come up with much.

Open to hearing if the current icons represents something I might have missed. Thank you!

wolfogre commented 1 year ago

Thank you for your explanation, I think I understand now.

  1. Can we make all 3 icons the same, based on the Completed job?

So I will make the second and third icons the same. But the first icons are for commit status which is a different thing.

  1. To put it in context of my OP (skipped job), it currently shows iconGreen + job_name. Why not also make iconBlue and iconRed show the same icon consistently?

As mentioned, iconBlue should show the same icon with iconGreen, but iconRed is for a different thing.

  1. I also wondered, how many statuses does a git commit have?

Commit status:

Actions status:

And how Gitea map them:

actions status commit status
success, skipped success
failure, cancelled failure
waiting, blocked pending
running running

So I would say they are different things.

There are no icon/status when actions are disabled.

The commit statuses are for binding CICD results to commits, and Gitea Actions is just one of the CICD tools; other tools, like DroneCI, could also send commit statuses. In other words, if you don't enable any CICD tools, there won't be any commit statuses.

And for me, it is either a committed or could not commit, and if it could not be committed, there are actually no records of it in git. So why do we have commit icon/status now? Could it actually be something else?

You may have misunderstood, the commit status is not for whether the branch can be committed. It is mainly for "Branch Protection", like:

image

Thus, my suggestion to place this icon elsewhere instead of prepending to the commit message

I don't understand, I mean, GitHub does it this way too.

image
bilogic commented 1 year ago

any external CI system can create commit status via Gitea API

@wolfogre ok thanks, I have little to no understanding of the above. But since it is a thing, I'm sure you guys know better than me.