Giter VIP home page Giter VIP logo

moegirlpediainterfacecodes's Introduction

MoegirlPediaInterfaceCodes

萌娘百科界面代码库

post commit CI MoegirlPediaInterfaceAdmins Project

欢迎来到萌娘百科界面代码库,本仓库由萌娘百科界面管理员所组成的团队维护,旨在以自动化的方式减轻维护界面代码的复杂度。

目前只有萌娘百科的界面管理员可以拥有本仓库的读写权限,如果你是萌娘百科的界面管理员但没有权限,你可以向 U:AnnAngela 获取本仓库的读写权限;不过如果你尚不是界面管理员,我们也欢迎你以下列方式参与到本仓库的维护工作中来。

仓库架构

仓库文件架构

本仓库包含多组文件用以实现不同用途,详情见下。

仓库架构详情

本仓库支持同时管理多个子站点的代码:

仓库 npm 脚本

本仓库包含下列脚本:

  • npm run test 方便检测代码错误;
  • npm run format 可修正可被自动修正的错误;
  • npm run ci 可通过临时修改镜像源的方式加快 npm ci 速度。

自动化流程

  • 每周日 23:00 UTC 会自动触发一次 Generate Polyfill CI;
  • 每天 00:15 UTC(但愿,Github Actions的 cron 延迟真的好高 _(:з」∠)_)会自动触发一次 postCommit CI;
  • 每提交一次 commit(包括提交 pull request 和在 pull request 里提交新的 commit),postCommit CI 会触发;
  • 当 postCommit CI 检测到新内容时,会自动触发一次 Linter test。

编译流程

机器人通过以下流程编译代码,然后提交到萌百:

  • 执行 tsc --project tsconfig.production.json 以编译 *.js 代码;
  • 执行 npx postcss src/**/*.css --base src/ -d dist/ --verbose 以编译 *.css 代码;
  • 根据模板生成 MediaWiki:Gadgets-definition 页面。

如需手动唤起机器人,请到 post commit CI workflow 处,选择 Branchmaster,手动执行该 workflow。

已知问题

参与维护

众人拾柴火焰高,我们欢迎你参与到界面管理工作中来。

提出建议、意见

我们欢迎你在萌娘百科技术实现讨论版提出建议、意见,我们会审慎考虑可行性和成本等因素后作出决定。

提交贡献

提交贡献的原因有很多,可能是发现了 typo,可能你写成了一个小工具,不论如何我们都欢迎你来提交贡献。

但首先,最重要的一点是:务必阅读并遵守 CODE OF CONDUCT.md,否则你的贡献有可能被拒绝。

其次,由于需要确保(虽然永远也不可能出现的)将小工具迁移到 Gadget 名字空间的情况的兼容性,文件名对应了萌娘百科上对应页面的页面名,从而包含了 :,而这导致了本仓库无法在 Windows 上克隆。

所以我们建议你通过以下方式提交贡献:

  • 使用 Linux on Windows with WSL
  • 使用 Linux 系统(可以是远程服务器、本地虚拟机、本地 Docker 容器等);
  • 使用 macOS 系统;
  • 使用 GitHub Codespaces(对个人用户有免费额度)。

然后,我们建议你使用 Visual Studio Code,本仓库专为 VSCode 配置。我们也建议你搭配以下 VSCode 扩展结合本仓库提供的配置以优化体验:

moegirlpediainterfacecodes's People

Contributors

actions-user avatar annangela avatar bbrabbitt avatar bearbin1215 avatar bhsd-harry avatar dependabot[bot] avatar dragon-fish avatar fallenice2022 avatar func86 avatar github-actions[bot] avatar gui-ying233 avatar honoka55 avatar kumokasumi avatar lihaohong6 avatar lovelycardinal avatar rakuzen25 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

moegirlpediainterfacecodes's Issues

Dependency Dashboard from renovate

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/Linter test.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • technote-space/get-diff-action v6
  • actions/github-script v6
.github/workflows/auto_assign.yml
  • kentaro-m/auto-assign-action v1.2.4
.github/workflows/postCommit.yml
  • actions/checkout v3
  • actions/setup-node v3
  • technote-space/get-diff-action v6
  • EndBug/add-and-commit v9
npm
package.json
  • @csstools/postcss-is-pseudo-class ^3.1.0
  • @financial-times/js-features-analyser ^0.4.3
  • @types/cron ^2.0.0
  • @types/jquery ^3.5.14
  • @types/moment ^2.13.0
  • @wikimedia/types-wikimedia ^0.3.4
  • async-lock ^1.4.0
  • autoprefixer ^10.4.13
  • browser-pack-flat ^3.5.0
  • browserify ^17.0.0
  • common-shakeify ^1.1.2
  • cron ^2.1.0
  • envify ^4.1.0
  • eslint ^8.28.0
  • esmify ^2.1.1
  • hash-wasm ^4.9.0
  • ip ^1.1.8
  • localforage ^1.10.0
  • minify-stream ^2.1.0
  • postcss ^8.4.19
  • postcss-cli ^10.0.0
  • postcss-discard-comments ^5.1.2
  • postcss-font-normalize ^0.0.0
  • postcss-font-variant ^5.0.0
  • postcss-selector-matches ^4.0.0
  • postcss-selector-not ^7.0.1
  • strip-json-comments ^5.0.0
  • stylelint ^14.15.0
  • stylelint-config-standard ^29.0.0
  • typescript ^4.9.3
  • unassertify ^3.0.1
  • node >=16

  • Check this box to trigger a request for Renovate to run again on this repository

关于 GHIAHistory.json

  • 将datetime统一为UTC
  • 检查co-author是否能被正确统计/或pr是否只统计最后一个author

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: .github/renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid lockFileMaintenance.schedule: 'Invalid schedule: "30 8 * * *" has cron syntax, but doesn't have * as minutes', Invalid schedule: 'Invalid schedule: "15 8 * * *" has cron syntax, but doesn't have * as minutes'

批量删除工具

  • 在“原因加载时”或“批量删除进行时”或者删除完成后再次点击「批量删除本分类下页面」按钮,会打开新页面。
  • 不能批量删除分类下图片(若分类页不包含NOGALLERY魔术字)

GHIAHistory 调整

  • 按用户名排序避免过大 diff
  • 检测是否 github 签名,若是则改为用 author
  • 统计每个 commit 涉及的文件数量

关于 wikiBlame

希望可以增加一些功能 @bbrabbitt

  • 增加退出按钮,而不是必须按键盘的esc
  • 筛选完成后,给出一个对应版本的固定链接

[generatePolyfill] New unrecognizable features detected from polyfill.io

These new unrecognizable features detected from polyfill.io:

[
    "CSSImportRule.prototype.media",
    "CSSImportRule.prototype.styleSheet",
    "CSSMediaRule.prototype.media",
    "CanvasRenderingContext2D.prototype.translate",
    "DOMMatrix.prototype.d",
    "DOMMatrixReadOnly.prototype.d",
    "DOMMatrixReadOnly.prototype.translate",
    "DataTransferItem.prototype.kind",
    "Document.prototype.URL",
    "Document.prototype.createEvent",
    "Element.prototype.attributes",
    "Event.prototype.initEvent",
    "EventTarget.prototype.dispatchEvent",
    "GamepadHapticActuator.prototype.reset",
    "HTMLAnchorElement.prototype.origin",
    "HTMLAnchorElement.prototype.password",
    "HTMLAreaElement.prototype.origin",
    "HTMLAreaElement.prototype.password",
    "HTMLElement.prototype.translate",
    "HTMLFormElement.prototype.reset",
    "HTMLFrameElement.prototype.contentDocument",
    "HTMLFrameElement.prototype.contentWindow",
    "HTMLIFrameElement.prototype.contentDocument",
    "HTMLIFrameElement.prototype.contentWindow",
    "HTMLImageElement.prototype.complete",
    "HTMLLinkElement.prototype.media",
    "HTMLMetaElement.prototype.scheme",
    "HTMLObjectElement.prototype.contentDocument",
    "HTMLObjectElement.prototype.contentWindow",
    "HTMLSourceElement.prototype.media",
    "HTMLStyleElement.prototype.media",
    "HTMLTableCellElement.prototype.headers",
    "HTMLTextAreaElement.prototype.wrap",
    "HTMLTrackElement.prototype.kind",
    "Image.prototype.complete",
    "MediaDeviceInfo.prototype.kind",
    "MediaQueryList.prototype.media",
    "MediaQueryListEvent.prototype.media",
    "MediaStreamTrack.prototype.kind",
    "MessageEvent.prototype.origin",
    "Notification.prototype.tag",
    "Object.prototype.propertyIsEnumerable",
    "OffscreenCanvasRenderingContext2D.prototype.translate",
    "PasswordCredential.prototype.password",
    "PaymentResponse.prototype.complete",
    "Performance.prototype.mark",
    "PromiseRejectionEvent",
    "ReferenceError",
    "ReferenceError.prototype.constructor",
    "ReferenceError.prototype.message",
    "ReferenceError.prototype.name",
    "ReferenceError.prototype.toString",
    "RegExp.prototype",
    "RegExp.prototype.dotAll",
    "RegExp.prototype.sticky",
    "RegExp.prototype.unicode",
    "Request.prototype.headers",
    "Request.prototype.json",
    "Response.prototype.headers",
    "Response.prototype.json",
    "SVGMatrix.prototype.d",
    "SVGMatrix.prototype.translate",
    "SVGStyleElement.prototype.media",
    "StyleSheet.prototype.media",
    "TextTrack.prototype.kind",
    "Touch.prototype.identifier",
    "URL.prototype.origin",
    "URL.prototype.password",
    "XSLTProcessor.prototype.reset",
    "postMessage"
]

萌娘百科vector 2023年版头更换

请将MediaWiki:Gadget-vector-styles.css中第9-11行的
body.skin-vector{ background:url("https://img.moegirl.org.cn/topbar/zhMoegirl_2022Spring.jpg") no-repeat top left #F6F6F6; }

修改为
body.skin-vector{ background:url("https://app.moegirl.org.cn/background/2023Anniversary/vector.jpg") no-repeat top left #F6F6F6; }

autoconfirmedUserPing

当前版本无法判断封禁记录,获取的列表有误

  • u.registration 改为33天,因为成为自确至少还需要3天。
  • 增加判断提案发起时到现在,是否存在封禁记录(含封禁到期在此时间段内、封禁发起在此时间段内,并且可能需要忽略滥用过滤器封禁)

Echarts

目前有一个widget和一个小工具在使用echarts,但版本不一样
建议将echarts库引入站点小工具,自动更新,以避免可能存在的jsdelivr访问困难问题

[generatePolyfill] Unable to fetch the generated url

Unable to fetch the generated url https://polyfill.alicdn.com/v3/polyfill.js?features=Array.from%2CArray.isArray%2CArray.prototype.copyWithin%2CArray.prototype.entries%2CArray.prototype.every%2CArray.prototype.fill%2CArray.prototype.filter%2CArray.prototype.find%2CArray.prototype.findIndex%2CArray.prototype.flat%2CArray.prototype.flatMap%2CArray.prototype.forEach%2CArray.prototype.includes%2CArray.prototype.indexOf%2CArray.prototype.keys%2CArray.prototype.lastIndexOf%2CArray.prototype.map%2CArray.prototype.reduce%2CArray.prototype.reduceRight%2CArray.prototype.some%2CArray.prototype.sort%2CArray.prototype.values%2CArrayBuffer%2CArrayBuffer.isView%2CBlob%2CDOMTokenList.prototype.forEach%2CDOMTokenList.prototype.replace%2CDataView%2CDate.now%2CDate.prototype.toISOString%2CDocumentFragment.prototype.append%2CDocumentFragment.prototype.prepend%2CElement.prototype.after%2CElement.prototype.animate%2CElement.prototype.append%2CElement.prototype.before%2CElement.prototype.classList%2CElement.prototype.closest%2CElement.prototype.matches%2CElement.prototype.prepend%2CElement.prototype.remove%2CElement.prototype.replaceWith%2CElement.prototype.scrollIntoView%2CFloat32Array%2CFloat64Array%2CFunction.prototype.bind%2CFunction.prototype.name%2CInt16Array%2CInt32Array%2CInt8Array%2CIntersectionObserver%2CIntl%2CIntl.DateTimeFormat%2CIntl.ListFormat%2CIntl.NumberFormat%2CIntl.RelativeTimeFormat%2CJSON%2CMap%2CMath.sign%2CMath.trunc%2CMutationObserver%2CNode.prototype.contains%2CNodeList.prototype.forEach%2CNumber.MAX_SAFE_INTEGER%2CNumber.MIN_SAFE_INTEGER%2CNumber.isInteger%2CNumber.isNaN%2CNumber.isSafeInteger%2CObject.assign%2CObject.create%2CObject.defineProperties%2CObject.defineProperty%2CObject.entries%2CObject.fromEntries%2CObject.getOwnPropertyDescriptor%2CObject.getOwnPropertyDescriptors%2CObject.getOwnPropertyNames%2CObject.getOwnPropertySymbols%2CObject.getPrototypeOf%2CObject.is%2CObject.isExtensible%2CObject.keys%2CObject.preventExtensions%2CObject.setPrototypeOf%2CObject.values%2CPromise%2CPromise.prototype.finally%2CReflect%2CReflect.construct%2CReflect.defineProperty%2CReflect.deleteProperty%2CReflect.has%2CReflect.ownKeys%2CRegExp.prototype.flags%2CResizeObserver%2CSet%2CString.fromCodePoint%2CString.prototype.anchor%2CString.prototype.codePointAt%2CString.prototype.endsWith%2CString.prototype.fixed%2CString.prototype.includes%2CString.prototype.link%2CString.prototype.normalize%2CString.prototype.padStart%2CString.prototype.repeat%2CString.prototype.startsWith%2CString.prototype.trim%2CSymbol%2CSymbol.iterator%2CSymbol.prototype.description%2CSymbol.species%2CSymbol.toPrimitive%2CURL%2CURL.prototype.toJSON%2CURLSearchParams%2CUint16Array%2CUint32Array%2CUint8Array%2CUint8ClampedArray%2CWeakMap%2CXMLHttpRequest%2Catob%2Cconsole%2Cconsole.debug%2Cconsole.error%2Cconsole.info%2Cconsole.log%2Cconsole.warn%2Cdocument%2Cfetch%2CgetComputedStyle%2CglobalThis%2ClocalStorage%2CmatchMedia, please check it manually: https://github.com/MoegirlPediaInterfaceAdmins/MoegirlPediaInterfaceCodes/actions/runs/4642679190

EditDraft 3.0

EditDraft 小工具 3.0 版本跟踪

  • 同一页面多个编辑窗口时提示草稿冲突并禁用;
  • 更有效地持久保存;
  • 在第2条基础上做好草稿过期操作(比如比对源码)。

有关引入polyfills的问题

现在页面上加载各种垫片是由Gadget-libPolyfill.js为页面追加async script标签实现的(如果我没理解错的话)

那么我有个问题希望哪位可以指点一下:

  • 如何确保通过网络请求加载的垫片的生效时间不晚于其他脚本的执行时机

假设某脚本用到了Array.isArray这个方法,当前浏览器环境也需要这个垫片。当网络垫片晚于此脚本执行,是不是就可以说有没有垫片都一样。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.