Page MenuHomePhabricator

lihaohong (Peter Li)
User

Projects

User does not belong to any projects.

Today

  • No visible events.

Tomorrow

  • No visible events.

Friday

  • No visible events.

User Details

User Since
Sep 13 2022, 7:52 PM (174 w, 1 d)
Availability
Available
LDAP User
Peter Li
MediaWiki User
Unknown

Recent Activity

Mon, Jan 12

lihaohong updated the task description for T414329: Scribunto produces invalid UTF-8 string which causes regex failures in the parser.
Mon, Jan 12, 12:05 PM · affects-Miraheze, MediaWiki-Parser, Scribunto
lihaohong created T414329: Scribunto produces invalid UTF-8 string which causes regex failures in the parser.
Mon, Jan 12, 11:47 AM · affects-Miraheze, MediaWiki-Parser, Scribunto

Mon, Jan 5

lihaohong added a comment to T401500: ArticleFeedbackv5 reports it is not enabled for a page despite the form showing up.

Follow-up: works on 1.45 on Mirabeta. Whatever was causing the issue originally went away.

Mon, Jan 5, 11:40 PM · affects-Miraheze, ArticleFeedbackv5

Dec 5 2025

lihaohong updated subscribers of T411848: Cargo's Lua support causing errors.

Backtrace from @SomeRandomDeveloper in https://issue-tracker.miraheze.org/P567

Dec 5 2025, 8:24 AM · MediaWiki-extensions-Cargo, affects-Miraheze

Oct 13 2025

lihaohong updated subscribers of T407162: Including the same TemplateStyles stylesheet multiple times increases unstrip post-expand size.

@stjn I believe it was you who suggested reporting this on Phabricator on Discord since the username matches your profile.

Oct 13 2025, 9:43 PM · MediaWiki-Parser, TemplateStyles
lihaohong created T407162: Including the same TemplateStyles stylesheet multiple times increases unstrip post-expand size.
Oct 13 2025, 9:37 PM · MediaWiki-Parser, TemplateStyles

Oct 9 2025

lihaohong added a comment to T406895: WikiSEO cannot set an external URL as the image if $wgAllowExternalImages is set to true.

As a workaround, the url can be inserted in the form of //static.wikitide.net.... Dropping the protocol will prevent $wgAllowExternalImages from touching it, but the url is still recognized by WikiSEO and by some applications (discord was okay with it).

Oct 9 2025, 8:21 PM · Patch-For-Review, affects-Miraheze, WikiSEO
lihaohong added a comment to T406895: WikiSEO cannot set an external URL as the image if $wgAllowExternalImages is set to true.

Downstream: https://issue-tracker.miraheze.org/T13802

Oct 9 2025, 3:53 PM · Patch-For-Review, affects-Miraheze, WikiSEO
lihaohong created T406895: WikiSEO cannot set an external URL as the image if $wgAllowExternalImages is set to true.
Oct 9 2025, 3:49 PM · Patch-For-Review, affects-Miraheze, WikiSEO

Sep 30 2025

lihaohong added a comment to T405314: Vector 2022's horizontal padding for page container is too large under smaller screen widths.

I'm not sure why 320px is the center of the argument here. I feel like I made some good points independent of the exact size of the mobile screen (i.e. the padding used by other responsive skins and the need to have more space available for content on mobile). Regardless, I updated the original task description and changed 320px to 400px (along with all the screenshots).

Sep 30 2025, 3:40 AM · Readers Essential Work 2025, Reader Experience Team, Patch-For-Review, Vector 2022
lihaohong updated the task description for T405314: Vector 2022's horizontal padding for page container is too large under smaller screen widths.
Sep 30 2025, 3:26 AM · Readers Essential Work 2025, Reader Experience Team, Patch-For-Review, Vector 2022

Sep 23 2025

lihaohong added a comment to T405314: Vector 2022's horizontal padding for page container is too large under smaller screen widths.

I tried some other widths. Vector 2022 uses 1.5rem padding for screen widths 1100px and below. Using the same padding for 400px and 1100px width screens does not seem like a good idea to me and I don't think any other major responsive skin is doing this. Besides 0.45em and 1em, there's Fandom which uses 0.75em and Citizen which uses 20px=1.25em, and Citizen's spacing also seems awfully large to me.

Sep 23 2025, 7:46 AM · Readers Essential Work 2025, Reader Experience Team, Patch-For-Review, Vector 2022
lihaohong added a comment to T405314: Vector 2022's horizontal padding for page container is too large under smaller screen widths.

Which hardware is this? I don't think we want to spend a lot of effort on such extreme screen widths.

Sep 23 2025, 7:13 AM · Readers Essential Work 2025, Reader Experience Team, Patch-For-Review, Vector 2022
lihaohong added a comment to T405134: CSS syntax highlighting disappears after enabling Code Mirror 6 on MediaWiki 1.44.

Yeah that does seem to be the case. I switched TemplateStyles to the master branch and, after dropping the MW 1.45 version check, CodeMirror functions correctly for sanitized stylesheets.

Sep 23 2025, 4:10 AM · CodeEditor, affects-Miraheze, MediaWiki-extensions-CodeMirror
lihaohong added a comment to T405134: CSS syntax highlighting disappears after enabling Code Mirror 6 on MediaWiki 1.44.

Thanks for the suggestion. It did not make a difference on my end since codemirror still refuses to work with templatestyles stylesheets and scribunto.

Sep 23 2025, 3:17 AM · CodeEditor, affects-Miraheze, MediaWiki-extensions-CodeMirror
lihaohong added a comment to T365631: Redesign Vector 2022 header and actions for mobile devices.

I noticed that mw-body-header already has display: flex, so what is preventing us from setting flex-wrap to wrap under narrow screens?

Sep 23 2025, 2:49 AM · Reader Experience Team, Patch-For-Review, MW-1.45-notes (1.45.0-wmf.5; 2025-06-10), Readers Essential Work 2025, Design, Mobile, Vector 2022
lihaohong created T405314: Vector 2022's horizontal padding for page container is too large under smaller screen widths.
Sep 23 2025, 2:25 AM · Readers Essential Work 2025, Reader Experience Team, Patch-For-Review, Vector 2022

Sep 20 2025

lihaohong added a comment to T405134: CSS syntax highlighting disappears after enabling Code Mirror 6 on MediaWiki 1.44.

Thanks for the suggestion. I modified $wgCodeMirrorContentModels to include more content models. css and javascript worked and the editor used CM6, but Scribunto and sanitized-css did not. I got the following error for both sanitized-css and Scribunto.

Warning: [CodeMirror] Unsupported content model sanitized-css [Called from MediaWiki\Extension\CodeMirror\Hooks::loadCodeMirrorOnEditPage in /var/www/mediawiki/extensions/CodeMirror/includes/Hooks.php at line 220]

Of course, if I remove these content models from CM's configuration, I get the plaintext input box again instead of the old CodeEditor.

Sep 20 2025, 6:31 AM · CodeEditor, affects-Miraheze, MediaWiki-extensions-CodeMirror
lihaohong updated the task description for T405134: CSS syntax highlighting disappears after enabling Code Mirror 6 on MediaWiki 1.44.
Sep 20 2025, 12:02 AM · CodeEditor, affects-Miraheze, MediaWiki-extensions-CodeMirror

Sep 19 2025

lihaohong added a project to T405134: CSS syntax highlighting disappears after enabling Code Mirror 6 on MediaWiki 1.44: CodeEditor.
Sep 19 2025, 11:43 PM · CodeEditor, affects-Miraheze, MediaWiki-extensions-CodeMirror
lihaohong added a comment to T405134: CSS syntax highlighting disappears after enabling Code Mirror 6 on MediaWiki 1.44.

Forgot to note: this also affects Lua modules and javascript pages, which are handled by CodeEditor but would become plaintext editors after enabling "Improved Syntax Highlighting".

Sep 19 2025, 11:43 PM · CodeEditor, affects-Miraheze, MediaWiki-extensions-CodeMirror
lihaohong created T405134: CSS syntax highlighting disappears after enabling Code Mirror 6 on MediaWiki 1.44.
Sep 19 2025, 11:41 PM · CodeEditor, affects-Miraheze, MediaWiki-extensions-CodeMirror

Sep 16 2025

lihaohong added a comment to T231846: Wikidata 'edit' button blocks description.

Any updates on this? Moving the edit button's position in the DOM up so that it is before the description and then making it float: right should be a quick and easy solution? This button is small enough that usual concerns of float don't apply. Plus, users will be using mobilefrontend on narrower screens.

Sep 16 2025, 7:37 AM · Wikidata-Omega, wmde-wikidata-tech (Wikidata Omega Triage), Wikidata

Aug 31 2025

lihaohong added a comment to T403319: Image hue is inverted in dark mode.

AFAIK there is no fix for this. Your best bet is to disable this extension and write your own dark mode CSS. You can also use the Theme or ThemeToggle extensions to allow switching between multiple themes.

Aug 31 2025, 9:10 AM · MediaWiki-extensions-DarkMode

Aug 21 2025

lihaohong closed T399142: MsUpload does not accommodate vector 2022's dark mode as Resolved.

Thanks @Samwilson. Looks like this is all good. Just need to wait for the patch to reach downstream.

Aug 21 2025, 7:14 PM · dark-mode, affects-Miraheze, MediaWiki-extensions-MsUpload
lihaohong added a comment to T402066: Tables are forced to have display:block regardless of their size.

@Jdlrobson-WMF I uploaded a patch for MinervaNeue as well. Minerva's CSS is a bit different, but I think the outcome is the same. The extra gray background mentioned in T361838 should be gone without compromising the scrolling behavior for larger tables.

Aug 21 2025, 2:20 AM · MW-1.44-notes, Verified, Patch-For-Review, Reader Experience Team, MW-1.45-notes (1.45.0-wmf.16; 2025-08-26), MediaWiki-Core-Skin-Architecture, CSS
lihaohong added a comment to T402066: Tables are forced to have display:block regardless of their size.

@lihaohong the code serves both mobile and desktop and I don't believe fit-content has any effect there.

Aug 21 2025, 12:16 AM · MW-1.44-notes, Verified, Patch-For-Review, Reader Experience Team, MW-1.45-notes (1.45.0-wmf.16; 2025-08-26), MediaWiki-Core-Skin-Architecture, CSS

Aug 20 2025

lihaohong added a comment to T402066: Tables are forced to have display:block regardless of their size.

In particular, width: fit-content gets overridden by max-width: 100% with the screen is narrow, so I don't understand why this needs to be closed. It should be a strict improvement over the current solution.

Aug 20 2025, 10:32 PM · MW-1.44-notes, Verified, Patch-For-Review, Reader Experience Team, MW-1.45-notes (1.45.0-wmf.16; 2025-08-26), MediaWiki-Core-Skin-Architecture, CSS
lihaohong reopened T402066: Tables are forced to have display:block regardless of their size as "Open".

The proposed fix does not compromise responsiveness in any way. It simply removes the problematic borders on the right.

Aug 20 2025, 10:31 PM · MW-1.44-notes, Verified, Patch-For-Review, Reader Experience Team, MW-1.45-notes (1.45.0-wmf.16; 2025-08-26), MediaWiki-Core-Skin-Architecture, CSS

Aug 16 2025

lihaohong created T402067: Parser adds an extra paragraph for self-links inside a table.
Aug 16 2025, 3:21 AM · MediaWiki-Parser
lihaohong added a comment to T402066: Tables are forced to have display:block regardless of their size.

Looks like the CSS was added as a result of T330527. I'm surprised it passed all the quality control steps considering how it breaks smaller tables on narrower screens.

Aug 16 2025, 1:04 AM · MW-1.44-notes, Verified, Patch-For-Review, Reader Experience Team, MW-1.45-notes (1.45.0-wmf.16; 2025-08-26), MediaWiki-Core-Skin-Architecture, CSS
lihaohong added a project to T402066: Tables are forced to have display:block regardless of their size: CSS.
Aug 16 2025, 12:53 AM · MW-1.44-notes, Verified, Patch-For-Review, Reader Experience Team, MW-1.45-notes (1.45.0-wmf.16; 2025-08-26), MediaWiki-Core-Skin-Architecture, CSS
lihaohong created T402066: Tables are forced to have display:block regardless of their size.
Aug 16 2025, 12:46 AM · MW-1.44-notes, Verified, Patch-For-Review, Reader Experience Team, MW-1.45-notes (1.45.0-wmf.16; 2025-08-26), MediaWiki-Core-Skin-Architecture, CSS

Aug 11 2025

lihaohong created T401621: Wikitext parser inserts newlines for parser functions inside tables.
Aug 11 2025, 6:42 PM · affects-Miraheze, MediaWiki-Parser

Jul 10 2025

lihaohong updated the task description for T399142: MsUpload does not accommodate vector 2022's dark mode.
Jul 10 2025, 3:17 AM · dark-mode, affects-Miraheze, MediaWiki-extensions-MsUpload
lihaohong created T399142: MsUpload does not accommodate vector 2022's dark mode.
Jul 10 2025, 2:48 AM · dark-mode, affects-Miraheze, MediaWiki-extensions-MsUpload

Jun 5 2025

lihaohong updated subscribers of T396102: The client-darkmode class is not added for anonymous users.

It probably has to do with the following js. It doesn't do anything with client-darkmode if the user is anonymous. @Kizule would it be fine to execute the if ( darkMode ) statement for both anonymous and logged-in users? This change works on my local testing environment, but I'm not sure if the code is the way it is for some other reasons.

if ( mw.user.isAnon() ) {
        // If the user is anonymous (not logged in) write a cookie
        mw.user.clientPrefs.set( 'skin-theme', darkMode ? 'night' : 'day' );
} else {
        // If the user is logged in write with API to user settings
        new mw.Api().saveOption( 'darkmode', darkMode ? '1' : '0' );
        if ( darkMode ) {
                docClassList.add( 'skin-theme-clientpref-night' );
                docClassList.add( 'client-darkmode' );
                docClassList.remove( 'skin-theme-clientpref-day' );
        } else {
                docClassList.add( 'skin-theme-clientpref-day' );
                docClassList.remove( 'client-darkmode' );
                docClassList.remove( 'skin-theme-clientpref-night' );
        }
}
Jun 5 2025, 9:29 AM · Regression, affects-Miraheze, MediaWiki-extensions-DarkMode
lihaohong created T396102: The client-darkmode class is not added for anonymous users.
Jun 5 2025, 9:20 AM · Regression, affects-Miraheze, MediaWiki-extensions-DarkMode

Jan 19 2025

lihaohong added a comment to T373511: Special:AllComments is incompatible with MediaWiki 1.42.

Looks like this is the offending table name.

((SELECT cst_c_comment_page_id AS `union_page_id` FROM `cs_comments` ) UNION (SELECT cst_r_reply_page_id AS `union_page_id` FROM `cs_replies` )) AS union_table

As far as I can tell, extractTableNameComponents checks whether there is a quotation mark in the string. If there is, it'll panic an throw the exception seen here. The backticks (`) are the culprit.

Jan 19 2025, 11:15 AM · affects-Miraheze, MediaWiki-extensions-CommentStreams

Nov 27 2023

lihaohong closed T319856: Migrate lihaohong-bot from Toolforge GridEngine to Toolforge Kubernetes as Resolved.
Nov 27 2023, 3:58 AM · Grid-Engine-to-K8s-Migration