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

Cannot edit in WebEditor, keeps showing loading #25770

Closed
sinsky opened this issue Jul 8, 2023 · 8 comments · Fixed by #25780
Closed

Cannot edit in WebEditor, keeps showing loading #25770

sinsky opened this issue Jul 8, 2023 · 8 comments · Fixed by #25780
Assignees
Labels

Comments

@sinsky
Copy link

sinsky commented Jul 8, 2023

Description

When I try to create a new file or edit a file in the web editor, the web editor screen remains loading.

Reference.
This is not happening with version 1.19.3 that I am self-hosting.

Gitea Version

1.21.0+dev-254-g2ff0c12a9

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

スクリーンショット 2023-07-08 23 11 58 スクリーンショット 2023-07-08 23 17 39

Git Version

No response

Operating System

No response

How are you running Gitea?

use https://try.gitea.io

Database

None

@sinsky sinsky added the type/bug label Jul 8, 2023
@puni9869
Copy link
Member

puni9869 commented Jul 8, 2023

It is working fine. https://try.git.io is a demo server with low configuration. I have also tried in my local dev server. Its working fine. You can try the prod server https://gitea.com/user/sign_up

@wxiaoguang
Copy link
Contributor

It's a regression of Minify CSS with Lightning CSS #25754

Before: --color-code-bg: #ffffff;

After: --color-code-bg: #fff;, but the editor doesn't like #fff color.

@sinsky
Copy link
Author

sinsky commented Jul 9, 2023

@puni9869 Thanks for the reply. I did confirm that it works fine on gitea.com.
But just to be sure, I tried it in my local environment and got the same phenomenon.

@wxiaoguang Thank you for finding out the cause of the problem!
I have confirmed that I can edit the theme in User settings if I manipulate it with arc-green!

@wxiaoguang
Copy link
Contributor

If you need to follow the main branch, you can revert the #25754 in your build (it's quite small) and try.

@puni9869
Copy link
Member

puni9869 commented Jul 9, 2023

If you need to follow the main branch, you can revert the #25754 in your build (it's quite small) and try.

Shall we also revert the #25754 from main branch

@wxiaoguang
Copy link
Contributor

No hurry, if it is the case, I think there could still be some solutions:

  1. revert
  2. fine tune options to keep #ffffff
  3. do some special fixes for the editor's getProp

@delvh
Copy link
Member

delvh commented Jul 9, 2023

@silverwind

@silverwind
Copy link
Member

silverwind commented Jul 9, 2023

I assume we could just the color to 6-digit format for Monaco if it only accepts that, there might be a function for it existing already. This should already be a problem with themes that use non-6-digit format.

@silverwind silverwind self-assigned this Jul 9, 2023
silverwind added a commit that referenced this issue Jul 9, 2023
Monaco can not deal with color formats other than 6-digit hex, so we
convert the colors for it via new
[`tinycolor2`](https://github.com/bgrins/TinyColor) dependency (5kB
minzipped).

Also, with the addition of the module, we can replace the existing
`hexToRGBColor` usage, I verified it is compatible with the current
tests before removing the function.

Fixes: #25770
silverwind added a commit to silverwind/gitea that referenced this issue Jul 9, 2023
Monaco can not deal with color formats other than 6-digit hex, so we
convert the colors for it via new
[`tinycolor2`](https://github.com/bgrins/TinyColor) dependency (5kB
minzipped).

Also, with the addition of the module, we can replace the existing
`hexToRGBColor` usage, I verified it is compatible with the current
tests before removing the function.

Fixes: go-gitea#25770
silverwind added a commit that referenced this issue Jul 9, 2023
Backport #25780, clean
cherry-pick.

Monaco can not deal with color formats other than 6-digit hex, so we
convert the colors for it via new
[`tinycolor2`](https://github.com/bgrins/TinyColor) dependency (5kB
minzipped).

Also, with the addition of the module, we can replace the existing
`hexToRGBColor` usage, I verified it is compatible with the current
tests before removing the function.

Fixes: #25770
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants