Clear labels should remove checkmarks in popup #10008

Closed
opened 2025-11-02 08:55:35 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @michewl on GitHub (Dec 22, 2022).

Description

On the "New issue" or "New Pull Request" page in the "Labels" popup, the "Clear labels" function does not remove the checkmarks in the label list.

This can easily be reproduced:

  1. Go to the "New Issue" page
  2. Open the "Labels" popup
  3. Add one or more labels (checkmark appears)
  4. [Optionally close the labels popup to "commit" the selection and reopen]
  5. Click "Clear labels" (the popup closes)
  6. Open the "Labels" popup again
  7. Find the checkmarks still present

The expected behavior would be, that the checkmarks also get removed when "Clear labels" is clicked.

Screenshots

bug-gitea-labels_2022-12-22 20-21

Gitea Version

1.19.0+dev-223-gea5a752ee

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

Pop!_OS 22.04 LTS 6.0.6-76060006-generic

Browser Version

Firefox 108.0 (64-bit)

Originally created by @michewl on GitHub (Dec 22, 2022). ### Description On the "New issue" or "New Pull Request" page in the "Labels" popup, the "Clear labels" function does not remove the checkmarks in the label list. This can easily be reproduced: 1. Go to the ["New Issue"](https://try.gitea.io/michewl/test/issues/new) page 2. Open the "Labels" popup 3. Add one or more labels (checkmark appears) 4. [Optionally close the labels popup to "commit" the selection and reopen] 5. Click "Clear labels" (the popup closes) 6. Open the "Labels" popup again 7. Find the checkmarks still present The expected behavior would be, that the checkmarks also get removed when "Clear labels" is clicked. ### Screenshots ![bug-gitea-labels_2022-12-22 20-21](https://user-images.githubusercontent.com/774221/209210967-b0aac73e-e062-40f7-9dc8-04214701c9b5.gif) ### Gitea Version 1.19.0+dev-223-gea5a752ee ### Can you reproduce the bug on the Gitea demo site? Yes ### Operating System Pop!_OS 22.04 LTS 6.0.6-76060006-generic ### Browser Version Firefox 108.0 (64-bit)
GiteaMirror added the topic/uitype/bug labels 2025-11-02 08:55:35 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Dec 23, 2022):

Can't reproduce it on my local dev setup. After every selection the page is reloaded which fixes your issue. I have the same reload behaviour on the Gitea demo site but there I can't use "Clear labels" 🤷‍♂️

labels

@KN4CK3R commented on GitHub (Dec 23, 2022): Can't reproduce it on my local dev setup. After every selection the page is reloaded which fixes your issue. I have the same reload behaviour on the Gitea demo site but there I can't use "Clear labels" 🤷‍♂️ ![labels](https://user-images.githubusercontent.com/1666336/209344867-a886550b-b243-4c20-8f90-98f799fedc25.gif)
Author
Owner

@michewl commented on GitHub (Dec 23, 2022):

Can't reproduce it on my local dev setup. After every selection the page is reloaded which fixes your issue. I have the same reload behaviour on the Gitea demo site but there I can't use "Clear labels" man_shrugging

I only have the try.gitea.org instance to test. But I still can reproduce it with Firefox 108.0 and also have the same behavior with Chromium Version 108.0.5359.124 (Official Build) (64-bit) (Flatpak install) and Vivaldi 5.6.2867.50 (Stable channel) stable (64-bit) tested just now on try.gitea.org running Gitea version 1.19.0+dev-226-g71ca3067b.

I also checked for JS errors or something, but none are printed out in the console.

I do not have any reloads happening, and I also do not have the case where it does not work at all.

@michewl commented on GitHub (Dec 23, 2022): > Can't reproduce it on my local dev setup. After every selection the page is reloaded which fixes your issue. I have the same reload behaviour on the Gitea demo site but there I can't use "Clear labels" man_shrugging I only have the `try.gitea.org` instance to test. But I still can reproduce it with Firefox `108.0` and also have the same behavior with Chromium `Version 108.0.5359.124 (Official Build) (64-bit)` (Flatpak install) and Vivaldi `5.6.2867.50 (Stable channel) stable (64-bit)` tested just now on `try.gitea.org` running Gitea version `1.19.0+dev-226-g71ca3067b`. I also checked for JS errors or something, but none are printed out in the console. I do not have any reloads happening, and I also do not have the case where it does not work at all.
Author
Owner

@KN4CK3R commented on GitHub (Dec 23, 2022):

I have the same Firefox version and get an error:
grafik
Don't know what's the problem.

@KN4CK3R commented on GitHub (Dec 23, 2022): I have the same Firefox version and get an error: ![grafik](https://user-images.githubusercontent.com/1666336/209363267-7232c66b-a456-405b-8377-bfbc7ed28287.png) Don't know what's the problem.
Author
Owner

@wxiaoguang commented on GitHub (Feb 28, 2023):

The problem is highly liked caused by a server/network problem.

At the moment, the "label" works like this:

  1. Choose labels (including Clear)
  2. Hide the dropdown
  3. Update the labels to server (one by one)
  4. Reload page

If any request in step 3 fails, the page won't be reloaded, then you see the stale page.

If you could help to figure out why step 3 fails, it would be very helpful.

@wxiaoguang commented on GitHub (Feb 28, 2023): The problem is highly liked caused by a server/network problem. At the moment, the "label" works like this: 1. Choose labels (including Clear) 2. Hide the dropdown 3. Update the labels to server (one by one) 4. Reload page If any request in step 3 fails, the page won't be reloaded, then you see the stale page. If you could help to figure out why step 3 fails, it would be very helpful.
Author
Owner

@michewl commented on GitHub (Mar 1, 2023):

Tested it just now again on https://try.gitea.io.

Still almost the same behavior for me. The only difference from my initial report is that the popup stays open during step 5.

No requests are made at all when I change the labels. Never had the Promise issue @KN4CK3R describes.

Gitea Version

1.20.0+dev-48-g04347eb81

Operating System

Pop!_OS 22.04 LTS 6.1.11-76060111-generic

Browser Version

Firefox 110.0 (64-bit)

@michewl commented on GitHub (Mar 1, 2023): Tested it just now again on https://try.gitea.io. Still almost the same behavior for me. The only difference from my initial report is that the popup stays open during step 5. No requests are made at all when I change the labels. Never had the Promise issue @KN4CK3R describes. ### Gitea Version 1.20.0+dev-48-g04347eb81 ### Operating System Pop!_OS 22.04 LTS 6.1.11-76060111-generic ### Browser Version Firefox 110.0 (64-bit)
Author
Owner

@wxiaoguang commented on GitHub (Mar 1, 2023):

Update: see below. It is a bug on "New Issue" page. Sorry for the misunderstanding .....

That's really strange. I just did a new test on try.gitea.io , I can clear lables and add labels. Firefox 110.0.1 (64-bit) (it couldn't be related to browser IMO)

https://try.gitea.io/wxiaoguang/test/issues/20

image

@wxiaoguang commented on GitHub (Mar 1, 2023): Update: see below. It is a bug on "New Issue" page. Sorry for the misunderstanding ..... <details> That's really strange. I just did a new test on try.gitea.io , I can clear lables and add labels. Firefox 110.0.1 (64-bit) (it couldn't be related to browser IMO) https://try.gitea.io/wxiaoguang/test/issues/20 ![image](https://user-images.githubusercontent.com/2114189/222206782-acf2203e-7ee9-4e42-993d-eed0060518b2.png) </details>
Author
Owner

@wxiaoguang commented on GitHub (Mar 1, 2023):

Oh, sorry, I see, you mean "New Issue"? That page seems to be broken for long time ....

I could take a look if I get time. Thank you for your report.

@wxiaoguang commented on GitHub (Mar 1, 2023): Oh, sorry, I see, you mean "New Issue"? That page seems to be broken for long time .... I could take a look if I get time. Thank you for your report.
Author
Owner

@wxiaoguang commented on GitHub (Mar 1, 2023):

The fix: https://github.com/go-gitea/gitea/pull/23224

ps: I didn't change the "clear" behavior for hiding (although maybe it's better to hide after clearing).
IMO in history, it is done by purpose to keep the list shown after clicking the "clear", just like clicking other items.

@wxiaoguang commented on GitHub (Mar 1, 2023): The fix: https://github.com/go-gitea/gitea/pull/23224 ps: I didn't change the "clear" behavior for hiding (although maybe it's better to hide after clearing). IMO in history, it is done by purpose to keep the list shown after clicking the "clear", just like clicking other items.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10008