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

[Feature] Add global instance CSS customization setting #3352

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

Conversation

S0yKaf
Copy link

@S0yKaf S0yKaf commented Sep 25, 2024

Description

If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements.

If this is a documentation change, please briefly describe what you've changed and why.

Allow instance admins to add custom CSS that will affect every page of their instance.

This is done with a new CustomCSS instance setting that works pretty much exactly like the Users CustomCSS property. This custom CSS is then requested for every page load. User styles/themes take precedence over this CSS.

closes #3348

Checklist

Please put an x inside each checkbox to indicate that you've read and followed it: [ ] -> [x]

If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).

  • I/we have read the GoToSocial contribution guidelines.
  • I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
  • I/we have not leveraged AI to create the proposed changes.
  • I/we have performed a self-review of added code.
  • I/we have written code that is legible and maintainable by others.
  • I/we have commented the added code, particularly in hard-to-understand areas.
  • I/we have made any necessary changes to documentation.
  • I/we have added tests that cover new code.
  • I/we have run tests and they pass locally with the changes.
  • I/we have run go fmt ./... and golangci-lint run.

Allow instance admins to add custom CSS that will affect
every page of their instance.

This is done with a new CustomCSS instance setting that
works pretty much exactly like the Users CustomCSS property.
This custom CSS is then requested for every page load.
User styles/themes take precedence over this CSS.
@S0yKaf S0yKaf changed the title Feat: Add global instance CSS customization setting [Feature] Add global instance CSS customization setting Sep 25, 2024
@S0yKaf S0yKaf marked this pull request as draft September 25, 2024 04:30
@S0yKaf S0yKaf marked this pull request as ready for review September 25, 2024 04:32
@S0yKaf
Copy link
Author

S0yKaf commented Sep 25, 2024

Contrary to what I've said in the Issue, this will also affect the CSS in the dashboard. Again, no stress for the review, I know you're all busy with the 0.17 release.

@S0yKaf
Copy link
Author

S0yKaf commented Sep 25, 2024

[GIN-debug] GET    /                         --> github.com/superseriousbusiness/gotosocial/internal/middleware_test.testHeaderFilter.func1 (2 handlers)
--- FAIL: TestThrottlingMiddleware (3.22s)
    throttling_test.go:100: did not return status 429 (200) with queueLimit=512 and request=530
FAIL
FAIL	github.com/superseriousbusiness/gotosocial/internal/middleware	15.506s
ok  	github.com/superseriousbusiness/gotosocial/internal/oauth	5.872s
ok  	github.com/superseriousbusiness/gotosocial/internal/paging	0.053s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing	16.454s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/account	58.451s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/admin	47.852s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/conversations	22.749s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/interactionrequests	13.797s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/media	21.014s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/polls	6.387s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/status	30.041s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/stream	6.448s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/timeline	7.412s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/user	8.663s
ok  	github.com/superseriousbusiness/gotosocial/internal/processing/workers	163.601s
ok  	github.com/superseriousbusiness/gotosocial/internal/router	0.047s
ok  	github.com/superseriousbusiness/gotosocial/internal/text	83.479s
ok  	github.com/superseriousbusiness/gotosocial/internal/timeline	36.871s
ok  	github.com/superseriousbusiness/gotosocial/internal/trans	6.882s
ok  	github.com/superseriousbusiness/gotosocial/internal/transport	19.790s
ok  	github.com/superseriousbusiness/gotosocial/internal/transport/delivery	(cached)
ok  	github.com/superseriousbusiness/gotosocial/internal/typeutils	115.179s
ok  	github.com/superseriousbusiness/gotosocial/internal/util	0.809s
ok  	github.com/superseriousbusiness/gotosocial/internal/validate	0.022s
FAIL

This is what's failing the tests but I can't seem to be able to reproduce it locally. Thoughts?

@tsmethurst
Copy link
Contributor

Yes, just a flaky test I think, I'll re-run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature] Add custom CSS for Instance Frontpage
2 participants