Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move UI configurations that do not require restarting gitea to take effect to the admin dashboard #33740

Closed
wants to merge 3 commits into from

Conversation

hiifong
Copy link
Member

@hiifong hiifong commented Feb 27, 2025

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 27, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 27, 2025
@hiifong hiifong marked this pull request as draft February 27, 2025 14:54
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Feb 27, 2025
@lunny
Copy link
Member

lunny commented Feb 27, 2025

It's better to split them as multiple sections.

@silverwind
Copy link
Member

silverwind commented Feb 28, 2025

How does this work? Will it write into app.ini?

Regarding UI, I would make it so that all <input> elements are horizontally aligned.

@hiifong
Copy link
Member Author

hiifong commented Feb 28, 2025

How does this work? Will it write into app.ini?

No, these configurations will be stored directly in the database in the future

Regarding UI, I would make it so that all elements are horizontally aligned.

Regarding UI issues, I will listen to your suggestions

@silverwind
Copy link
Member

silverwind commented Feb 28, 2025

No, these configurations will be stored directly in the database in the future

And which value takes precedence when database and app.ini conflict for a setting?

@lunny
Copy link
Member

lunny commented Feb 28, 2025

It should be like other configurations which migrated from ini to database. Once migrated, the configuration item in the ini will be marked as deprecated and will not be read any more.

@hiifong
Copy link
Member Author

hiifong commented Feb 28, 2025

No, these configurations will be stored directly in the database in the future

And which value takes precedence when database and app.ini conflict for a setting?

As @lunny said, When upgrading gitea, the configuration in ini will be migrated to the database, and the migrated configuration items will be marked as deprecated in the ini configuration. The migrated configuration items are based on the configuration in the database.

@silverwind
Copy link
Member

silverwind commented Mar 1, 2025

It does still seem like a bit of a sketchy mechanism because config can also come from env vars (in the docker case), and you can't "mark" stuff there.

I recommend clearly mentioning this in the configuration docs, otherwise users might become confused why their env vars don't take effect.

@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/migrations modifies/frontend docs-update-needed The document needs to be updated synchronously labels Mar 1, 2025
@lunny
Copy link
Member

lunny commented Mar 1, 2025

DefaultTheme, Explore Paging Default Sort and Prefered Timestamp Tense should be a dropdown list.

@pull-request-size pull-request-size bot removed the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 2, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 2, 2025
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 2, 2025
@hiifong hiifong marked this pull request as ready for review March 2, 2025 11:50
@hiifong
Copy link
Member Author

hiifong commented Mar 2, 2025

It's better to split them as multiple sections.

@lunny How about we save it for the next version?

@hiifong
Copy link
Member Author

hiifong commented Mar 3, 2025

It does still seem like a bit of a sketchy mechanism because config can also come from env vars (in the docker case), and you can't "mark" stuff there.

I recommend clearly mentioning this in the configuration docs, otherwise users might become confused why their env vars don't take effect.

It seems that the ui section configuration does not support configuration from environment variables, But I'm not sure, can you tell me what configurations support getting them from environment variables?

@hiifong
Copy link
Member Author

hiifong commented Mar 3, 2025

It does still seem like a bit of a sketchy mechanism because config can also come from env vars (in the docker case), and you can't "mark" stuff there.
I recommend clearly mentioning this in the configuration docs, otherwise users might become confused why their env vars don't take effect.

It seems that the ui section configuration does not support configuration from environment variables, But I'm not sure, can you tell me what configurations support getting them from environment variables?

I found the answer in docs. Excuse me.

@hiifong hiifong marked this pull request as draft March 4, 2025 15:28
@hiifong hiifong marked this pull request as ready for review March 5, 2025 15:27
@hiifong hiifong closed this Mar 5, 2025
@hiifong hiifong reopened this Mar 6, 2025
@pull-request-size pull-request-size bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 6, 2025
@hiifong hiifong marked this pull request as draft March 6, 2025 13:57
@hiifong hiifong force-pushed the ini2ui branch 2 times, most recently from 299c00e to d675e9a Compare March 12, 2025 12:00
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 12, 2025
@github-actions github-actions bot added modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/docs modifies/internal modifies/dependencies labels Mar 12, 2025
@github-actions github-actions bot removed modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/docs modifies/internal modifies/dependencies labels Mar 12, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
docs-update-needed The document needs to be updated synchronously lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/frontend modifies/go Pull requests that update Go code modifies/migrations modifies/templates This PR modifies the template files modifies/translation size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants