-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix newsfeed unread notifications always on when reloading Kibana #100357
Fix newsfeed unread notifications always on when reloading Kibana #100357
Conversation
Pinging @elastic/kibana-core (Team:Core) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Code review only. I'm requesting changes because I believe that we can remove NewsfeedApiFetchResult
, and maybe we should consider making the test with the date in the future a bit more dynamic.
src/plugins/newsfeed/public/components/newsfeed_header_nav_button.tsx
Outdated
Show resolved
Hide resolved
src/plugins/newsfeed/public/components/newsfeed_header_nav_button.tsx
Outdated
Show resolved
Hide resolved
return true; | ||
}; | ||
|
||
export const convertItem = (rawItem: ApiItem, userLanguage: string): NewsfeedItem => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: seems like convert
is a pretty vague term here, maybe this function and file should be localize_items
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it makes sense to rename convertItem
to localizeItem
, however convertItems
does more than that, as it also validates the content/dates of the news, so not sure the whole file should be renamed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me 👍
💚 Build SucceededMetrics [docs]Module Count
Page load bundle
History
To update your PR or re-run it, just comment with: |
…astic#100357) * fix the implementation * add unit tests * add API unit tests * fix public interface * address review comments * name convertItem to localizeItem * use fetch instead of core.http and add tests
* master: (68 commits) Unskip advanced settings a11y test (elastic#100558) [App Search] Crawler Landing Page (elastic#100822) [DOCS] Clarify when to use kbn clean (elastic#101155) change label behavior (elastic#100991) skip flaky suite (elastic#101126) Fix cases plugin ownership (elastic#101073) [Home] Adding file upload to add data page (elastic#100863) [ML] Functional tests - reenable categorization tests (elastic#101137) [DOCS] Adds server.uuid to settings docs (elastic#101121) Fix newsfeed unread notifications always on when reloading Kibana (elastic#100357) [Lens] Time shift metrics (elastic#98781) [Deprecations service] make `correctiveActions.manualSteps` required (elastic#100997) Add "Risk Matrix" section to the PR template (elastic#100649) [Maps] spatially filter by all geo fields (elastic#100735) [Security Solution] Add Ransomware canary advanced policy option (elastic#101068) [Exploratory view] Core web vitals (elastic#100320) [Security solution][Endpoint] Add unit tests for fleet event filters/trusted apps cards (elastic#101034) [Lens] Use a setter function for the dimension panel (elastic#101123) [Index Patterns] Fix return saved index pattern object (elastic#101051) [CI] For PRs, build TS refs before public api docs check (elastic#100791) ...
Summary
Fix #99191
Fix the newsfeed unread notification being reset every time Kibana is reloaded
Checklist