-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Newsfeed unread badge is always shown after refresh #99191
Comments
Pinging @elastic/kibana-core (Team:Core) |
Found the root cause. The local storage key we're using to store the already fetched item ids is regenerated at each reload kibana/src/plugins/newsfeed/public/lib/api.ts Lines 32 to 33 in 4584a8b
This is causing the 'is new' logic to always returns false between reloads, and to also flood the local storage with old entries: Should be quite easy to address. |
After a closer look, it's slightly more complicated than that. ATM, when you open the newsfeed flyout, the information that the news was read is only used on the UI (removing the unread red pill in the header), and not propagated to the persistence. This was working-ish because of this issue. If we do fix the fact that reloading the page clears the unread state, we will also need to only flag new items as read when the user effectively opens the news flyout by clicking on the top nav button. |
Kibana version:
master
Elasticsearch version:
8.0.0-SNAPSHOT
Server OS version: macOS 11.3
Browser version: Firefox 88.0
Browser OS version: macOS 11.3
Original install method (e.g. download page, yum, from source, etc.): from source
Describe the bug:
Every time Kibana is loaded, on the browser, the Newsfeed unread indicator is shown.
Steps to reproduce:
Expected behavior:
The red bubble should only show if new content is downloaded.
Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Any additional context:
This might be the relevant piece of code to change:
kibana/src/plugins/newsfeed/public/components/newsfeed_header_nav_button.tsx
Lines 34 to 41 in 4584a8b
The text was updated successfully, but these errors were encountered: