Closed tdegrunt closed 7 months ago
As shown below, displaying the msgs 'Importing...' and 'Completed...', do not correspond with the progress bar anymore while the Download button returns a 404.
Apart from one point stating "Sticky notifications are not added to the screen after refresh, can this be fixed?", rest are all completed. this point require some core changes to the way turbo-rails is setup, which wont be possible currently. Already informed Tom about it.
PRs created
https://github.com/boxture/oms/pull/3839 https://github.com/entdec/signum/pull/8
we require to update the assets, for some reason cant find the label for this ticket
[x] There's a distinction in marking "read" and closing the ticket in the tray, I think we should remove the click (mark as read).
[x] When you click all notifications away but the last one. And then click away the last, the tray shows this line:
[x] Refreshing will then show new ones. Also two bells. Only one bell should be seen:
[x] Icon colors seem to be removed, perhaps make this configuration too?
Use @rails/request.js:
import { delete } from '@rails/request.js'
markRead (event) {
let url = this.ourUrl // get url from notification body? and call delete on that?
post(url, {
responseKind: 'turbo-stream'
}).then(() => {
// do other magic, the turbo stream should pick things up based on the
})
}
destroy.turbo_stream.slim:
= turbo_stream.update "css-selector" do
| slim here
= turbo_stream.update "css-selector" do
| slim here
As discussed with Tom, we would like to add the signum msgs, with the following icon's.
Note:
PR created https://github.com/entdec/signum/pull/11
I have skipped the last point in the comment due to its complexity and the amount of changes would be required as we initiate stream from backend, not on demand.
Bell is not showing as ringing when there are "unread"/"unclosed" notifications:
The close icon has too little margin from the right side of the notification too as compared to:
It should be a bit more "roomy" / "wider"
I would not expect the information icon's in the cases below.
PRs created for the above two comments
https://github.com/boxture/server/pull/3914 https://github.com/entdec/signum/pull/13
The signum messages are displayed properly as expected. Warning, success, failure and informational messages are displayed for the scenario's.
We need to do some fine tunining:
[x] Add attr_readers for use in component.html.slim (remove use of @signals etc)
[x] Move frontend controllers inside the component folder, rename attributes in HTML, and load them using a block to frontend/index.js like so:
[x] Put full notification-body inside the notification drawer (use new component)
[x] Render notification-drawer items using with_collection / with_collection_parameter, see https://viewcomponent.org/guide/collections.html#with_collection_parameter
[x] Allow the notification-drawer to scroll and put 25 last notifications in place
[x] Don't show closed notifications
[x] Remove closed notifications from the DOM (use remove https://turbo.hotwired.dev/handbook/streams)
[x] Don't open the notification drawer if there are no notifications, see the gray bar:
[x] Additionally signum gained a way to add attachments to signals, so we can present the user with exports/import results - adding attachments will touch the record, so updates should happen always, except for changes to the state (closed mostly).
[x] Remove use of Signum::SendSignalsJob, this can be replaced by
broadcast_refreshes
(see https://rubydoc.info/github/hotwired/turbo-rails/main/Turbo/Broadcastable)[x] Grab the configuration.rb from importo and replace signum's configuration with it.
[x] Add a icons option to the configuration (hash) which allows users to change the icons we use for success/error/info as well as the bell icons. Assume fontawesome, but not icon type/style.
[x] Finetune looks a bit: title and body text and icon. Also links could use a small icon (fa-link), attachments get a paperclip. We need a bit more distance between body and the attachment (see third screenshot).
See: https://flowbite.com/docs/components/progress/
Perhaps best to make this a satis component?
We'll do the following in a separate ticket: