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

Ctrl+Enter works when creating but not when updating a comment #30710

Closed
bilogic opened this issue Apr 26, 2024 · 18 comments · Fixed by #30720
Closed

Ctrl+Enter works when creating but not when updating a comment #30710

bilogic opened this issue Apr 26, 2024 · 18 comments · Fixed by #30720
Assignees
Labels

Comments

@bilogic
Copy link
Contributor

bilogic commented Apr 26, 2024

Description

I often use Ctrl + Enter when saving comments, but it only works when creating a new comment/issue, has no effect when trying to POST after editing a comment.

Gitea Version

1.21.11+9-g0e20ccfe32

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 26, 2024

We will get this support in 1.22 , but I guess I won't backport it to 1.21 since it would cause some non-bugfix changes.

Related: [Feature Request] Add "Ctrl+Enter" posting of messages for all textareas #14843

@wxiaoguang wxiaoguang self-assigned this Apr 26, 2024
@bilogic
Copy link
Contributor Author

bilogic commented Apr 26, 2024

Got it, is there a 1.22 image that I can test?

@wxiaoguang
Copy link
Contributor

Not yet at the moment. Maybe I could start coding in a few days 😄

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 26, 2024

A quick fix could be like this: Make Ctrl+Enter work for issue/comment edit #30720

Actually I have a complex plan for fixing the "enter" behaviors for various forms, while I think this quick fix doesn't cost much time and is good to have.


If the quick fix could be merged, then you could try it by the nightly release

@wxiaoguang
Copy link
Contributor

Got it, is there a 1.22 image that I can test?

Now we have 1.22-rc1, it contains the "fix":

image

@bilogic
Copy link
Contributor Author

bilogic commented Apr 28, 2024

Ok, found the docker image gitea/gitea:1.22.0-rc1

@bilogic
Copy link
Contributor Author

bilogic commented Apr 28, 2024

It seems the arc-green theme was removed between 1.21.11+9-g0e20ccfe32 and 1.22.0-rc1? Anyway for me to get it back?

@wxiaoguang
Copy link
Contributor

It is still there, only renamed.

There is a breaking change for it: https://github.com/go-gitea/gitea/releases

Rename the default themes to gitea-light, gitea-dark, gitea-auto (#27419)

The renaming is done to make it easier to support more user's custom themes.

@bilogic
Copy link
Contributor Author

bilogic commented Apr 28, 2024

How would I go about that with docker? Let me know if there is a better place to discuss this theme issue. Thank you.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 28, 2024

How would I go about that with docker?

Sorry, I didn't get the point of "How would I go about that with docker?". Do you mean you didn't see it?

Maybe there is something in your app.ini, check the THEME related keys.


Maybe there are some legacy options generated by old Gitea, now you could simply make THEMES to be empty, then all themes could be used.

@bilogic
Copy link
Contributor Author

bilogic commented Apr 28, 2024

image

I'm using docker, so I assume everything gets overwritten?
The above are all that I can see in 1.22, and none of them shows what I used previously.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 28, 2024

I'm using docker, so I assume everything gets overwritten?
The above are all that I can see in 1.22, and none of them shows what I used previously.

Hmm, do you mean that you still need the "green dark theme" which is named "arc-green" ?

There is one change for the dark theme: Recolor dark theme to blue shade (#29283)

If I understand correctly, the "arc dark theme" was completely rewritten by #27419 / #29283, the color change proposal is in #27097, so there is no equivalent arc-green in 1.22 after #29283. Maybe @silverwind (the author of these issue/PR) knows more.

@bilogic
Copy link
Contributor Author

bilogic commented Apr 28, 2024

Yes, I'm looking for the arc-green theme. All the referenced conversations are locked. But thanks!

@silverwind Personally, the arc-green matches the green gitea logo better even tho I understand this is trying to achieve consistency between dark/light. But why the need to be "consistent"? In our setup, we never toggle gitea to light. It would be great if there is a way to get back arc-green.

@lunny
Copy link
Member

lunny commented Apr 28, 2024

Yes, I'm looking for the arc-green theme. All the referenced conversations are locked. But thanks!

@silverwind Personally, the arc-green matches the green gitea logo better even tho I understand this is trying to achieve consistency between dark/light. But why the need to be "consistent"? In our setup, we never toggle gitea to light. It would be great if there is a way to get back arc-green.

Maybe that theme could be copied as a third-party theme.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 28, 2024

I could share some of my opinions about this decision:

  1. there are many buttons/labels/messages in green (no matter which theme is used), the green elements usually mean "success". So the default green color used by "arc-green" as primary color would confuse users.
  2. there are more users affected by green/red blindness than blue.

@bilogic
Copy link
Contributor Author

bilogic commented Apr 28, 2024

Maybe that theme could be copied as a third-party theme.

Yea, this would be great, any instructions on how to get it back in my docker setup?

  1. there are many buttons/labels/messages in green (no matter which theme is used), the green elements usually mean "success". So the default green color used by "arc-green" as primary color would confuse users.
  2. there are more users affected by green/red blindness than blue.

Thanks for the insight. Maybe a blue gitea icon? 🤭

Jokes and considerations aside, and this is just my personal preference: I find the arc-green "cleaner" as compared to the mix of blue/green.

I guess this comes from my approach of having subtle success notifications, but loud failure alerts. As my reporting mechanisms may sometimes break, success notifications are necessary to assure that it is not broken.

@lunny
Copy link
Member

lunny commented Apr 28, 2024

You can try to follow the below steps to add a custom theme

[UI]
THEMES=arc-green,gitea-auto,gitea-light,gitea-dark
  • Restart the Gitea container

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Apr 28, 2024

Download https://github.com/go-gitea/gitea/blob/release/v1.21/web_src/css/themes/theme-arc-green.css

Actually I wouldn't recommend to do so if end users do not want to spend enough time on customizing. The problem is that the theme variables (always) change between versions. So a 1.21 theme might not work well in 1.22 (some parts work, while some parts don't)

If end users would like to spend enough time on customizing, the customized theme should base on the related release's theme variables.

Edit /data/gitea/conf/app.ini to add

No need to do so anymore after #30625, all themes are automatically discovered.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 26, 2024
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.

3 participants