Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix and enhance comment editor monospace toggle#36181

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
silverwind wants to merge8 commits intogo-gitea:main
base:main
Choose a base branch
Loading
fromsilverwind:mono

Conversation

@silverwind
Copy link
Member

@silverwindsilverwind commentedDec 17, 2025
edited
Loading

Fixes:#36175

  1. Correctly apply setting on textareas spawned by comment edit
  2. When changing the setting, apply it to all textareas on the current page and in all other open tabs

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelDec 17, 2025
@silverwind
Copy link
MemberAuthor

silverwind commentedDec 17, 2025
edited
Loading

I think this could be expanded to also apply the setting in other open tabs by leveraging thestorage event:

https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event

I guess a small storage helper module is needed to abstract this out of the file and be useful for all localStorage-backed variables.

@silverwindsilverwind added type/enhancementAn improvement of existing functionality and removed type/bug labelsDec 17, 2025
@silverwind
Copy link
MemberAuthor

silverwind commentedDec 17, 2025
edited
Loading

I've added the bare minimum to get the setting working across tabs too. There's probably an opportunity to abstract into somelocalStorage module suitable for more similar localStorage-backed settings, but I'm not totally certain how to design it.

@silverwindsilverwind changed the titleFix comment editor monospace toggle for edit modeFix and enhance comment editor monospace toggleDec 17, 2025
@silverwind
Copy link
MemberAuthor

web_src/js/modules/storage.ts is now contains minimallocalStorage wrapper functions and I've used them everywhere where we previously usedlocalStorage directly (except inline scripts, but that's another topic to be solved via web components). This is in preparation so that these settings can be synced to the server in the future.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

lgtm/need 2This PR needs two approvals by maintainers to be considered for merging.modifies/frontendtype/enhancementAn improvement of existing functionality

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Monospace font settings broken in comment/issue editor

2 participants

@silverwind@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp