Repository navigation
sync: dev to extern-contrib - #1042
Merged
Merged
Conversation
…-migration # Conflicts: # Update.json
…migration fix: restore account and profile pages and enforce Chinese UI
Deploying xmoj-script-dev-channel with
|
| Latest commit: |
7fca414
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6c076ae5.xmoj-script-dev-channel.pages.dev |
Contributor
There was a problem hiding this comment.
Sorry @github-actions[bot], you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 5 days and 5 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Contributor
Reviewer's GuideVersion 3.8.3 introduces centralized Chinese-language enforcement, migrates account settings and badge workflows to the current site routes, substantially modernizes profile rendering while preserving native behavior, and adds extensive browser regression coverage for the new flows. Sequence diagram for centralized Chinese-language enforcementsequenceDiagram
participant Page
participant XMOJScript
participant ContestWebApp
participant SessionStorage
XMOJScript->>Page: InitializeChineseLanguage()
Page-->>XMOJScript: initiallyEnglishLanguage
XMOJScript->>XMOJScript: EnsureChinesePage()
XMOJScript->>XMOJScript: EnforceChineseView()
XMOJScript->>ContestWebApp: EnforceChineseView(root)
alt Contest web app was initially English
XMOJScript->>SessionStorage: setItem(retryKey, pageKey)
XMOJScript->>Page: location.reload()
else Preference already applied or legacy page
XMOJScript-->>Page: Continue page initialization
end
Sequence diagram for account badge loading and savingsequenceDiagram
actor User
participant AccountPage
participant XMOJScript
participant XMOJAPI
participant LocalStorage
AccountPage->>XMOJScript: InitializeAccountFeatures(authenticated)
XMOJScript->>XMOJScript: InitializeAccountBadgeEditor()
XMOJScript->>XMOJScript: InitializeAccountBadgeLoading(content, background, color, status)
XMOJScript->>XMOJAPI: RequestAPI(GetBadge, UserID)
XMOJAPI-->>XMOJScript: badge data
XMOJScript-->>AccountPage: Enable badge fields
User->>AccountPage: Click 修改标签
AccountPage->>XMOJScript: SaveAccountBadge(content, background, color)
XMOJScript->>XMOJAPI: RequestAPI(EditBadge, UserID, Content, BackgroundColor, Color)
XMOJAPI-->>XMOJScript: Success or error
alt Success
XMOJScript->>LocalStorage: remove badge cache keys
XMOJScript-->>AccountPage: 显示修改成功
else Failure
XMOJScript-->>AccountPage: 显示错误并允许重试
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…-layout fix: keep navbar spacer visible under browser cosmetic filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sync-branches: New code has just landed in dev, so let's bring extern-contrib up to speed!
Summary by cubic
Brings
devintoextern-contrib, fixing the account settings and profile pages after the site migration, enforcing Chinese across the UI, and keeping the navbar spacer visible under browser cosmetic filters.XMOJ_LANG=zhat document-start for classic and web pages, hides language options in account forms, and removes the language switcher.Written for commit 7fca414. Summary will update on new commits.
Summary by Sourcery
Upgrade the userscript with unified Chinese localization, richer profile and account-management features, and more resilient page and API handling.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests:
Chores: