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

Confusing icon for skipped actions #24020

Closed
bilogic opened this issue Apr 9, 2023 · 11 comments · Fixed by #24178
Closed

Confusing icon for skipped actions #24020

bilogic opened this issue Apr 9, 2023 · 11 comments · Fixed by #24178
Labels
topic/gitea-actions related to the actions of Gitea type/bug

Comments

@bilogic
Copy link
Contributor

bilogic commented Apr 9, 2023

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
Copy link
Member

Does octicons have something suitable?

@bilogic
Copy link
Contributor Author

bilogic commented Apr 9, 2023

@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
Copy link
Member

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

@wolfogre
Copy link
Member

wolfogre commented Apr 10, 2023

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

@wolfogre wolfogre added topic/gitea-actions related to the actions of Gitea issue/duplicate The issue has already been reported. labels Apr 10, 2023
@silverwind
Copy link
Member

Shouldn't we not use octicon-skip?

@bilogic
Copy link
Contributor Author

bilogic commented Apr 10, 2023

@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 wolfogre reopened this Apr 10, 2023
@wolfogre
Copy link
Member

wolfogre commented Apr 10, 2023

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
Copy link
Member

wolfogre commented Apr 10, 2023

@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

@wolfogre wolfogre added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Apr 10, 2023
@bilogic
Copy link
Contributor Author

bilogic commented Apr 11, 2023

@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
Copy link
Member

wolfogre commented Apr 11, 2023

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

  1. Can we make all 3 icons the same, based on the Completed job?
  • image It is commit status, it not for Actions only, any external CI system can create commit status via Gitea API. So we shouldn't touch its design for Actions.
  • image It should be actions status, but the icon is wrong, it should be the same as the third.
  • image It's commit status.

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:

  • pending
  • success
  • error
  • failure
  • warning
  • running

Actions status:

  • unknown
  • waiting
  • running
  • success
  • failure
  • cancelled
  • skipped
  • blocked

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

@wolfogre wolfogre removed issue/duplicate The issue has already been reported. issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Apr 11, 2023
@bilogic
Copy link
Contributor Author

bilogic commented Apr 11, 2023

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.

lunny pushed a commit that referenced this issue Apr 19, 2023
…24178)

Close #24020 

After:

These icons are the same now:

<img width="1287" alt="截屏2023-04-18 13 52 11"
src="https://user-images.githubusercontent.com/17645053/232684252-05ddc101-dc5b-41b5-b374-132c3d853a41.png">

<img width="1141" alt="截屏2023-04-18 13 54 48"
src="https://user-images.githubusercontent.com/17645053/232684261-6ebd864a-a9aa-4982-af32-2cea91c35be8.png">


In this PR, didn't use `ActionRunStatus.vue` because the mounting of the
component will cause flash of the icons like below:

https://user-images.githubusercontent.com/17645053/232682646-713202dc-9023-4b9c-a849-c3a1ae6dd155.mov

Instead, modified and used `status.tmpl` to make it the same as
`ActionRunStatus.vue` to avoid the ui flash (Welcomed to show how to use
`ActionRunStatus.vue` without flashing if there is a way).
Added comments to both of them for reminding synchronization of these
two files.

---------

Co-authored-by: Jason Song <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants