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

Adding Github Theme to Gitea and Setting It as the Default Theme #33624

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ExplodingDragon
Copy link
Contributor

@ExplodingDragon ExplodingDragon commented Feb 17, 2025

Presumptuous Attempt, Do Not Merge

Include https://github.com/lutinglt/gitea-github-theme in Gitea and set it as default theme.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 17, 2025
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 17, 2025
@ExplodingDragon ExplodingDragon marked this pull request as draft February 17, 2025 08:50
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/internal labels Feb 17, 2025
@ExplodingDragon ExplodingDragon changed the title [Presumptuous Attempt] Adding the Github Theme to Gitea and Setting It as the Default Theme Adding Github Theme to Gitea and Setting It as the Default Theme Feb 17, 2025
@github-actions github-actions bot added the docs-update-needed The document needs to be updated synchronously label Feb 17, 2025
@wxiaoguang
Copy link
Contributor

Hmm, the "official" themes should be managed in the Gitea's repo, because we refactor the frontend a lot, using external theme files will break frequently.

@ExplodingDragon
Copy link
Contributor Author

Hmm, the "official" themes should be managed in the Gitea's repo, because we refactor the frontend a lot, using external theme files will break frequently.

@wxiaoguang Yes, this PR was never intended to be merged into the main branch. It was simply provided as a reference example for custom theme packaging.

@silverwind
Copy link
Member

silverwind commented Feb 17, 2025

For the record: If the default theme is ever changed, a database migration needs to be added to migrate users that had the previous theme set get migrated to the new theme.

@wxiaoguang
Copy link
Contributor

For the record: If the default theme is ever changed, a database migration needs to be added to migrate users that had the previous theme set get migrated to the new theme.

I think it is not needed anymore in modern Gitea. I have made the theme system could work with fallback correctly in Initial support for colorblindness-friendly themes (#30625)

image

@silverwind
Copy link
Member

silverwind commented Feb 17, 2025

For the record: If the default theme is ever changed, a database migration needs to be added to migrate users that had the previous theme set get migrated to the new theme.

I think it is not needed anymore in modern Gitea. I have made the theme system could work with fallback correctly in Initial support for colorblindness-friendly themes (#30625)

image

You mean users that select the default theme will store user.Theme = "" in the database?

Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please disregard this "review", it is solely to ensure that it can't be accidentally merged

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 17, 2025
@techknowlogick
Copy link
Member

Oh neat! I don't think I've seen this custom theme yet (I will have to take a double check of the "awesome" list), but it's rather exciting!
There was previously discussion of having some sort of theme "store" (not actually a store, but a listing of custom themes) along with screenshots etc.. similar to how hugo has one, and would allow for assistance in allowing users to use it, not sure of where that ended up though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-update-needed The document needs to be updated synchronously lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged modifies/go Pull requests that update Go code modifies/internal size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants