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

Make Monaco theme follow browser, fully type codeeditor.ts #32756

Merged
merged 8 commits into from
Dec 9, 2024

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Dec 8, 2024

  1. Monaco's theme now follows changes in dark/light mode setting, this works via MediaQueryList's change event.
  2. Fully type the file, it now passes typescript strict mode.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 8, 2024
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Dec 8, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 8, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 9, 2024
@silverwind
Copy link
Member Author

Seems I can not put ! because that triggers @typescript-eslint/no-unnecessary-type-assertion when strictNullChecks is diabled. So the next best thing will be explicit throws.

@silverwind
Copy link
Member Author

Now it throws instead of ?. and the code passes in both strict and non-strict mode.

@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 9, 2024
@silverwind silverwind enabled auto-merge (squash) December 9, 2024 16:57
@silverwind silverwind merged commit 57a5e9a into go-gitea:main Dec 9, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Dec 9, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 9, 2024
@silverwind silverwind deleted the types-codeeditor branch December 9, 2024 17:07
@lunny lunny removed this from the 1.24.0 milestone Dec 9, 2024
@lunny lunny added this to the 1.23.0 milestone Dec 9, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 10, 2024
* giteaofficial/main:
  Make RepoActionView.vue support `##[group]` (go-gitea#32770)
  [skip ci] Updated translations via Crowdin
  Make Monaco theme follow browser, fully type codeeditor.ts (go-gitea#32756)
  Fix duplicate dropdown dividers (go-gitea#32760)
  Remove unnecessary border in repo home page sidebar (go-gitea#32767)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Mar 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants