mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-26 09:56:17 -05:00
ui: keep the unmigrated pages' notifications working
Greptile P1, and a real one: App.js migrated and took `<SemanticToastContainer/>` with it, but seven pages -- Archive, Channels, Docs, FilePreview, Playlists, Zim, ControllerPage -- still raised their toasts through the Semantic library. With no container mounted those notifications went nowhere. No error, no warning; a user deletes a document and is simply never told whether it worked. Fixed by pointing those seven at the library's `toast`, which takes the same options, rather than by mounting a second toast system. Nothing calls the Semantic toast library now, so a test asserts that at zero: a file that goes back to it would raise notifications that silently never appear, and that is not something a reviewer would spot. Also reverted Archive.js to its last good state. An interrupted agent had migrated part of it -- Panel, Tabs, and Mantine's Grid.Col -- while the rest of the file still used Semantic's Segment, Tab and Grid.Row, so a single `Grid` identifier had to be two different components at once. A half-migrated 1400-line file is worse than an unmigrated one; it goes back on the list and gets done in one piece. That break was masked: react-scripts caches ESLint results per file, so the earlier build passed while Archive.js sat on a stale pass. Editing its import invalidated the entry and the errors appeared. Verified with the cache cleared this time, which is the only way that check means anything after a wide change.
This commit is contained in:
parent
e8dd804010
commit
f8bef9fc23
8 changed files with 98 additions and 75 deletions
|
|
@ -22,7 +22,7 @@ import Message from "semantic-ui-react/dist/commonjs/collections/Message";
|
|||
import {useChannel, useChannels, useOneQuery} from "../hooks/customHooks";
|
||||
import _ from "lodash";
|
||||
import {Button, Form, Header, Loader, Modal, Segment, Statistic} from "./Theme";
|
||||
import {toast} from "react-semantic-toasts-2";
|
||||
import {toast} from "./ui";
|
||||
import {RecurringDownloadsTable} from "./admin/Downloads";
|
||||
import {InputForm, ToggleForm} from "../hooks/useForm";
|
||||
import {ChannelDownloadForm, DestinationForm, DownloadTagsSelector} from "./Download";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue