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

Avoid duplicate JS error messages on UI (#28873) #28881

Merged
merged 3 commits into from
Jan 21, 2024

Commits on Jan 21, 2024

  1. Avoid duplicate JS error messages on UI (go-gitea#28873)

    Gitea treat JS errors seriously, so sometimes the JS errors caused by
    3rdparty code (eg: browser extensions) would also be reported on Gitea
    UI: TypeError: WeakMap key undefined (caused by extension DarkReader's
    bug) go-gitea#28861
    
    To avoid fill the user's screen with a lot of error messages, this PR
    merges the same error messages into one, like this:
    
    ```js
    <div class="page-content">
      <div class="... js-global-error" data-global-error-msg-compact="testmsg1" data-global-error-msg-count="2">test msg 1 (2)</div>
      <div class="... js-global-error" data-global-error-msg-compact="testmsg2" data-global-error-msg-count="1">test msg 2</div>
    </div>
    ```
    wxiaoguang authored and GiteaBot committed Jan 21, 2024
    Configuration menu
    Copy the full SHA
    44143f7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bed640d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4bef1eb View commit details
    Browse the repository at this point in the history