Skip to content

Commit

Permalink
Make antd messages click-through (#7239)
Browse files Browse the repository at this point in the history
* make antd messages click-through

* changelog

* add some margin above messages

* pretty
  • Loading branch information
fm3 authored Jul 28, 2023
1 parent 3dd4185 commit 2441ca6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Added configuration to require users' emails to be verified, added flow to verify emails via link. [#7161](https://github.com/scalableminds/webknossos/pull/7161)

### Changed
- Small messages during annotating (e.g. “finished undo”, “applying mapping…”) are now click-through so they do not block users from selecting tools. [7239](https://github.com/scalableminds/webknossos/pull/7239)

### Fixed

Expand Down
2 changes: 2 additions & 0 deletions frontend/javascripts/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ReactDOM from "react-dom";
import { document } from "libs/window";
import rootSaga from "oxalis/model/sagas/root_saga";
import UnthrottledStore, { startSagas } from "oxalis/store";
import { message } from "antd";

import { getActiveUser, checkAnyOrganizationExists, getOrganization } from "admin/admin_rest_api";
import { googleAnalyticsLogClicks } from "oxalis/model/helpers/analytics";
Expand Down Expand Up @@ -88,6 +89,7 @@ document.addEventListener("DOMContentLoaded", async () => {
ErrorHandling.initialize({
throwAssertions: false,
});
message.config({ top: 30 });
document.addEventListener("click", googleAnalyticsLogClicks);
checkBrowserFeatures();
await Promise.all([loadFeatureToggles(), loadActiveUser(), loadHasOrganizations()]);
Expand Down
4 changes: 4 additions & 0 deletions frontend/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -667,3 +667,7 @@ i.without-icon-margin,
}
}
}

.ant-message, .ant-message * {
pointer-events: none;
}

0 comments on commit 2441ca6

Please sign in to comment.