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

no checkmark when fork repo #25076

Closed
saegl5 opened this issue Jun 5, 2023 · 8 comments · Fixed by #25573
Closed

no checkmark when fork repo #25076

saegl5 opened this issue Jun 5, 2023 · 8 comments · Fixed by #25573
Labels
topic/ui Change the appearance of the Gitea UI type/docs This PR mainly updates/creates documentation

Comments

@saegl5
Copy link
Contributor

saegl5 commented Jun 5, 2023

Description

When I fork a repository and click on the checkbox for "Make Repository Private," no checkmark is displayed.
To see this, you may visit https://try.gitea.io/koofio/123123 and click on Fork.

Screenshots

new repo new repo fork
new_repo new_fork
hard to see, but I am clicking on the checkbox

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

macOS 13.4 (22F66)

Browser Version

Safari Version 16.5 (18615.2.9.11.4)

@saegl5 saegl5 added type/bug topic/ui Change the appearance of the Gitea UI labels Jun 5, 2023
@wxiaoguang
Copy link
Contributor

The UI is misleading.

The real meaning of it is: the checkbox is read-only, you can not change it, you can not change the visiblity of a forked repo.

@techknowlogick techknowlogick added type/docs This PR mainly updates/creates documentation and removed type/bug labels Jun 5, 2023
@saegl5
Copy link
Contributor Author

saegl5 commented Jun 5, 2023

Once one's fork is created, yes.

If you click private, your fork remains private. Otherwise, your fork remains public.

Until the fork is created, though, then I would reason no.

When you click on the tiny Fork button (previous step), is the fork created yet? I thought the fork is not created until you click on the Fork Repository button (next step).

@saegl5
Copy link
Contributor Author

saegl5 commented Jun 11, 2023

@wxiaoguang thank you for your response

I also ran some more tests...
if a repo or forked repo even is public, new fork remains public (in fact, the box stays unchecked)
if a repo or forked repo even is private, new fork remains private (in fact, the box stays checked)
so, yes, you are correct to a point 👍

that point being: you cannot change the visibility of a forked repo repo that we fork
"forked repository" is past tense; the repo that we fork may or may not be forked; and our fork is not created yet

I guess if the checkbox were removed and if "The visibility of a forked repository cannot be changed" were reworded, then users would have more clarity

is there any legitimate reason for keeping the checkbox, if it can't be checked or unchecked?
also, why describe the visibility of newly created fork, if we are really describing that of a repo that we fork?

@wxiaoguang
Copy link
Contributor

IMO no particular reason for keeping the checkbox, the code was written as so from beginning, and nobody ever changed it (that's open source)

@techknowlogick
Copy link
Member

Forks retain the visibility as otherwise the "create a PR" logic gets significantly complex. For example if you create a PR and make the repo private, then how can the original author see the code? This is just one of the many conditions that would need to be considered. GitHub behaves the same for the same reasons.

@saegl5
Copy link
Contributor Author

saegl5 commented Jun 16, 2023

@wxiaoguang and @techknowlogick I see, thanks
gitea is a masterpiece to me, and I wouldn't want to cause a headache, but mind if I take a stab at it and create a pr to change the checkbox? (just this checkbox for forks)

@wxiaoguang
Copy link
Contributor

Feel free to do so. Thank you.

@saegl5
Copy link
Contributor Author

saegl5 commented Jun 27, 2023

Progress...

Google Cloud instances may need extra RAM, as did mine

  • Modified the source code, and rebuilt Gitea

gitea/web_src/css/form.css:

.ui.read-only.checkbox label::before,
.ui.read-only.checkbox input:checked ~ label::before {
  opacity: var(--opacity-disabled);
}

.ui.read-only.checkbox input:focus ~ label::before,
.ui.read-only.checkbox input:checked:focus ~ label::before {
  border-color: var(--color-input-border);
}

.ui.read-only.checkbox input:checked ~ label::after {
  opacity: var(--opacity-disabled);
}

Examples using light mode:

Before After
Kapture 2023-06-28 at 00 20 45 Kapture 2023-06-28 at 00 23 12
Kapture 2023-06-28 at 00 25 22 Kapture 2023-06-28 at 00 27 28
read-only checkboxes and checkmark are faded
and the checkboxes act more read-only/disabled

Reconsidered against commenting out gitea/templates/repo/pulls/fork.tmpl lines 46-53, since users may want to know the visibility.
Also, reconsidered against rewording options/locale/locale_en-US.ini‎ line 934 (and related lines for other locales), since ones could consider "forked repository" to mean a repository that is a fork.
Unsure about .ui.radio.checkbox, though, if it might also benefit from a read-only selector...

  • Submit PR

silverwind added a commit that referenced this issue Jun 29, 2023
…might expect (#25573)

This pull request fades read-only checkboxes and checkmark, and it makes
the checkboxes act more read-only/disabled by not changing the
border-color when clicked.

Examples using light mode:
 
| Before | After |
| - | - |
| ![Kapture 2023-06-28 at 00 20
45](https://github.com/go-gitea/gitea/assets/63764270/0899fd5c-18a9-4290-9ba9-d3cf71033cf8)
| ![Kapture 2023-06-28 at 00 23
12](https://github.com/go-gitea/gitea/assets/63764270/0db9be14-e16c-42ed-8fb1-999928fd1d25)
|
| ![Kapture 2023-06-28 at 00 25
22](https://github.com/go-gitea/gitea/assets/63764270/65c6c380-b928-4e6c-b403-3655d3565896)
| ![Kapture 2023-06-28 at 00 27
28](https://github.com/go-gitea/gitea/assets/63764270/d8c2a019-e07c-43a1-a7fa-93c0d4e01900)
|
| | read-only checkboxes and checkmark are faded<br>and the checkboxes
act more read-only/disabled |

Fixes/Closes/Resolves #25076

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Jun 29, 2023
…might expect (go-gitea#25573)

This pull request fades read-only checkboxes and checkmark, and it makes
the checkboxes act more read-only/disabled by not changing the
border-color when clicked.

Examples using light mode:
 
| Before | After |
| - | - |
| ![Kapture 2023-06-28 at 00 20
45](https://github.com/go-gitea/gitea/assets/63764270/0899fd5c-18a9-4290-9ba9-d3cf71033cf8)
| ![Kapture 2023-06-28 at 00 23
12](https://github.com/go-gitea/gitea/assets/63764270/0db9be14-e16c-42ed-8fb1-999928fd1d25)
|
| ![Kapture 2023-06-28 at 00 25
22](https://github.com/go-gitea/gitea/assets/63764270/65c6c380-b928-4e6c-b403-3655d3565896)
| ![Kapture 2023-06-28 at 00 27
28](https://github.com/go-gitea/gitea/assets/63764270/d8c2a019-e07c-43a1-a7fa-93c0d4e01900)
|
| | read-only checkboxes and checkmark are faded<br>and the checkboxes
act more read-only/disabled |

Fixes/Closes/Resolves go-gitea#25076

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
silverwind added a commit that referenced this issue Jun 29, 2023
…might expect (#25573) (#25602)

Backport #25573 by @saegl5

This pull request fades read-only checkboxes and checkmark, and it makes
the checkboxes act more read-only/disabled by not changing the
border-color when clicked.

Examples using light mode:
 
| Before | After |
| - | - |
| ![Kapture 2023-06-28 at 00 20
45](https://github.com/go-gitea/gitea/assets/63764270/0899fd5c-18a9-4290-9ba9-d3cf71033cf8)
| ![Kapture 2023-06-28 at 00 23
12](https://github.com/go-gitea/gitea/assets/63764270/0db9be14-e16c-42ed-8fb1-999928fd1d25)
|
| ![Kapture 2023-06-28 at 00 25
22](https://github.com/go-gitea/gitea/assets/63764270/65c6c380-b928-4e6c-b403-3655d3565896)
| ![Kapture 2023-06-28 at 00 27
28](https://github.com/go-gitea/gitea/assets/63764270/d8c2a019-e07c-43a1-a7fa-93c0d4e01900)
|
| | read-only checkboxes and checkmark are faded<br>and the checkboxes
act more read-only/disabled |

Fixes/Closes/Resolves #25076

Co-authored-by: Ed Silkworth <ed.silkworth@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants