no checkmark when fork repo #10962

Closed
opened 2025-11-02 09:23:24 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @saegl5 on GitHub (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)

Originally created by @saegl5 on GitHub (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](https://github.com/go-gitea/gitea/assets/63764270/50dd291b-4a2c-4798-94f9-20d89cd776d6) | ![new_fork](https://github.com/go-gitea/gitea/assets/63764270/bd7de67f-b859-46e0-a41e-76ea89cf722c)<br>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)
GiteaMirror added the type/docstopic/ui labels 2025-11-02 09:23:24 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jun 5, 2023):

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.

@wxiaoguang commented on GitHub (Jun 5, 2023): 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.
Author
Owner

@saegl5 commented on GitHub (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 commented on GitHub (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).
Author
Owner

@saegl5 commented on GitHub (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?

@saegl5 commented on GitHub (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?
Author
Owner

@wxiaoguang commented on GitHub (Jun 11, 2023):

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)

@wxiaoguang commented on GitHub (Jun 11, 2023): 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)
Author
Owner

@techknowlogick commented on GitHub (Jun 11, 2023):

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.

@techknowlogick commented on GitHub (Jun 11, 2023): 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.
Author
Owner

@saegl5 commented on GitHub (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)

@saegl5 commented on GitHub (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)
Author
Owner

@wxiaoguang commented on GitHub (Jun 17, 2023):

Feel free to do so. Thank you.

@wxiaoguang commented on GitHub (Jun 17, 2023): Feel free to do so. Thank you.
Author
Owner

@saegl5 commented on GitHub (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
@saegl5 commented on GitHub (Jun 27, 2023): Progress... - [x] Rebased and built Gitea from source following the [build instructions](https://github.com/go-gitea/gitea#building) and [database preparation](https://docs.gitea.com/next/installation/database-prep) > Google Cloud instances may need extra RAM, as did mine - [x] 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](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 | > > 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... - [x] Submit PR
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10962