Skip to content
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

feat:desktop notification #4371

Merged
merged 2 commits into from Dec 1, 2023
Merged

feat:desktop notification #4371

merged 2 commits into from Dec 1, 2023

Conversation

zjy365
Copy link
Contributor

@zjy365 zjy365 commented Nov 30, 2023

πŸ€–[deprecated] Generated by Copilot at f306edd

Summary

πŸŒπŸ—£οΈπŸ’Έ

This pull request adds new features and improvements to the notification component of the frontend desktop app. It supports localization, desktop popup messages, and charge buttons for debt messages. It also adds two new icon components, WarnIcon and CloseIcon, to the ui package and uses them in the notification component.

Sing, O Muse, of the glorious deeds of the frontend heroes
Who enhanced the notification component with skill and wisdom
Adding localization support and desktop popup messages
And charge buttons for debt messages, like Zeus hurling thunderbolts

Walkthrough

  • Add new features and localization to the notification component (link,link,link,link,link,link,link,link,link,link)
  • Refactor the state management using a single MessageConfig object and the immer library (link)
  • Add new optional properties to the NotificationItem type for desktop popup and localization (link)
  • Update the logic of the user actions, such as viewing message detail, marking all as read, and charging (link)
  • Update the rendering of the header, list, detail, and popup components, using the MessageConfig object and the localized versions of the message data (link,link,link,link,link,link)
  • Add new import for the useAppStore hook, which is used to open the cost center app from the notification component (link)
  • Add an effect hook to refetch the notification data when the language changes (link)
  • Add new custom icon components for the warn and close icons, which are used in the notification component (link,link,link,link)
    • Add new files CloseIcon.tsx and WarnIcon.tsx to the ui package, which export the icon components (link,link)
    • Add the import and export statements for the icon components to the ui package index file (link,link)
  • Add new key-value pairs to the common.json files for the English and Chinese locales, which are used to display the text for the new features of the notification component (link,link)

Signed-off-by: jingyang <3161362058@qq.com>
Signed-off-by: jingyang <3161362058@qq.com>
@sealos-ci-robot
Copy link
Member

πŸ€– Generated by lychee action

Summary

Status Count
πŸ” Total 1052
βœ… Successful 384
⏳ Timeouts 0
πŸ”€ Redirected 0
πŸ‘» Excluded 667
❓ Unknown 0
🚫 Errors 0

Full action output

Full Github Actions output

Copy link

sweep-ai bot commented Nov 30, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests βœ…

Comparison is base (9466c12) 65.45% compared to head (f306edd) 65.45%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4371   +/-   ##
=======================================
  Coverage   65.45%   65.45%           
=======================================
  Files           8        8           
  Lines         660      660           
=======================================
  Hits          432      432           
  Misses        180      180           
  Partials       48       48           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@c121914yu c121914yu merged commit bf5379f into labring:main Dec 1, 2023
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants